From 16ef20cd3e23aa38d4c373ff6a0fe991199ff69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E8=8C=B9?= Date: Thu, 31 Mar 2022 09:22:58 -0600 Subject: [PATCH] Prevent invalid BGJoinAction --- src/strategy/actions/BattleGroundJoinAction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strategy/actions/BattleGroundJoinAction.cpp b/src/strategy/actions/BattleGroundJoinAction.cpp index 6566b5ac..b1da30f2 100644 --- a/src/strategy/actions/BattleGroundJoinAction.cpp +++ b/src/strategy/actions/BattleGroundJoinAction.cpp @@ -411,8 +411,8 @@ bool BGJoinAction::isUseful() bool BGJoinAction::JoinQueue(uint32 type) { - // ignore if player is already in BG - if (bot->InBattleground()) + // ignore if player is already in BG, is logging out, or already being teleport + if (!bot || (!bot->IsInWorld() && !bot->IsBeingTeleported()) || bot->InBattleground()) return false; // get BG TypeId