fix hunter auto shot

This commit is contained in:
Yunfan Li
2023-07-30 15:46:11 +08:00
parent ced13e5370
commit 252b2f259c
6 changed files with 9 additions and 8 deletions

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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()

View File

@@ -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)

View File

@@ -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

View File

@@ -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