diff --git a/src/strategy/actions/AttackAction.cpp b/src/strategy/actions/AttackAction.cpp index eedd6ea7..a7ca6096 100644 --- a/src/strategy/actions/AttackAction.cpp +++ b/src/strategy/actions/AttackAction.cpp @@ -120,7 +120,7 @@ bool AttackAction::Attack(Unit* target, bool with_pet /*true*/) if (IsMovingAllowed() && !bot->HasInArc(CAST_ANGLE_IN_FRONT, target)) bot->SetFacingToObject(target); - bool attacked = bot->Attack(target, !botAI->IsRanged(bot)); + bool attacked = bot->Attack(target, true); botAI->ChangeEngine(BOT_STATE_COMBAT); return attacked; diff --git a/src/strategy/hunter/DpsHunterStrategy.cpp b/src/strategy/hunter/DpsHunterStrategy.cpp index 07d0f92a..eb76908a 100644 --- a/src/strategy/hunter/DpsHunterStrategy.cpp +++ b/src/strategy/hunter/DpsHunterStrategy.cpp @@ -37,8 +37,8 @@ NextAction** DpsHunterStrategy::getDefaultActions() new NextAction("aimed shot", 14.0f), new NextAction("arcane shot", 13.0f), new NextAction("steady shot", 12.0f), - new NextAction("auto shot", 10.0f), - NULL); + new NextAction("auto shot", 10.0f), + nullptr); // return NextAction::array(0, new NextAction("explosive shot", 11.0f), new NextAction("auto shot", 10.0f), new NextAction("auto attack", 9.0f), nullptr); } diff --git a/src/strategy/hunter/HunterActions.cpp b/src/strategy/hunter/HunterActions.cpp index 1bbe3d3d..9ce55fea 100644 --- a/src/strategy/hunter/HunterActions.cpp +++ b/src/strategy/hunter/HunterActions.cpp @@ -35,7 +35,7 @@ bool CastAutoShotAction::isUseful() if (botAI->IsInVehicle() && !botAI->IsInVehicle(false, false, true)) return false; - return botAI->HasStrategy("ranged", BOT_STATE_COMBAT) && AI_VALUE(uint32, "active spell") != AI_VALUE2(uint32, "spell id", getName()); + return AI_VALUE(uint32, "active spell") != AI_VALUE2(uint32, "spell id", getName()); } Value* CastScareBeastCcAction::GetTargetValue() diff --git a/src/strategy/hunter/HunterBuffStrategies.cpp b/src/strategy/hunter/HunterBuffStrategies.cpp index 739e8e5a..cc7f2b68 100644 --- a/src/strategy/hunter/HunterBuffStrategies.cpp +++ b/src/strategy/hunter/HunterBuffStrategies.cpp @@ -7,8 +7,9 @@ void HunterBuffDpsStrategy::InitTriggers(std::vector& triggers) { - triggers.push_back(new TriggerNode("aspect of the hawk", NextAction::array(0, new NextAction("aspect of the dragonhawk", 90.0f), nullptr))); - triggers.push_back(new TriggerNode("aspect of the hawk", NextAction::array(0, new NextAction("aspect of the hawk", 90.0f), nullptr))); + triggers.push_back(new TriggerNode("aspect of the hawk", NextAction::array(0, + new NextAction("aspect of the dragonhawk", 90.0f), + new NextAction("aspect of the hawk", 89.0f),nullptr))); } void HunterNatureResistanceStrategy::InitTriggers(std::vector& triggers) diff --git a/src/strategy/priest/HealPriestStrategy.h b/src/strategy/priest/HealPriestStrategy.h index baffcfa5..59b95dcb 100644 --- a/src/strategy/priest/HealPriestStrategy.h +++ b/src/strategy/priest/HealPriestStrategy.h @@ -17,7 +17,7 @@ class HealPriestStrategy : public GenericPriestStrategy void InitTriggers(std::vector& triggers) override; NextAction** getDefaultActions() override; std::string const getName() override { return "heal"; } - uint32 GetType() const override { return STRATEGY_TYPE_HEAL; } + uint32 GetType() const override { return STRATEGY_TYPE_HEAL | STRATEGY_TYPE_RANGED; } }; #endif diff --git a/src/strategy/priest/HolyPriestStrategy.h b/src/strategy/priest/HolyPriestStrategy.h index ea25cbcd..39173069 100644 --- a/src/strategy/priest/HolyPriestStrategy.h +++ b/src/strategy/priest/HolyPriestStrategy.h @@ -17,7 +17,7 @@ class HolyPriestStrategy : public HealPriestStrategy NextAction** getDefaultActions() override; void InitTriggers(std::vector& triggers) override; std::string const getName() override { return "holy"; } - uint32 GetType() const override { return STRATEGY_TYPE_DPS|STRATEGY_TYPE_RANGED; } + uint32 GetType() const override { return STRATEGY_TYPE_DPS | STRATEGY_TYPE_RANGED; } }; #endif