Make backwards movement for flee

This commit is contained in:
Yunfan Li
2024-12-29 23:21:03 +08:00
parent adc0d6e72c
commit 79a5fdd7c1
5 changed files with 52 additions and 19 deletions

View File

@@ -4115,11 +4115,16 @@ inline bool ZoneHasRealPlayers(Player* bot)
return false;
}
for (auto& player : sRandomPlayerbotMgr->GetPlayers())
for (Player* player : sRandomPlayerbotMgr->GetPlayers())
{
if (player->GetMapId() != bot->GetMapId())
continue;
if (player->IsGameMaster() && !player->IsVisible())
{
continue;
}
if (player->GetZoneId() == bot->GetZoneId())
{
PlayerbotAI* botAI = GET_PLAYERBOT_AI(player);