Esempio n. 1
0
        public override void Pulse()
        {
            if (!StyxWoW.IsInGame || !StyxWoW.IsInWorld)
            {
                return;
            }
            if (TalentManager.Pulse())
            {
                return;
            }

            UpdateContext();
            Spell.DoubleCastPreventionDict.RemoveAll(t => DateTime.UtcNow > t);

            switch (StyxWoW.Me.Class)
            {
            case WoWClass.Hunter:
            case WoWClass.DeathKnight:
            case WoWClass.Warlock:
            case WoWClass.Mage:
                PetManager.Pulse();
                break;
            }

            if (HealerManager.NeedHealTargeting)
            {
                HealerManager.Instance.Pulse();
            }

            if (Movement)
            {
                Helpers.Movement.PulseMovement();
                TargetingGeneral.TargetingPulse();
            }

            if (!BotManager.Current.Name.Equals("BGBuddy") && !BotManager.Current.Name.Equals("Bg Bot"))
            {
                return;
            }
            if (StyxWoW.IsInGame == false || StyxWoW.Me.IsValid == false)
            {
                return;
            }
            if (StyxWoW.Me.IsActuallyInCombat && Helpers.Movement.MoveTo(StyxWoW.Me.CurrentTarget))
            {
                Blacklist.Flush();
            }
            if (TargetingPvP.TargetExists())
            {
                TargetingPvP.GetInCombat(); return;
            }
            if (StyxWoW.Me.IsDead || StyxWoW.Me.HasAura("Preparation"))
            {
                Helpers.Movement.StopMovement(true, true, true, true); StyxWoW.Me.ClearTarget(); return;
            }
            TargetingPvP.TargetPulse();
        }
Esempio n. 2
0
        public override void Pulse()
        {
            Spell.PulseDoubleCastEntries();
            if (!Me.IsValid || !StyxWoW.IsInGame)
            {
                return;
            }

            PulseHander handler = this.PulseEvent;

            if (handler != null)
            {
                handler();
            }

            switch (StyxWoW.Me.Class)
            {
            case WoWClass.Hunter:
            case WoWClass.DeathKnight:
            case WoWClass.Warlock:
            case WoWClass.Mage:
                PetManager.Pulse();
                break;
            }

            if (IsHealerRotationActive)
            {
                HealableUnit.Pulse(); //
            }
            else
            {
                // Make sure we have the proper target from Targeting.
                // The Botbase should give us the best target in targeting.
                var firstUnit = Targeting.Instance.TargetList.OrderBy(o => o.Distance).FirstOrDefault(q => !q.IsFriendly && q.IsAlive && !q.IsPet && !q.IsPetBattleCritter);
                if (CLUSettings.Instance.EnableTargeting && firstUnit != null && (Me.CurrentTarget == null || Me.CurrentTarget.IsDead || !Me.CurrentTarget.IsAlive || !Me.CurrentTarget.IsHostile) && firstUnit.IsHostile)
                {
                    if (StyxWoW.Me.CurrentTarget != firstUnit)
                    {
                        firstUnit.Target();
                    }
                }
            }
        }