mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
fix hunter auto shot
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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<Unit*>* CastScareBeastCcAction::GetTargetValue()
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
|
||||
void HunterBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& 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<TriggerNode*>& triggers)
|
||||
|
||||
@@ -17,7 +17,7 @@ class HealPriestStrategy : public GenericPriestStrategy
|
||||
void InitTriggers(std::vector<TriggerNode*>& 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
|
||||
|
||||
@@ -17,7 +17,7 @@ class HolyPriestStrategy : public HealPriestStrategy
|
||||
NextAction** getDefaultActions() override;
|
||||
void InitTriggers(std::vector<TriggerNode*>& 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
|
||||
|
||||
Reference in New Issue
Block a user