private void StartAttack() { if (WowInterface.ObjectManager.TargetGuid != 0 && WowInterface.ObjectManager.Target != null) { if (WowInterface.HookManager.GetUnitReaction(WowInterface.ObjectManager.Player, WowInterface.ObjectManager.Target) == WowUnitReaction.Friendly) { WowInterface.HookManager.ClearTarget(); return; } if (WowInterface.ObjectManager.Player.IsInMeleeRange(WowInterface.ObjectManager.Target)) { if (!WowInterface.ObjectManager.Player.IsAutoAttacking && AutoAttackEvent.Run()) { WowInterface.HookManager.StartAutoAttack(); } if (WowInterface.ObjectManager.Target.IsCasting && CustomCastSpell(pummelSpell)) { return; } if (CustomCastSpell(bloodrageSpell)) { return; } if (CustomCastSpell(berserkerRageSpell)) { return; } if (CustomCastSpell(recklessnessSpell, berserkerStanceSpell)) { return; } if (WowInterface.ObjectManager.Player.HealthPercentage <= 50 && CustomCastSpell(intimidatingShoutSpell)) { return; } if (WowInterface.ObjectManager.Player.HealthPercentage <= 60 && CustomCastSpell(retaliationSpell, battleStanceSpell)) { return; } if (WowInterface.ObjectManager.Player.HealthPercentage <= 50 && WowInterface.ObjectManager.Player.HasBuffByName("Enrage") && CustomCastSpell(enragedregenerationSpell)) { return; } if (WowInterface.ObjectManager.Target.GetType() == typeof(WowPlayer) && CustomCastSpell(disarmSpell, defensiveStanceSpell)) { return; } if (WowInterface.ObjectManager.Target.GetType() == typeof(WowPlayer) && !WowInterface.ObjectManager.Target.HasBuffByName("Hamstring") && CustomCastSpell(hamstringSpell)) { return; } if (VictoryRushEvent.Run() && CustomCastSpell(victoryRushSpell)) { return; } if ((WowInterface.ObjectManager.Target.HealthPercentage <= 20 && CustomCastSpell(executeSpell)) || (WowInterface.ObjectManager.Player.HasBuffByName("Sudden Death") && CustomCastSpell(executeSpell))) { return; } if (RendEvent.Run() && !WowInterface.ObjectManager.Target.HasBuffByName("Rend") && CustomCastSpell(rendSpell)) { return; } if (WowInterface.ObjectManager.Player.HasBuffByName("Taste for Blood") && CustomCastSpell(OverpowerSpell)) { return; } if (CustomCastSpell(MortalStrikeSpell)) { return; } if (CustomCastSpell(BladestormSpell)) { return; } { return; } if (!WowInterface.ObjectManager.Player.HasBuffByName("Battle Shout") && CustomCastSpell(battleShoutSpell)) { return; } } else//Range { if (CustomCastSpell(interceptSpell)) { return; } if (CustomCastSpell(chargeSpell, battleStanceSpell)) { return; } if (CustomCastSpell(heroicThrowSpell)) { return; } } } else { Targetselection(); } }
private void StartAttack() { if (WowInterface.ObjectManager.TargetGuid != 0) { if (WowInterface.HookManager.GetUnitReaction(WowInterface.ObjectManager.Player, WowInterface.ObjectManager.Target) == WowUnitReaction.Friendly) { WowInterface.HookManager.ClearTarget(); return; } if (WowInterface.ObjectManager.Player.IsInMeleeRange(WowInterface.ObjectManager.Target)) { if (!WowInterface.ObjectManager.Player.IsAutoAttacking && AutoAttackEvent.Run()) { WowInterface.HookManager.StartAutoAttack(); } if (CustomCastSpell(bloodrageSpell)) { return; } if (CustomCastSpell(berserkerRageSpell)) { return; } if (CustomCastSpell(deathWishSpell)) { return; } if (WowInterface.ObjectManager.Target.IsCasting && CustomCastSpell(pummelSpell)) { return; } if (WowInterface.ObjectManager.Target.GetType() == typeof(WowPlayer) && !WowInterface.ObjectManager.Target.HasBuffByName("Hamstring") && CustomCastSpell(hamstringSpell)) { return; } if (WowInterface.ObjectManager.Target.HealthPercentage <= 20 && CustomCastSpell(executeSpell)) { return; } if (WowInterface.ObjectManager.Player.HealthPercentage <= 50 && (WowInterface.ObjectManager.Player.HasBuffByName("Bloodrage") || WowInterface.ObjectManager.Player.HasBuffByName("Recklessness") || WowInterface.ObjectManager.Player.HasBuffByName("Berserker Rage"))) { if (CustomCastSpell(enragedregenerationSpell)) { return; } } if (WowInterface.ObjectManager.Player.HealthPercentage <= 50 && CustomCastSpell(intimidatingShoutSpell)) { return; } if (WowInterface.ObjectManager.Player.HealthPercentage <= 60 && CustomCastSpell(retaliationSpell, battleStanceSpell)) { return; } if (WowInterface.ObjectManager.Target.GetType() == typeof(WowPlayer) && CustomCastSpell(disarmSpell, defensiveStanceSpell)) { return; } if (WowInterface.ObjectManager.Player.HasBuffByName("Slam!") && CustomCastSpell(slamSpell) && CustomCastSpell(recklessnessSpell)) { return; } if (CustomCastSpell(whirlwindSpell)) { return; } if (CustomCastSpell(bloodthirstSpell)) { return; } if (VictoryRushEvent.Run() && CustomCastSpell(victoryRushSpell)) { return; } if (RendEvent.Run() && !WowInterface.ObjectManager.Target.HasBuffByName("Rend") && CustomCastSpell(rendSpell)) { return; } if (HeroicStrikeEvent.Run() && WowInterface.ObjectManager.Player.Rage >= 60 && CustomCastSpell(heroicStrikeSpell)) { return; } IEnumerable <WowUnit> unitsNearPlayer = WowInterface.ObjectManager.GetNearEnemies <WowUnit>(WowInterface.ObjectManager.Player.Position, 5); if (unitsNearPlayer != null) { if (unitsNearPlayer.Count() >= 3 && WowInterface.ObjectManager.Player.Rage >= 50 && CustomCastSpell(cleaveSpell)) { return; } } if (!WowInterface.ObjectManager.Player.HasBuffByName("Battle Shout") && CustomCastSpell(battleShoutSpell)) { return; } } else//Range { if (CustomCastSpell(interceptSpell)) { return; } if (CustomCastSpell(chargeSpell, battleStanceSpell)) { return; } if (CustomCastSpell(heroicThrowSpell)) { return; } } } else { Targetselection(); } }