target && hunter auto shoot

This commit is contained in:
Yunfan Li
2023-10-22 15:19:12 +08:00
parent 45d0ae00ab
commit e727397963
2 changed files with 19 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ bool CastAutoShotAction::isUseful()
if (botAI->IsInVehicle() && !botAI->IsInVehicle(false, false, true))
return false;
if (bot->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL)) {
if (bot->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL) && bot->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL)->m_targets.GetUnitTargetGUID() == AI_VALUE(Unit*, "current target")->GetGUID()) {
return false;
}
return AI_VALUE(uint32, "active spell") != AI_VALUE2(uint32, "spell id", getName());