Beispiel #1
0
        public override void PerformCheck()
        {
            if (!World.IsCreatureLogedIn(CurrentCreature) ||
                CurrentCreature.FollowCheck != this)
            {
                return;
            }

            //TODO: Finish coding
            Creature cAtking = CurrentCreature.GetCreatureAttacking();

            if (cAtking != null)
            {
                if (CurrentCreature.CurrentFightStance == FightStance.CHASE)
                {
                    CurrentCreature.CurrentWalkSettings.Destination         = cAtking.CurrentPosition;
                    CurrentCreature.CurrentWalkSettings.IntendingToReachDes = false;
                }
                else
                {
                    CurrentCreature.CurrentWalkSettings.Destination = null;
                }
            }

            World.HandleMoveCheck(CurrentCreature);
            World.AddEventInCS(10, PerformCheck);
        }
Beispiel #2
0
        public override void PerformCheck()
        {
            if (!World.IsCreatureLogedIn(CurrentCreature) ||
                CurrentCreature.AttackCheck != this)
            {
                return;
            }

            World.HandleAttackCheck(CurrentCreature, CurrentCreature.GetCreatureAttacking());
            World.AddEventInCS(TimeInCS, PerformCheck);
        }
Beispiel #3
0
        public override void PerformCheck()
        {
            if (!World.IsCreatureLogedIn(CurrentCreature) ||
                CurrentCreature.LightCheck != this || CurrentCreature.SpellLightLevel == 0)
            {
                return;
            }
            CurrentCreature.LightTicks--;
            bool update = false;

            if (CurrentCreature.LightTicks == 140)
            {
                CurrentCreature.SpellLightLevel = 9;
                update = true;
            }
            else if (CurrentCreature.LightTicks == 75)
            {
                CurrentCreature.SpellLightLevel = 7;
                update = true;
            }
            else if (CurrentCreature.LightTicks == 35)
            {
                CurrentCreature.SpellLightLevel = 4;
                update = true;
            }
            else if (CurrentCreature.LightTicks == 0)
            {
                CurrentCreature.SpellLightLevel = 1;
                update = true;
                return;
            }

            if (update && CurrentCreature.SpellLightLevel
                != CurrentCreature.GetLightLevel())
            {
                World.SendUpdateLight(CurrentCreature);
            }

            World.AddEventInCS(TimeInCS, PerformCheck);
        }