コード例 #1
0
        public static void Configure()
        {
            Core.Expansion = ServerConfiguration.GetOrUpdateSetting("currentExpansion", Expansion.TOL);

            AccountGold.Enabled        = ServerConfiguration.GetSetting("accountGold.enable", Core.TOL);
            AccountGold.ConvertOnBank  = ServerConfiguration.GetSetting("accountGold.convertOnBank", true);
            AccountGold.ConvertOnTrade = ServerConfiguration.GetSetting("accountGold.convertOnTrade", false);
            VirtualCheck.UseEditGump   = ServerConfiguration.GetSetting("virtualChecks.useEditGump", true);

            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)
                {
                    PacketHandlers.SingleClickProps =
                        true; // single click for everything is overridden to check object property list
                }

                Mobile.AOSStatusHandler = AOS.GetStatus;
            }
        }
コード例 #2
0
        public static void ConfigureTimerPool()
        {
            _poolCapacity    = ServerConfiguration.GetOrUpdateSetting("timer.initialPoolCapacity", 1024);
            _maxPoolCapacity = ServerConfiguration.GetOrUpdateSetting("timer.maxPoolCapacity", _poolCapacity * 16);

            RefillPool(_poolCapacity, out var head, out var tail);
            ReturnToPool(_poolCapacity, head, tail);
        }
コード例 #3
0
        public static void Initialize()
        {
            Enabled = ServerConfiguration.GetOrUpdateSetting("buffIcons.enable", Core.ML);

            if (Enabled)
            {
                EventSink.ClientVersionReceived += ResendBuffsOnClientVersionReceived;
            }
        }
コード例 #4
0
        public static void Configure()
        {
            Core.Expansion = ServerConfiguration.GetOrUpdateSetting("currentExpansion", Expansion.T2A);

            AccountGold.Enabled        = ServerConfiguration.GetSetting("accountGold.enable", false);
            AccountGold.ConvertOnBank  = ServerConfiguration.GetSetting("accountGold.convertOnBank", false);
            AccountGold.ConvertOnTrade = ServerConfiguration.GetSetting("accountGold.convertOnTrade", false);
            VirtualCheck.UseEditGump   = ServerConfiguration.GetSetting("virtualChecks.useEditGump", true);

            Mobile.InsuranceEnabled = ServerConfiguration.GetSetting("insurance.enable", false);

            Mobile.ActionDelay = ServerConfiguration.GetSetting("actionDelay", 500);
        }
コード例 #5
0
        public static void Configure()
        {
            Core.Expansion = ServerConfiguration.GetOrUpdateSetting("currentExpansion", Expansion.T2A);

            AccountGold.Enabled        = ServerConfiguration.GetSetting("accountGold.enable", Core.TOL);
            AccountGold.ConvertOnBank  = ServerConfiguration.GetSetting("accountGold.convertOnBank", true);
            AccountGold.ConvertOnTrade = ServerConfiguration.GetSetting("accountGold.convertOnTrade", false);
            VirtualCheck.UseEditGump   = ServerConfiguration.GetSetting("virtualChecks.useEditGump", true);

            Mobile.InsuranceEnabled    = ServerConfiguration.GetSetting("insurance.enable", Core.AOS);
            ObjectPropertyList.Enabled = ServerConfiguration.GetSetting("opl.enable", Core.AOS);
            bool 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);
            IncomingEntityPackets.SingleClickProps = ServerConfiguration.GetSetting("singleClickProps", false);

            Mobile.ActionDelay = ServerConfiguration.GetSetting("actionDelay", Core.AOS ? 1000 : 500);
        }
コード例 #6
0
 public static void Initialize()
 {
     Enabled = ServerConfiguration.GetOrUpdateSetting("pathfinding.enable", true);
 }
コード例 #7
0
 public static void Configure()
 {
     PatchLandEnabled    = ServerConfiguration.GetOrUpdateSetting("maps.enableMapDiffPatches", !Core.HS);
     PatchStaticsEnabled = ServerConfiguration.GetOrUpdateSetting("maps.enableStaticsDiffPatches", true);
 }
コード例 #8
0
 public static void Configure()
 {
     // Using this requires the old mapDif files to be present. Only needed to support Clients < 6.0.0.0
     PatchLandEnabled    = ServerConfiguration.GetOrUpdateSetting("maps.enableMapDiffPatches", false);
     PatchStaticsEnabled = ServerConfiguration.GetOrUpdateSetting("maps.enableStaticsDiffPatches", false);
 }
コード例 #9
0
 public static void Configure()
 {
     // Using this requires the old mapDif files to be present. Only needed to support Clients < 6.0.0.0
     Enabled = ServerConfiguration.GetOrUpdateSetting("maps.enableTileMatrixPatches", !Core.SE);
 }
コード例 #10
0
        public static void Configure()
        {
            // Set to true to support < 6.0.0 clients where map0.mul is both Felucca & Trammel
            var pre6000Trammel = ServerConfiguration.GetOrUpdateSetting("maps.enablePre6000Trammel", false);

            var failures = new List <string>();
            var count    = 0;

            var path = Path.Combine(Core.BaseDirectory, "Data/map-definitions.json");

            Console.Write("Map Definitions: Loading...");

            var stopwatch = Stopwatch.StartNew();
            var maps      = JsonConfig.Deserialize <List <MapDefinition> >(path);

            if (maps == null)
            {
                throw new JsonException($"Failed to deserialize {path}.");
            }

            foreach (var def in maps)
            {
                if (def.Id == 1 && pre6000Trammel)
                {
                    // Use Old Haven by changing file index to Felucca
                    def.FileIndex = 0;
                }

                try
                {
                    RegisterMap(def);
                    count++;
                }
                catch (Exception ex)
                {
#if DEBUG
                    Console.WriteLine(ex);
#endif
                    failures.Add($"\tInvalid map definition {def.Name} ({def.Id})");
                }
            }

            stopwatch.Stop();

            Utility.PushColor(failures.Count > 0 ? ConsoleColor.Yellow : ConsoleColor.Green);
            Console.Write(failures.Count > 0 ? "done with failures" : "done");
            Utility.PopColor();
            Console.WriteLine(
                " ({0} maps, {1} failures) ({2:F2} seconds)",
                count,
                failures.Count,
                stopwatch.Elapsed.TotalSeconds
                );

            if (failures.Count > 0)
            {
                Utility.PushColor(ConsoleColor.Red);
                Console.WriteLine(string.Join(Environment.NewLine, failures));
                Utility.PopColor();
            }
        }