Fix crash in Refresh PlayerbotAI method

This commit is contained in:
郑佩茹
2022-03-25 13:20:50 -06:00
parent bb737ed928
commit 246b5b021d

View File

@@ -1350,6 +1350,9 @@ uint32 RandomPlayerbotMgr::GetZoneLevel(uint16 mapId, float teleX, float teleY,
void RandomPlayerbotMgr::Refresh(Player* bot) void RandomPlayerbotMgr::Refresh(Player* bot)
{ {
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot); PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
if (!botAI)
return;
if (bot->isDead()) if (bot->isDead())
{ {
bot->ResurrectPlayer(1.0f); bot->ResurrectPlayer(1.0f);