Prevent invalid BGJoinAction

This commit is contained in:
郑佩茹
2022-03-31 09:22:58 -06:00
parent 297f11d3e5
commit 16ef20cd3e

View File

@@ -411,8 +411,8 @@ bool BGJoinAction::isUseful()
bool BGJoinAction::JoinQueue(uint32 type) bool BGJoinAction::JoinQueue(uint32 type)
{ {
// ignore if player is already in BG // ignore if player is already in BG, is logging out, or already being teleport
if (bot->InBattleground()) if (!bot || (!bot->IsInWorld() && !bot->IsBeingTeleported()) || bot->InBattleground())
return false; return false;
// get BG TypeId // get BG TypeId