[Class spell] Aoe threat check

This commit is contained in:
Yunfan Li
2024-07-07 21:51:19 +08:00
parent 32d30eaf6b
commit 7325ba7dcb
7 changed files with 8 additions and 6 deletions

View File

@@ -74,7 +74,7 @@ bool PartyMemberToHeal::Check(Unit* player)
{
// return player && player != bot && player->GetMapId() == bot->GetMapId() && player->IsInWorld() &&
// sServerFacade->GetDistance2d(bot, player) < (player->IsPlayer() && botAI->IsTank((Player*)player) ? 50.0f : 40.0f);
return player->GetMapId() == bot->GetMapId() &&
return player->GetMapId() == bot->GetMapId() && !player->IsCharmed() &&
bot->GetDistance2d(player) < sPlayerbotAIConfig->healDistance * 2 &&
bot->IsWithinLOS(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
}