예제 #1
0
        public void TryDecayGalleon(object obj)
        {
            BaseGalleon gal = obj as BaseGalleon;

            if (gal == null)
            {
                return;
            }

            List <ISpawnable> list = gal.GetObjectsOnBoard();

            foreach (ISpawnable i in list)
            {
                if (i is PlayerMobile)
                {
                    Timer.DelayCall(DecayRetry, new TimerStateCallback(TryDecayGalleon), gal);
                    return;
                }
            }

            if (gal != null && !gal.Deleted)
            {
                gal.ForceDecay();
            }
        }
예제 #2
0
        public void TryDecayGalleon(object obj)
        {
            BaseGalleon gal = obj as BaseGalleon;

            if (gal == null)
            {
                return;
            }

            if (gal.PlayerCount() > 0)
            {
                Timer.DelayCall(DecayRetry, new TimerStateCallback(TryDecayGalleon), gal);
                return;
            }

            if (gal != null && !gal.Deleted)
            {
                gal.ForceDecay();
            }
        }
예제 #3
0
        public void TryDecayGalleon(object obj)
        {
            BaseGalleon gal = obj as BaseGalleon;

            if (gal == null)
            {
                return;
            }

            if (gal.PlayerCount > 0)
            {
                Timer.DelayCall(DecayRetry, TryDecayGalleon, gal);
                return;
            }

            if (!gal.Deleted)
            {
                gal.ForceDecay();
            }
        }