示例#1
0
        //--------------------------------------------------

        /// <summary>
        /// Updates all field objects.
        /// </summary>
        public virtual void Update()
        {
            Mobs.Update();

            Reactors.RedistributeLife();

            Drops.Update();

            if (tFieldTimerExpiration != DateTime.MinValue && tFieldTimerExpiration.SecondsUntilEnd() <= 0)
            {
                OnClockEnd();
            }

            foreach (var user in Users)
            {
                user.Update(this);
            }

            // less taxing to check item id cuz it gets reset when the effect is over
            if (CurrentWeather.nItemID > 0 && CurrentWeather.StartTime.AddedSecondsExpired(CurrentWeather.Duration))
            {
                CurrentWeather.Clear();
            }

            MiniRooms.Update();
            Kites.Update();
            TownPortals.Update();
            OpenGates1.Update();
            OpenGates2.Update();
            AffectedAreas.Update();
            Summons.Update();

            if (Template.DecHP > 0 || Template.DecMP > 0)
            {
                // TODO
                // CUserLocal::OnNotifyHPDecByField(this, iPacket);
            }
        }