disable heavy-cost rpg action

This commit is contained in:
Yunfan Li
2023-07-29 10:55:54 +08:00
parent 7bd7c46088
commit 944e0fa1ed
4 changed files with 14 additions and 9 deletions

View File

@@ -50,9 +50,14 @@ Unit* GrindTargetValue::FindTargetForGrinding(uint32 assistCount)
for (ObjectGuid const guid : targets)
{
Unit* unit = botAI->GetUnit(guid);
if (!unit)
continue;
if (!bot->IsHostileTo(unit) && unit->GetNpcFlags() != UNIT_NPC_FLAG_NONE) {
continue;
}
if (abs(bot->GetPositionZ() - unit->GetPositionZ()) > sPlayerbotAIConfig->spellDistance)
continue;