Пример #1
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Bestial Wrath";

                if (!Me.Pet.GotTarget)
                {
                    return(false);
                }
                if (!Me.GotAlivePet)
                {
                    return(false);
                }
                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.BestialWrath))
                {
                    return(false);
                }
                if (!Target.IsHealthPercentAbove(35))
                {
                    return(false);
                }


                return(Spell.CanCast(spellName));
            }
Пример #2
0
            protected override bool CanRun(object context)
            {
                string dpsSpell = Settings.PredatorsSwiftnessFeralCatSpell;

                if (Me.Silenced)
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.PredatorsSwiftnessFeralCat))
                {
                    return(false);
                }
                if (Self.IsHealthPercentAbove(Settings.PredatorsSwiftnessFeralCatHealth))
                {
                    return(false);
                }
                if (!Self.IsBuffOnMe(Druid_ID.PredatorsSwiftness))
                {
                    return(false);
                }
                if (Self.Immobilised)
                {
                    return(false);
                }
                if (!Utils.CombatCheckOk(dpsSpell, false))
                {
                    return(false);
                }

                return(Spell.CanCast(dpsSpell));
            }
Пример #3
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Kill Command";

                if (!CLC.ResultOK(Settings.KillCommand))
                {
                    return(false);
                }
                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                if (!Me.GotAlivePet)
                {
                    return(false);
                }
                if (!Me.Pet.GotTarget)
                {
                    return(false);
                }
                if (Me.Pet.CurrentTarget.Location.Distance(Me.Pet.Location) > Target.InteractRange)
                {
                    return(false);
                }

                return(Spell.CanCast(spellName));
            }
Пример #4
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Arcane Shot";

                if (!CLC.ResultOK(Settings.ArcaneShot))
                {
                    return(false);
                }
                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.ArcaneShot))
                {
                    return(false);
                }
                if (!Self.IsPowerAbove(Settings.FocusShot))
                {
                    return(false);
                }
                if (Self.IsBuffOnMe(53224) && !Self.IsBuffOnMeLUA("Improved Steady Shot") && !Utils.IsBattleground)
                {
                    return(false);
                }

                return(Spell.CanCast(spellName));
            }
Пример #5
0
            protected override RunStatus Run(object context)
            {
                Target.Face();
                Utils.LagSleep();

                string spellName = "Charge";
                bool   result    = Spell.Cast(spellName);

                if (!Spell.IsOnCooldown("Charge"))
                {
                    return(RunStatus.Failure);
                }
                while (Target.IsDistanceMoreThan(Target.InteractRange))
                {
                    System.Threading.Thread.Sleep(150);
                }

                if (Spell.IsOnCooldown("Charge"))
                {
                    System.Threading.Thread.Sleep(1000);
                    if (CLC.ResultOK(Config.Settings.ThunderClap) && Spell.CanCast("Thunder Clap"))
                    {
                        Spell.Cast("Thunder Clap");
                    }

                    if (Spell.IsKnown("Hamstring") && !Target.IsDebuffOnTarget("Hamstring") && CLC.ResultOK(Config.Settings.Hamstring))
                    {
                        System.Threading.Thread.Sleep(1000);
                        Spell.CanCast("Hamstring");
                    }
                }

                return(result ? RunStatus.Success : RunStatus.Failure);
            }
Пример #6
0
            protected override RunStatus Run(object context)
            {
                const string dpsSpell = "Wrath";

                Target.Face();
                System.Threading.Thread.Sleep(500);
                bool result = Spell.Cast(dpsSpell);

                if (CLC.ResultOK(Settings.MoonfireBalance))
                {
                    while (Spell.IsGCD)
                    {
                        System.Threading.Thread.Sleep(250);
                    }
                    Spell.Cast("Moonfire");
                }

                while (Me.IsCasting)
                {
                    System.Threading.Thread.Sleep(500);
                }
                Timers.Reset("Pull");

                return(result ? RunStatus.Success : RunStatus.Failure);
            }
Пример #7
0
            protected override RunStatus Run(object context)
            {
                const string dpsSpell = "Nourish";

                if (Settings.DoubleHeal.Contains("always") && (CLC.ResultOK(Settings.RejuvenationBalance) && !Self.IsHealthPercentAbove(Settings.RejuvenationBalanceHealth)))
                {
                    Spell.Cast("Rejuvenation", Me);
                    Utils.LagSleep();
                    while (Spell.IsGCD)
                    {
                        System.Threading.Thread.Sleep(500);
                    }
                }


                if (Me.IsMoving)
                {
                    Movement.StopMoving(); System.Threading.Thread.Sleep(500);
                }

                bool result = Spell.Cast(dpsSpell, Me);

                System.Threading.Thread.Sleep(500);
                ObjectManager.Update();
                Utils.WaitWhileCasting(Utils.CastingBreak.HealthIsAbove, Settings.NourishBalanceHealth, Me);
                Timers.Reset("Healing");

                return(result ? RunStatus.Success : RunStatus.Failure);
            }
Пример #8
0
            protected override bool CanRun(object context)
            {
                const string dpsSpell = "Power Word: Shield";

                if (!CLC.ResultOK(Settings.PWSBeforePull))
                {
                    return(false);
                }
                if (!Utils.CombatCheckOk(dpsSpell, false))
                {
                    return(false);
                }
                if (Self.IsBuffOnMe(IDs.PowerWordShield, Self.AuraCheck.AllAuras))
                {
                    return(false);
                }
                if (Self.IsBuffOnMe(IDs.WeakenedSoul, Self.AuraCheck.AllAuras))
                {
                    return(false);
                }
                if (Self.IsBuffOnMe("Power Word: Shield"))
                {
                    return(false);
                }

                return(Spell.CanCast(dpsSpell));
            }
Пример #9
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Disengage";

                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                if (Utils.IsBattleground)
                {
                    return(false);
                }
                if (!Target.IsDistanceLessThan(6))
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.Disengage))
                {
                    return(false);
                }
                if (Target.IsTargetingMe)
                {
                    return(false);
                }

                return(Spell.CanCast(spellName));
            }
Пример #10
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Serpent Sting";

                if (!CLC.ResultOK(Settings.SerpentSting))
                {
                    return(false);
                }
                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                if (Target.IsDebuffOnTarget(spellName))
                {
                    return(false);
                }
                if (!Self.IsPowerPercentAbove(Settings.FocusShot))
                {
                    return(false);
                }
                if (!Target.IsHealthPercentAbove(25) && !Target.IsElite)
                {
                    return(false);
                }

                return(Spell.CanCast(spellName));
            }
Пример #11
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Rapid Fire";

                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.RapidFire))
                {
                    return(false);
                }


                return(Spell.CanCast(spellName));
            }
Пример #12
0
            protected override bool CanRun(object context)
            {
                const string dpsSpell = "Regrowth";

                if (Me.Silenced)
                {
                    return(false);
                }
                if (!Timers.Expired("Healing", 2000))
                {
                    return(false);
                }
                if (Self.IsBuffOnMe(dpsSpell))
                {
                    return(false);
                }
                if (Me.GotTarget && !Utils.Adds && Me.HealthPercent > 25 && (Me.HealthPercent * 1.2) > CT.HealthPercent && !Target.IsElite)
                {
                    return(false);
                }
                if (Me.Level >= 10 && ClassHelpers.Druid.ClassSpec != ClassHelpers.Druid.ClassType.Balance)
                {
                    return(false);
                }
                if (ClassHelpers.Druid.Shapeshift.IsCatForm && Me.ManaPercent < (Settings.CatFormManaBalance * 3))
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.RegrowthBalance))
                {
                    return(false);
                }
                if (Self.IsHealthPercentAbove(Settings.RegrowthBalanceHealth))
                {
                    return(false);
                }
                if (Self.Immobilised)
                {
                    return(false);
                }
                if (!Utils.CombatCheckOk(dpsSpell, false))
                {
                    return(false);
                }

                return(Spell.CanCast(dpsSpell));
            }
Пример #13
0
            protected override bool CanRun(object context)
            {
                const string dpsSpell = "Regrowth";

                if (Me.Silenced)
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.RegrowthFeralCat))
                {
                    return(false);
                }
                if (Self.IsHealthPercentAbove(Settings.RegrowthFeralCatHealth))
                {
                    return(false);
                }
                if (Self.Immobilised)
                {
                    return(false);
                }
                if (!Utils.CombatCheckOk(dpsSpell, false))
                {
                    return(false);
                }
                if (Self.IsBuffOnMe(dpsSpell))
                {
                    return(false);
                }
                if (Self.IsBuffOnMe(Druid_ID.SurvivalInstincts))
                {
                    return(false);
                }
                if (!Timers.Expired("FeralCatHealSpam", Settings.FeralCatHealSpam))
                {
                    return(false);
                }
                if (Me.CurrentMana < ClassHelpers.Druid.Shapeshift.ShapeshiftRountTripCost(dpsSpell, "Rejuvenation"))
                {
                    return(false);
                }

                return(Spell.CanCast(dpsSpell));
            }
Пример #14
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Widow Venom";

                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.WidowVenom))
                {
                    return(false);
                }
                if (!Target.CanDebuffTarget(spellName))
                {
                    return(false);
                }

                return(Spell.CanCast(spellName));
            }
Пример #15
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Chimera Shot";

                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.ChimeraShot))
                {
                    return(false);
                }
                if (!Self.IsPowerAbove(Settings.FocusShot))
                {
                    return(false);
                }

                return(Spell.CanCast(spellName));
            }
Пример #16
0
        // These buffs are OK to cast when you are IN COMBAT
        private void InCombatBuffs()
        {
            if (!Me.Combat)
            {
                return;
            }
            if (Me.IsFlying)
            {
                return;
            }
            if (Me.Mounted)
            {
                return;
            }

            if (Me.IsInParty && CLC.ResultOK(Settings.ShadowProtection) && Spell.CanCast("Shadow Protection"))
            {
                const string buffName = "Shadow Protection";
                WoWUnit      target   = RAF.PartyMemberWithoutBuff(buffName);
                if (target != null)
                {
                    Spell.Cast(buffName, target);
                }
            }
            if (!Me.IsInParty && !Self.IsBuffOnMe("Shadow Protection") && CLC.ResultOK(Settings.ShadowProtection) && Spell.CanCast("Shadow Protection"))
            {
                Spell.Cast("Shadow Protection", Me);
            }


            // Fear Ward
            if (!Self.IsBuffOnMe("Fear Ward") && CLC.ResultOK(Settings.FearWard) && Spell.CanCast("Fear Ward"))
            {
                Spell.Cast("Fear Ward", Me);
            }


            // Class specific buffs
            //if (!Self.IsBuffOnMe(ClassHelpers.Druid.IDs.MarkOfTheWild, Self.AuraCheck.AllAuras) && Spell.CanCast("Mark of the Wild")) Spell.Cast("Mark of the Wild", Me);
            //if (!Self.IsBuffOnMe(IDs.MoltenCore, Self.AuraCheck.ActiveAuras) && Spell.CanCast("Power Word: Fortitude")) Spell.Cast("Power Word: Fortitude");
        }
Пример #17
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Explosive Shot";

                if (!CLC.ResultOK(Settings.ExplosiveShot))
                {
                    return(false);
                }
                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                //if (!Self.IsPowerAbove(Settings.FocusShot)) return false;
                if (!Target.IsHealthPercentAbove(20))
                {
                    return(false);
                }


                return(Spell.CanCast(spellName));
            }
Пример #18
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Intimidation";

                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                if (!Me.GotAlivePet)
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.Intimidation))
                {
                    return(false);
                }
                //if (!Target.IsCasting) return false;
                //if (!Self.IsPowerAbove(50)) return false;


                return(Spell.CanCast(spellName));
            }
Пример #19
0
            protected override bool CanRun(object context)
            {
                const string dpsSpell = "Survival Instincts";

                if (!CLC.ResultOK(Settings.SurvivalInstinctsFeralCat))
                {
                    return(false);
                }
                if (Self.IsHealthPercentAbove(Settings.SurvivalInstinctsFeralCatHealth))
                {
                    return(false);
                }
                if (Self.Immobilised)
                {
                    return(false);
                }
                if (!Utils.CombatCheckOk(dpsSpell, false))
                {
                    return(false);
                }

                return(Spell.CanCast(dpsSpell));
            }
Пример #20
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Hunter's Mark";

                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.HuntersMark))
                {
                    return(false);
                }
                if (Target.IsDebuffOnTarget(spellName))
                {
                    return(false);
                }
                if (!Self.IsPowerAbove(Settings.FocusShot))
                {
                    return(false);
                }

                return(Spell.CanCast(spellName));
            }
Пример #21
0
            protected override bool CanRun(object context)
            {
                const string spellName = "Focus Fire";

                if (!Utils.CombatCheckOk(spellName))
                {
                    return(false);
                }
                if (!Me.GotAlivePet)
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.FocusFire))
                {
                    return(false);
                }
                if (Me.Auras.ContainsKey("Focus Fire"))
                {
                    return(false);
                }

                return(Spell.CanCast(spellName));
            }
Пример #22
0
            protected override bool CanRun(object context)
            {
                string spellName = "Misdirection";

                if (!Utils.CombatCheckOk(spellName, false))
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.Misdirection))
                {
                    return(false);
                }
                if (Target.IsLowLevel)
                {
                    return(false);
                }
                if (!Me.GotAlivePet)
                {
                    return(false);
                }

                return(Spell.CanCast(spellName));
            }
Пример #23
0
            protected override bool CanRun(object context)
            {
                bool okToMove = false;

                if (!Me.GotTarget)
                {
                    return(false);
                }
                if (Me.IsInInstance || Utils.IsBattleground)
                {
                    return(false);
                }
                if (!CLC.ResultOK(Settings.PreEmptiveLooting))
                {
                    return(false);
                }
                if (Target.IsElite)
                {
                    return(false);
                }
                if (!Target.IsDistanceMoreThan(Settings.PreLootMinDistance))
                {
                    return(false);
                }

                if (!Target.IsLowLevel && !Target.IsHealthPercentAbove(Settings.PreLootMaxHealth) || Target.IsLowLevel && !Target.IsHealthPercentAbove(60))
                {
                    okToMove = true;
                }

                if (!okToMove || Utils.Adds || CT.CurrentTargetGuid == Me.Guid && Target.IsDistanceLessThan(20))
                {
                    return(false);
                }

                return(true);
            }
Пример #24
0
            protected override RunStatus Run(object context)
            {
                const string dpsSpell = "Regrowth";
                bool         result   = Spell.Cast(dpsSpell, Me);

                if (Settings.DoubleDotFeralCat.Contains("always") && !Self.IsBuffOnMe(Druid_ID.Rejuvenation) && CLC.ResultOK(Settings.RejuvenationFeralCat))
                {
                    double modifiedRejuvenationthHealth = Settings.RejuvenationFeralCatHealth;
                    if (Settings.RegrowthFeralCatHealth > Settings.RejuvenationFeralCatHealth)
                    {
                        modifiedRejuvenationthHealth = Settings.RejuvenationBalanceHealth * 1.2;
                    }
                    if (!Self.IsHealthPercentAbove((int)modifiedRejuvenationthHealth))
                    {
                        Utils.Log("** Rejuvenation will also be cast. Health is close enough **", Utils.Colour("Red"));
                        if (Spell.IsGCD || Me.IsCasting)
                        {
                            return(RunStatus.Running);
                        }
                        Spell.Cast("Regrowth", Me);
                    }
                }

                Timers.Reset("FeralCatHealSpam");
                return(result ? RunStatus.Success : RunStatus.Failure);
            }
Пример #25
0
        public override void Pulse()
        {
            // HB runs this as frequenty as possible. I don't know the exact frequency but its supposed to be 5-10 times per second
            // Anything you want checked on a regular basis you may want to add here.
            // For example buffing / healing random players

            base.Pulse();

            int lootableMobs = LootTargeting.Instance.LootingList.Count;

            // If Settings.DirtyData = true it will reload the settings from the XML file
            // This reads the XML file and re-populates the Settings class with any changed values
            if (!_isCCLoaded)
            {
                _isCCLoaded = true; Settings.DirtyData = true;
            }
            if (Settings.DirtyData)
            {
                LoadSettings(true);
            }

            // So we don't overload HB the below code is only run once per second
            if (!Timers.Expired("Pulse", 1000))
            {
                return;
            }
            Timers.Recycle("Pulse", 1000);

            // Environmental Settings
            if (Timers.Expired("EnvironmentSettings", 5000))
            {
                if (Settings.MultipleEnvironment.Contains("never"))
                {
                    ConfigSettings.CurrentEnvironment = "PVE";
                }
                else
                {
                    Timers.Reset("EnvironmentSettings");
                    string environment = Utils.IsBattleground ? "PVP" : "PVE";
                    environment = ObjectManager.Me.IsInInstance ? "Instance" : environment;
                    if (!ConfigSettings.UIActive && environment != ConfigSettings.CurrentEnvironment)
                    {
                        ConfigSettings.CurrentEnvironment = environment;
                        Utils.Log(string.Format("*** Environment has changed. Loading {0} settings.", environment), Utils.Colour("Red"));
                        LoadSettings(false);
                    }
                }
            }

            // Evangelism / Archangel
            if (!Me.Combat)
            {
                Timers.Reset("ArcSmiteCombat");
            }

            // Make sure we have a target - Instance only
            // Sometimes IB was not selecting a target when we were in combat. This f****d up things immensely!
            if (Me.IsInInstance && !Me.GotTarget)
            {
                WoWUnit tank = RAF.PartyTankRole;
                if (tank != null && tank.GotTarget && tank.Combat)
                {
                    RAF.PartyTankRole.CurrentTarget.Target();
                }
            }


            // Dispel Magic - You and all party members);
            if ((!Settings.Cleanse.Contains("never") || !Settings.PartyCleanse.Contains("never")) && Spell.CanCast("Dispel Magic"))
            {
                List <int> urgentRemoval = new List <int> {
                    17173
                };
                bool urgentCleanse = (from aura in Me.ActiveAuras from procID in urgentRemoval where procID == aura.Value.SpellId select aura).Any();

                if (urgentCleanse || CLC.ResultOK(Settings.Cleanse) || CLC.ResultOK(Settings.PartyCleanse))
                {
                    List <WoWDispelType> cureableList = new List <WoWDispelType> {
                        WoWDispelType.Magic
                    };
                    //if (Settings.SacredCleansing.Contains("... talented") && !cureableList.Contains(WoWDispelType.Magic)) { cureableList.Add(WoWDispelType.Magic); }

                    var p = ClassHelpers.Common.DecursePlayer(cureableList, CLC.ResultOK(Settings.PartyCleanse));
                    if (p != null)
                    {
                        if (Spell.CanCast("Dispel Magic"))
                        {
                            Spell.Cast("Dispel Magic", p);
                        }
                    }
                }
            }

            // Cure Disease - You and all party members);
            if ((!Settings.Cleanse.Contains("never") || !Settings.PartyCleanse.Contains("never")) && Spell.CanCast("Cure Disease"))
            {
                List <int> urgentRemoval = new List <int> {
                    3427
                };
                bool urgentCleanse = (from aura in Me.ActiveAuras from procID in urgentRemoval where procID == aura.Value.SpellId select aura).Any();

                if (urgentCleanse || CLC.ResultOK(Settings.Cleanse))
                {
                    List <WoWDispelType> cureableList = new List <WoWDispelType> {
                        WoWDispelType.Disease
                    };
                    var p = ClassHelpers.Common.DecursePlayer(cureableList, CLC.ResultOK(Settings.PartyCleanse));
                    if (p != null)
                    {
                        if (Spell.CanCast("Cure Disease"))
                        {
                            Spell.Cast("Cure Disease", p);
                        }
                    }
                }
            }

            // Buffs and such
            if (!Me.IsFlying && !Me.Mounted && !Me.Auras.ContainsKey("Altered Form"))
            {
                // Inner Fire/Will
                if (!Self.IsBuffOnMe("Inner Fire") && Settings.InnerFireWill.Contains("Inner Fire") && Spell.CanCast("Inner Fire"))
                {
                    Spell.Cast("Inner Fire", Me);
                }
                if (!Self.IsBuffOnMe("Inner Will") && Settings.InnerFireWill.Contains("Inner Will") && Spell.CanCast("Inner Will"))
                {
                    Spell.Cast("Inner Will", Me);
                }

                // Power Word Fortitude
                if (Me.IsInParty && !Me.Combat && CLC.ResultOK(Settings.PowerWordFortitude) && Spell.CanCast("Power Word: Fortitude"))
                {
                    const string buffName = "Power Word: Fortitude";
                    WoWUnit      target   = RAF.PartyMemberWithoutBuff(buffName);
                    if (target != null && !target.Auras.ContainsKey("Blood Pact"))
                    {
                        Spell.Cast(buffName, target);
                    }
                }
                if (!Me.IsInParty && !Me.Combat && !Self.IsBuffOnMe("Power Word: Fortitude") && CLC.ResultOK(Settings.PowerWordFortitude) && Spell.CanCast("Power Word: Fortitude"))
                {
                    Spell.Cast("Power Word: Fortitude", Me);
                }

                // Shadow Protection
                if (Me.IsInParty && !Me.Combat && CLC.ResultOK(Settings.ShadowProtection) && Spell.CanCast("Shadow Protection"))
                {
                    const string buffName = "Shadow Protection";
                    WoWUnit      target   = RAF.PartyMemberWithoutBuff(buffName);
                    if (target != null)
                    {
                        Spell.Cast(buffName, target);
                    }
                }
                if (!Me.IsInParty && !Me.Combat && !Self.IsBuffOnMe("Shadow Protection") && CLC.ResultOK(Settings.ShadowProtection) && Spell.CanCast("Shadow Protection"))
                {
                    Spell.Cast("Shadow Protection", Me);
                }

                // Vampiric Embrace
                if (!Self.IsBuffOnMe("Vampiric Embrace") && Spell.CanCast("Vampiric Embrace"))
                {
                    Spell.Cast("Vampiric Embrace");
                }

                // Fear Ward
                if (!Self.IsBuffOnMe("Fear Ward") && CLC.ResultOK(Settings.FearWard) && Spell.CanCast("Fear Ward"))
                {
                    Spell.Cast("Fear Ward", Me);
                }
            }

            // Shadowform - can be applied while flying and mounted
            //if (CLC.ResultOK(Settings.Shadowform) && !Self.IsBuffOnMe("Shadowform") && Self.IsHealthPercentAbove(Settings.RenewHealth) && Spell.CanCast("Shadowform")) Spell.Cast("Shadowform");
            if (CLC.ResultOK(Settings.Shadowform) && !Self.IsBuffOnMe(15473, Self.AuraCheck.AllAuras) && !Me.Mounted && Self.IsHealthPercentAbove(Settings.RenewHealth) && Spell.CanCast("Shadowform"))
            {
                Spell.Cast("Shadowform");
            }


            // Prayer of Healing
            if (!Me.Mounted && !Me.IsFlying && !Me.Combat && (Me.IsInParty || Me.IsInRaid))
            {
                int PoHCount = Convert.ToInt16(Settings.PrayerOfHealingCount);
                List <WoWPlayer> myPartyOrRaidGroup = Me.PartyMembers;
                List <WoWPlayer> PoH = (from o in myPartyOrRaidGroup let p = o.ToPlayer() where p.Distance < 30 && !p.Dead && !p.IsGhost && p.InLineOfSight && p.HealthPercent < Settings.PrayerOfHealingHealth select p).ToList();
                if (PoH.Count >= PoHCount && Spell.CanCast("Prayer of Healing"))
                {
                    Spell.Cast("Prayer of Healing");
                    Utils.LagSleep();
                    Utils.WaitWhileCasting();
                }

                // Everyone else in the party gets healed
                WoWUnit healTarget = RAF.HealPlayer(95, 40);
                if (healTarget != null && !healTarget.Dead)
                {
                    ClassHelpers.Priest.PartyHealer(healTarget);
                }
            }


            // Archangel - Use it or loose it
            if (!Me.Mounted && !Me.IsFlying && (!Me.Auras.ContainsKey("Drink") || !Me.Auras.ContainsKey("Food")) && Me.ActiveAuras.ContainsKey("Evangelism") && !Me.Combat)
            {
                const string spell            = "Evangelism";
                const string archangel        = "Archangel";
                double       getTime          = Convert.ToDouble(Self.GetTimeLUA());
                double       buffTime         = Convert.ToDouble(Self.BuffTimeLeftLUA(spell));
                double       secondsRemaining = buffTime - getTime;

                if (secondsRemaining < 4.5 && Spell.CanCastLUA(archangel))
                {
                    Utils.Log("-Evangelism buff about to expire. Casting Archangel buff to consume it", Utils.Colour("Red"));
                    Spell.Cast(archangel);
                }
            }


            // Resurrection
            if (Settings.ResurrectPlayers.Contains("always") && !Me.Combat && Spell.CanCast("Resurrection") && !Me.IsCasting)
            {
                foreach (WoWPlayer p in Me.PartyMembers.Where(p => p.Dead && !p.IsGhost && p.InLineOfSight))
                {
                    if (Timers.Exists(p.Guid.ToString()) && !Timers.Expired(p.Guid.ToString(), 15000))
                    {
                        continue;
                    }

                    Spell.Cast("Resurrection", p);
                    Utils.LagSleep();
                    Timers.Add(p.Guid.ToString());  // Prevent spamming resurrection on th same target
                    System.Threading.Thread.Sleep(1500);
                    if (!Me.IsCasting)
                    {
                        Spell.StopCasting();
                    }
                    while (Me.IsCasting)
                    {
                        if (!p.Dead)
                        {
                            Utils.Log("-Emmm.... it appears our dead party member is now alive. So why are we still trying to rez them?");
                            Spell.StopCasting();
                        }
                    }
                    break;
                }
            }

            // Clean up timers
            foreach (WoWPlayer p in Me.PartyMembers.Where(p => p.IsAlive && Timers.Exists(p.Guid.ToString())))
            {
                Timers.Remove(p.Guid.ToString());
            }
        }
Пример #26
0
        public override void Pulse()
        {
            // HB runs this as frequenty as possible. I don't know the exact frequency but its supposed to be 5-10 times per second
            // Anything you want checked on a regular basis you may want to add here.
            // For example buffing / healing random players

            base.Pulse();

            int lootableMobs = LootTargeting.Instance.LootingList.Count;

            // If Settings.DirtyData = true it will reload the settings from the XML file
            // This reads the XML file and re-populates the Settings class with any changed values
            if (!_isCCLoaded)
            {
                _isCCLoaded = true; Settings.DirtyData = true;
            }
            if (Settings.DirtyData)
            {
                LoadSettings(true);
            }

            // So we don't overload HB the below code is only run once per second
            if (!Timers.Expired("Pulse", 1000))
            {
                return;
            }
            Timers.Recycle("Pulse", 1000);

            // Environmental Settings
            if (Timers.Expired("EnvironmentSettings", 5000))
            {
                if (Settings.MultipleEnvironment.Contains("never"))
                {
                    ConfigSettings.CurrentEnvironment = "PVE";
                }
                else
                {
                    Timers.Reset("EnvironmentSettings");
                    string environment = Utils.IsBattleground ? "PVP" : "PVE";
                    environment = ObjectManager.Me.IsInInstance ? "Instance" : environment;
                    if (!ConfigSettings.UIActive && environment != ConfigSettings.CurrentEnvironment)
                    {
                        ConfigSettings.CurrentEnvironment = environment;
                        Utils.Log(string.Format("*** Environment has changed. Loading {0} settings.", environment), Utils.Colour("Red"));
                        LoadSettings(false);
                    }
                }
            }



            // Make sure we have a target - Instance only
            // Sometimes IB was not selecting a target when we were in combat. This f****d up things immensely!
            if (Me.IsInInstance && !Me.GotTarget)
            {
                WoWUnit tank = RAF.PartyTankRole;
                if (tank != null && tank.GotTarget && tank.Combat)
                {
                    RAF.PartyTankRole.CurrentTarget.Target();
                }
            }

            // Decurse / Remove Corruption
            if (CLC.ResultOK(Settings.RemoveCorruptionBalance) && Spell.CanCast("Remove Corruption"))
            {
                WoWUnit p = ClassHelpers.Druid.NeedToDecursePlayer;
                if (p != null && Spell.CanCast("Remove Corruption"))
                {
                    Spell.Cast("Remove Corruption", p);
                }
            }

            // Buff players with MotW);
            if (Settings.MarkOfTheWild.Contains("always") && Me.IsInParty && Me.ManaPercent > 40)
            {
                WoWUnit p = RAF.PartyMemberWithoutBuff("Mark of the Wild");
                if (p != null)
                {
                    if (Spell.CanCast("Mark of the Wild"))
                    {
                        Spell.Cast("Mark of the Wild", p);
                    }
                }
            }


            // Predator's Swiftness
            if (CLC.ResultOK(Settings.PredatorsSwiftnessFeralCat) && !Self.IsHealthPercentAbove(Settings.PredatorsSwiftnessFeralCatHealth))
            {
                if (Self.IsBuffOnMeLUA("Predator's Swiftness") && Spell.CanCast(Settings.PredatorsSwiftnessFeralCatSpell))
                {
                    Utils.Log("** Predator's Swiftness **");
                    Spell.Cast(Settings.PredatorsSwiftnessFeralCatSpell, Me);
                }
            }


            // Resurrection
            if (!Me.Combat && Spell.CanCast("Revive") && !Me.IsCasting)
            {
                foreach (WoWPlayer p in Me.PartyMembers.Where(p => p.Dead && !p.IsGhost && p.InLineOfSight))
                {
                    if (Timers.Exists(p.Guid.ToString()) && !Timers.Expired(p.Guid.ToString(), 15000))
                    {
                        continue;
                    }

                    Spell.Cast("Revive", p);
                    Utils.LagSleep();
                    Timers.Add(p.Guid.ToString());  // Prevent spamming resurrection on th same target
                    System.Threading.Thread.Sleep(1500);
                    if (!Me.IsCasting)
                    {
                        Spell.StopCasting();
                    }
                    while (Me.IsCasting)
                    {
                        if (!p.Dead)
                        {
                            Utils.Log("-Emmm.... it appears our dead party member is now alive. So why are we still trying to rez them?");
                            Spell.StopCasting();
                        }
                    }
                    break;
                }
            }

            // Clean up timers
            foreach (WoWPlayer p in Me.PartyMembers.Where(p => p.IsAlive && Timers.Exists(p.Guid.ToString())))
            {
                Timers.Remove(p.Guid.ToString());
            }

            // Make sure we have a target - Instance only
            // Sometimes IB was not selecting a target when we were in combat. This f****d up things immensely!
            if (Me.IsInInstance && !Me.GotTarget)
            {
                WoWUnit tank = RAF.PartyTankRole;
                if (tank != null && tank.GotTarget && tank.Combat)
                {
                    tank.CurrentTarget.Target();
                }
            }

            // Try and grab a target all the time, if we're sitting around doing nothing check if anyone in our party has a target and take it.
            if (!Me.Combat)
            {
                foreach (WoWPlayer player in Me.PartyMembers)
                {
                    if (!player.Combat)
                    {
                        continue;
                    }
                    if (player.Distance > 80)
                    {
                        continue;
                    }
                    if (!player.GotTarget)
                    {
                        continue;
                    }

                    player.CurrentTarget.Target();
                }
            }

            // Out of combat healing. Make sure everyone is topped up.
            if (!Me.Mounted && !Me.IsFlying && !Me.Combat && (Me.IsInParty || Me.IsInRaid) && Spell.CanCast("Regrowth"))
            {
                List <WoWPlayer> myPartyOrRaidGroup = Me.PartyMembers;
                List <WoWPlayer> healTarget         = (from o in myPartyOrRaidGroup let p = o.ToPlayer() where p.Distance < 40 && !p.Auras.ContainsKey("Regrowth") && !p.Dead && !p.IsGhost && p.InLineOfSight && p.HealthPercent < 80 select p).ToList();
                //List<WoWPlayer> healTarget = (from o in myPartyOrRaidGroup let p = o.ToPlayer() where p.Distance < 40 && !p.Auras.ContainsKey("Regrowth") && !p.Dead && !p.IsGhost && p.InLineOfSight && p.HealthPercent < 80 select p).ToList();

                if (healTarget.Count > 0)
                {
                    Spell.Cast("Regrowth", healTarget.FirstOrDefault());
                }
                else if (Me.HealthPercent < 80)
                {
                    Spell.Cast("Regrowth", Me);
                }
            }


            // Buffs and such
            if (!Me.IsFlying && !Me.Mounted)
            {
                if (!Self.IsBuffOnMe(Druid_ID.MarkOfTheWild) && Spell.CanCast("Mark of the Wild") && Settings.MarkOfTheWild.Contains("always"))
                {
                    Spell.Cast("Mark of the Wild", Me);
                }

                if (!Me.Combat)
                {
                    if (!Me.IsMoving)
                    {
                        Timers.Reset("TravelForm");
                    }
                    if (Timers.Expired("TravelForm", 4000) && ClassHelpers.Druid.Shapeshift.CanUseTravelForm)
                    {
                        ClassHelpers.Druid.Shapeshift.TravelForm();
                    }
                }

                /*
                 * if (Me.Combat)
                 * {
                 *
                 *  if (Me.GotTarget && Me.CurrentTarget.IsCasting)
                 *  {
                 *      Utils.Log("==============[TARGET IS CASTING A SPELL]==============");
                 *      Utils.Log("=== Spell name: " + CT.CastingSpell.Name);
                 *      Utils.Log("=== Spell ID: " + CT.CastingSpell.Id);
                 *      Utils.Log("=== Spell description: " + CT.CastingSpell.Description);
                 *      Utils.Log("=== Spell school: " + CT.CastingSpell.School);
                 *      Utils.Log("=== Spell mechanic: " + CT.CastingSpell.Mechanic.ToString());
                 *      Utils.Log("=== Spell cast time (ms): " + CT.CastingSpell.CastTime);
                 *      Utils.Log("=======================================================");
                 *  }
                 *
                 * }
                 */

                /*
                 * if (Me.Combat)
                 * {
                 *  if (Me.IsInInstance)
                 *  {
                 *      foreach (WoWUnit unit in ObjectManager.GetObjectsOfType<WoWUnit>())
                 *      {
                 *          //Utils.Log("=====================[Threat Info]============================");
                 *          if (!unit.Combat) continue;
                 *          if (unit.Distance > 80) continue;
                 *          Utils.Log(string.Format("-- {0}, TargetGuid {1}, ThreatStatus {2}, ThreatPercent {3}, RawPercent {4}", unit.Name, unit.ThreatInfo.TargetGuid,unit.ThreatInfo.ThreatStatus,unit.ThreatInfo.RawPercent,unit.ThreatInfo.RawPercent));
                 *          Utils.Log("-- Threat for ME " + unit.GetThreatInfoFor(Me));
                 *
                 *      }
                 *  }
                 * }
                 */
            }

            // If you are drinking/eating and the tank is in combat and low on health then get your ass up and heal
            if (Self.IsBuffOnMe("Food") || Self.IsBuffOnMe("Drink"))
            {
                WoWUnit tank = RAF.PartyTankRole;

                if (tank != null && Me.IsInInstance && tank.Combat)
                {
                    if (tank.HealthPercent < 70)
                    {
                        Utils.Log("-Oh shit! The tank has pulled while we were drinking");
                        Lua.DoString("CancelUnitBuff('player', 'Food')");
                        Lua.DoString("CancelUnitBuff('player', 'Drink')");
                    }
                }
            }
        }
Пример #27
0
        // All buffs check here. Only cast when you are OUT OF COMBAT
        private void OutOfCombatBuffs()
        {
            if (Me.Combat)
            {
                return;
            }
            if (Me.IsFlying)
            {
                return;
            }
            if (Me.Mounted)
            {
                return;
            }
            if (Self.IsBuffOnMe("Drink"))
            {
                return;
            }
            if (Self.IsBuffOnMe("Food"))
            {
                return;
            }
            if (Me.IsCasting)
            {
                return;
            }

            // Resurrection
            if (Settings.ResurrectPlayers.Contains("always") && Spell.CanCast("Resurrection"))
            {
                foreach (WoWPlayer p in Me.PartyMembers.Where(p => p.Dead && !p.IsGhost && p.InLineOfSight))
                {
                    if (Timers.Exists(p.Guid.ToString()) && !Timers.Expired(p.Guid.ToString(), 15000))
                    {
                        continue;
                    }

                    Spell.Cast("Resurrection", p);
                    Utils.LagSleep();
                    Timers.Add(p.Guid.ToString());  // Prevent spamming resurrection on th same target
                    System.Threading.Thread.Sleep(1500);
                    if (!Me.IsCasting)
                    {
                        Spell.StopCasting();
                    }
                    while (Me.IsCasting)
                    {
                        if (!p.Dead)
                        {
                            Utils.Log("-Emmm.... it appears our dead party member is now alive. So why are we still trying to rez them?");
                            Spell.StopCasting();
                        }
                    }
                    break;
                }
            }


            // Inner Fire or Inner Will
            if (!Self.IsBuffOnMe("Inner Fire") && Settings.InnerFireWill.Contains("Inner Fire") && Spell.CanCast("Inner Fire"))
            {
                Spell.Cast("Inner Fire", Me);
            }
            if (!Self.IsBuffOnMe("Inner Will") && Settings.InnerFireWill.Contains("Inner Will") && Spell.CanCast("Inner Will"))
            {
                Spell.Cast("Inner Will", Me);
            }

            // Power Word Fortitude
            if (Me.IsInParty && CLC.ResultOK(Settings.PowerWordFortitude) && Spell.CanCast("Power Word: Fortitude"))
            {
                const string buffName = "Power Word: Fortitude";
                WoWUnit      target   = RAF.PartyMemberWithoutBuff(buffName);
                if (target != null && !target.Auras.ContainsKey("Blood Pact"))
                {
                    Spell.Cast(buffName, target);
                }
            }

            // Vampiric Embrace
            if (!Self.IsBuffOnMe("Vampiric Embrace") && Spell.CanCast("Vampiric Embrace"))
            {
                Spell.Cast("Vampiric Embrace");
            }


            // Class specific buffs
            //if (!Self.IsBuffOnMe(ClassHelpers.Druid.IDs.MarkOfTheWild, Self.AuraCheck.AllAuras) && Spell.CanCast("Mark of the Wild")) Spell.Cast("Mark of the Wild", Me);
        }
Пример #28
0
        // Anything else to happen in the PULSE goes here
        public static void MiscOtherPulse()
        {
            const string dispelMagic = "Dispel Magic";
            const string cureDisease = "Cure Disease";
            const string evangelism  = "Evangelism";
            const string archangel   = "Archangel";


            // Evangelism / Archangel
            if (!Me.Combat && Timers.Exists("ArcSmiteCombat"))
            {
                Timers.Reset("ArcSmiteCombat");
            }

            // Archangel - Use it or loose it
            if (!Me.Mounted && !Me.IsFlying && (!Me.Auras.ContainsKey("Drink") || !Me.Auras.ContainsKey("Food")) && Me.ActiveAuras.ContainsKey("Evangelism") && !Me.Combat)
            {
                double getTime          = Convert.ToDouble(Self.GetTimeLUA());
                double buffTime         = Convert.ToDouble(Self.BuffTimeLeftLUA(evangelism));
                double secondsRemaining = buffTime - getTime;

                if (secondsRemaining < 4.5 && Spell.CanCastLUA(archangel))
                {
                    Utils.Log("-Evangelism buff about to expire. Casting Archangel buff to consume it", Utils.Colour("Red"));
                    Spell.Cast(archangel);
                }
            }



            // Dispel Magic - You and all party members);
            if ((!Settings.Cleanse.Contains("never") || !Settings.PartyCleanse.Contains("never")) && Spell.CanCast(dispelMagic))
            {
                List <int> urgentRemoval = new List <int> {
                    17173
                };
                bool urgentCleanse = (from aura in Me.ActiveAuras from procID in urgentRemoval where procID == aura.Value.SpellId select aura).Any();

                if (urgentCleanse || CLC.ResultOK(Settings.Cleanse) || CLC.ResultOK(Settings.PartyCleanse))
                {
                    List <WoWDispelType> cureableList = new List <WoWDispelType> {
                        WoWDispelType.Magic
                    };

                    var p = ClassHelpers.Common.DecursePlayer(cureableList, CLC.ResultOK(Settings.PartyCleanse));
                    if (p != null)
                    {
                        if (Spell.CanCast(dispelMagic))
                        {
                            Spell.Cast(dispelMagic, p);
                        }
                    }
                }
            }

            // Cure Disease - You and all party members);
            if ((!Settings.Cleanse.Contains("never") || !Settings.PartyCleanse.Contains("never")) && Spell.CanCast(cureDisease))
            {
                List <int> urgentRemoval = new List <int> {
                    3427
                };
                bool urgentCleanse = (from aura in Me.ActiveAuras from procID in urgentRemoval where procID == aura.Value.SpellId select aura).Any();

                if (urgentCleanse || CLC.ResultOK(Settings.Cleanse))
                {
                    List <WoWDispelType> cureableList = new List <WoWDispelType> {
                        WoWDispelType.Disease
                    };
                    var p = ClassHelpers.Common.DecursePlayer(cureableList, CLC.ResultOK(Settings.PartyCleanse));
                    if (p != null)
                    {
                        if (Spell.CanCast(cureDisease))
                        {
                            Spell.Cast(cureDisease, p);
                        }
                    }
                }
            }



            // Clean up ressurection timers
            foreach (WoWPlayer p in Me.PartyMembers.Where(p => p.IsAlive && Timers.Exists(p.Guid.ToString())))
            {
                Timers.Remove(p.Guid.ToString());
            }
        }
Пример #29
0
            protected override RunStatus Run(object context)
            {
                const string huntersMark = "Hunter's Mark";

                ClassHelpers.Hunter.Pet.Attack();
                Thread.Sleep(500);
                Target.Face();

                if (Utils.IsBattleground || Me.IsInInstance || Target.IsLowLevel)
                {
                    return(RunStatus.Failure);
                }

                Thread.Sleep(500);

                if (CLC.ResultOK(Settings.HuntersMark) && !Target.IsDebuffOnTarget(huntersMark) && Spell.CanCast(huntersMark))
                {
                    Spell.Cast(huntersMark);
                }
                if (Target.IsDistanceMoreThan(38))
                {
                    Movement.MoveTo(CT.Location);
                }
                if (Me.IsMoving && Target.IsDistanceLessThan(35))
                {
                    Movement.StopMoving();
                }

                if (Settings.PetAttackDelay.Contains("never"))
                {
                    Thread.Sleep(500);
                    if (Self.IsBuffOnMe("Aspect of the Cheetah") && Spell.CanCast("Aspect of the Hawk"))
                    {
                        Spell.Cast("Aspect of the Hawk");
                        Utils.LagSleep();
                        while (Spell.IsGCD)
                        {
                            Thread.Sleep(250);
                        }
                    }

                    // Cast pull spell
                    if (Spell.CanCast(Settings.PullSpell))
                    {
                        Spell.Cast(Settings.PullSpell);
                        Utils.LagSleep();
                        while (Spell.IsGCD)
                        {
                            Thread.Sleep(250);
                        }
                    }
                    else if (Spell.CanCast("Concussive Shot"))
                    {
                        Spell.Cast("Concussive Shot");
                        Utils.LagSleep();
                        while (Spell.IsGCD)
                        {
                            Thread.Sleep(250);
                        }
                    }
                    else if (Spell.CanCast("Arcane Shot"))
                    {
                        Spell.Cast("Arcane Shot");
                        Utils.LagSleep();
                        while (Spell.IsGCD)
                        {
                            Thread.Sleep(250);
                        }
                    }

                    Utils.AutoAttack(true);
                    return(RunStatus.Success);
                }

                // Pet Attack Delay
                while (!CT.Combat && !Me.Combat)
                {
                    if (CLC.ResultOK(Settings.HuntersMark) && !Target.IsDebuffOnTarget(huntersMark) && Spell.CanCast(huntersMark))
                    {
                        Spell.Cast(huntersMark);
                    }
                    Thread.Sleep(250);
                    if (Self.IsBuffOnMe("Aspect of the Cheetah") && Spell.CanCast("Aspect of the Hawk"))
                    {
                        Spell.Cast("Aspect of the Hawk");
                    }

                    if (Target.IsDistanceMoreThan(38))
                    {
                        Movement.MoveTo(CT.Location);
                    }
                    if (Me.IsMoving && Target.IsDistanceLessThan(35))
                    {
                        Movement.StopMoving();
                    }
                }

                return(RunStatus.Failure);
            }
Пример #30
0
        public override void Pulse()
        {
            //base.Pulse();

            // If Settings.DirtyData = true it will reload the settings from the XML file
            // This reads the XML file and re-populates the Settings class with any changed values
            if (!_isCCLoaded)
            {
                _isCCLoaded        = true;
                Settings.DirtyData = true;
            }
            if (Settings.DirtyData)
            {
                LoadSettings(true);
            }

            // So we don't overload HB the below code is only run once per second
            if (!Timers.Expired("Pulse", 1000))
            {
                return;
            }
            Timers.Reset("Pulse");

            if (Me.Combat)
            {
                Timers.Reset("Cheetah");
            }

            // Call and Heal Pet
            if (ClassHelpers.Hunter.Pet.NeedToFeedPet)
            {
                ClassHelpers.Hunter.Pet.FeedPet();
            }
            if (ClassHelpers.Hunter.Pet.NeedToHealPet)
            {
                ClassHelpers.Hunter.Pet.HealPet();
            }
            if (!Settings.PetSlot.Contains("never") && ClassHelpers.Hunter.Pet.NeedToCallPet)
            {
                ClassHelpers.Hunter.Pet.CallPet();
            }

            // Aspect of the Cheetah, Thundercats are go!
            if (ClassHelpers.Hunter.Aspect.CanUseAspectOfTheCheetah)
            {
                if (!Timers.Expired("Cheetah", 5000))
                {
                    return;
                }
                Timers.Reset("Cheetah");
                ClassHelpers.Hunter.Aspect.AspectOfTheCheetah();
            }

            // Consume Frenzy Effect so we don't loose the opportunity to use Focus Fire
            if (Settings.ConsumeFrenzyEffect.Contains("always") && Me.GotAlivePet)
            {
                if (Me.Pet.Auras.ContainsKey("Frenzy Effect") && !Settings.FocusFire.Contains("never") && Me.Pet.Auras["Frenzy Effect"].TimeLeft.Seconds <= 2 && Spell.CanCast("Focus Fire"))
                {
                    Utils.Log(String.Format("Consuming Pet's Frenzy Effect ({0} stacks) with Focus Fire. Lets not waste it", Me.Pet.Auras["Frenzy Effect"].StackCount), Utils.Colour("Red"));
                    Spell.Cast("Focus Fire");
                }
            }


            // Lets keep the fun going! Have the pet attack mobs while we're looting.
            if (CLC.ResultOK(Settings.ContinuousPulling))
            {
                int lootableMobs = LootTargeting.Instance.LootingList.Count;
                if (!Me.Combat && Self.IsHealthPercentAbove(Settings.RestHealth) && Me.GotAlivePet && !ClassHelpers.Hunter.Pet.NeedToHealPet && !Me.Pet.GotTarget && lootableMobs > 0)
                {
                    WoWUnit p = Utils.AttackableMobInRange(LevelbotSettings.Instance.PullDistance);

                    if (p != null)
                    {
                        p.Target();
                        Utils.Log(string.Format("Sending pet to attack {0} while we loot", p.Class), Utils.Colour("Red"));
                        if (Target.CanDebuffTarget("Hunter's Mark") && CLC.ResultOK(Settings.HuntersMark))
                        {
                            Spell.Cast("Hunter's Mark");
                        }
                        ClassHelpers.Hunter.Pet.Attack();
                    }
                }
            }
        }