pet react state & reach target for autoshoot

This commit is contained in:
Yunfan Li
2023-07-14 16:58:50 +08:00
parent 63573b5c7e
commit 86f7a6e9d1
2 changed files with 4 additions and 4 deletions

View File

@@ -16,8 +16,9 @@ bool ReachTargetAction::Execute(Event event)
bool ReachTargetAction::isUseful()
{
// do not move while casting
if (bot->IsNonMeleeSpellCast(true))
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL) != nullptr) {
return false;
}
return AI_VALUE2(float, "distance", GetTargetName()) > (distance + sPlayerbotAIConfig->contactDistance);
}