Merge pull request #601 from hermensbas/feature/minor_istaxiflying_method_usage

Replaced isTaxiFlying check with new function
This commit is contained in:
bash
2024-10-14 00:49:52 +02:00
committed by GitHub

View File

@@ -1236,9 +1236,7 @@ void RandomPlayerbotMgr::RandomTeleport(Player* bot, std::vector<WorldLocation>&
if (botAI)
{
// ignore when in when taxi with boat/zeppelin and has players nearby
if (bot->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) &&
bot->HasUnitState(UNIT_STATE_IGNORE_PATHFINDING) &&
botAI->HasPlayerNearby())
if (botAI->IsTaxiFlying() && botAI->HasPlayerNearby())
return;
}