ModernUO/Projects/UOContent/Configuration/ExpansionConfiguration.cs
Kamron Batman 98ce65083a
fix(core): Updates expansion and map configurations (fixes map issues) (#570)
- [X] Adds question about expansion at start of server
- [X] Adds question about client version to determine old have and map diffs
- [X] Adds config setting "maps.enablePre6000Trammel"
- [X] Rearranges some of the loading order.
- [X] Added support for deserializing nullable enums from json

TODO:
Expand the nullable enums deserialization factory to work with any type by pulling the factory and creating an instance of the converter.
2021-04-14 01:45:18 -07:00

32 lines
1.2 KiB
C#

using Server.Network;
namespace Server
{
public static class ExpansionConfiguration
{
public static void Configure()
{
Mobile.InsuranceEnabled = ServerConfiguration.GetSetting("insurance.enable", Core.AOS);
ObjectPropertyList.Enabled = ServerConfiguration.GetSetting("opl.enable", Core.AOS);
var visibleDamage = ServerConfiguration.GetSetting("visibleDamage", Core.AOS);
Mobile.VisibleDamageType = visibleDamage ? VisibleDamageType.Related : VisibleDamageType.None;
Mobile.GuildClickMessage = ServerConfiguration.GetSetting("guildClickMessage", !Core.AOS);
Mobile.AsciiClickMessage = ServerConfiguration.GetSetting("asciiClickMessage", !Core.AOS);
Mobile.ActionDelay = ServerConfiguration.GetSetting("actionDelay", Core.AOS ? 1000 : 500);
if (Core.AOS)
{
AOS.DisableStatInfluences();
if (ObjectPropertyList.Enabled)
{
// single click for everything is overridden to check object property list
IncomingEntityPackets.SingleClickProps = true;
}
Mobile.AOSStatusHandler = AOS.GetStatus;
}
}
}
}