- [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.
32 lines
1.2 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|
|
}
|