fix(Core/Misc): Remove from LFG/batleground queues when teleported to battleground/LFG dungeon. (#10740)

Players cannot queue up for battleground during LFG dungeon.
Players cannot queue up for LFG dungeon during battleground/arena match.
Fixes #10635
This commit is contained in:
UltraNix
2022-02-20 16:33:04 +01:00
committed by GitHub
parent 3e6424151a
commit 9d12652c3e
4 changed files with 57 additions and 20 deletions

View File

@@ -438,6 +438,9 @@ public:
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_IN_PROGRESS, 0, bg->GetStartTime(), bg->GetArenaType(), teamId);
player->GetSession()->SendPacket(&data);
// Remove from LFG queues
sLFGMgr->LeaveAllLfgQueues(player->GetGUID(), false);
player->SetBattlegroundId(bg->GetInstanceID(), bgTypeId, queueSlot, true, false, teamId);
sBattlegroundMgr->SendToBattleground(player, bg->GetInstanceID(), bgTypeId);
}