mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Prevent another crash in RandomTeleport
This commit is contained in:
parent
0033ae9968
commit
e177324a64
@ -1071,9 +1071,11 @@ void RandomPlayerbotMgr::RandomTeleport(Player* bot, std::vector<WorldLocation>&
|
|||||||
}
|
}
|
||||||
|
|
||||||
bot->GetMotionMaster()->Clear();
|
bot->GetMotionMaster()->Clear();
|
||||||
|
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
|
||||||
|
if (botAI)
|
||||||
|
botAI->Reset();
|
||||||
bot->TeleportTo(loc.GetMapId(), x, y, z, 0);
|
bot->TeleportTo(loc.GetMapId(), x, y, z, 0);
|
||||||
bot->SendMovementFlagUpdate();
|
bot->SendMovementFlagUpdate();
|
||||||
GET_PLAYERBOT_AI(bot)->Reset();
|
|
||||||
|
|
||||||
if (pmo)
|
if (pmo)
|
||||||
pmo->finish();
|
pmo->finish();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user