Esempio n. 1
0
        internal static void Clear()
        {
            lock (World.SyncRoot) {
                itemList.Clear();
                charList.Clear();
                WorldPacketHandler.objectCallbacks.Clear();
                playerSerial = World.InvalidSerial;
                uoplayer     = new UOPlayer(World.InvalidSerial);
                sunLight     = 0xFF;

                Trace.WriteLine("World cleared.", "World");
            }
        }
Esempio n. 2
0
        static World()
        {
            itemList = new Dictionary <uint, RealItem>(128);
            charList = new Dictionary <uint, RealCharacter>(16);

            ground          = new ItemsCollection(0x00000000, false);
            playerSerial    = World.InvalidSerial;
            uoplayer        = new UOPlayer(World.InvalidSerial);
            sunLight        = 0xFF;
            sunLightChanged = new DefaultPublicEvent();

            cleanUpInterval = Config.InternalSettings.GetAttribute(5, "CleanUpInterval", "Config", "World");
            cleanUpDistance = Config.InternalSettings.GetAttribute(30, "CleanUpDistance", "Config", "World");

            cleanUpTimer = new Timer(new TimerCallback(CleanUpCallback), null, 10000, cleanUpInterval * 1000);
            worldCleaned = new DefaultPublicEvent();

            findDistance = Config.GroundFindDistance;
        }
Esempio n. 3
0
        static World()
        {
            itemList = new Dictionary<uint, RealItem>(128);
            charList = new Dictionary<uint, RealCharacter>(16);

            ground = new ItemsCollection(0x00000000, false);
            playerSerial = World.InvalidSerial;
            uoplayer = new UOPlayer(World.InvalidSerial);
            sunLight = 0xFF;
            sunLightChanged = new DefaultPublicEvent();

            cleanUpInterval = Config.InternalSettings.GetAttribute(5, "CleanUpInterval", "Config", "World");
            cleanUpDistance = Config.InternalSettings.GetAttribute(30, "CleanUpDistance", "Config", "World");

            cleanUpTimer = new Timer(new TimerCallback(CleanUpCallback), null, 10000, cleanUpInterval * 1000);
            worldCleaned = new DefaultPublicEvent();

            findDistance = Config.GroundFindDistance;
        }
Esempio n. 4
0
        internal static void Clear()
        {
            lock (World.SyncRoot) {
                itemList.Clear();
                charList.Clear();
                WorldPacketHandler.objectCallbacks.Clear();
                playerSerial = World.InvalidSerial;
                uoplayer = new UOPlayer(World.InvalidSerial);
                sunLight = 0xFF;

                Trace.WriteLine("World cleared.", "World");
            }
        }