fix(Core/Battlegrounds): fill existing BGs instead of starting duplicates (#26585)

This commit is contained in:
Francesco Borzì
2026-07-15 02:20:43 +02:00
committed by GitHub
parent 586775375a
commit 142b2ba67c
3 changed files with 4 additions and 3 deletions
@@ -554,6 +554,8 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket& recvData)
// leaks forever, permanently skewing team selection and blocking the
// empty instance's cleanup.
bg->DecreaseInvitedCount(teamId);
if (bg->HasFreeSlots())
bg->AddToBGFreeSlotQueue();
_player->RemoveBattlegroundQueueId(bgQueueTypeId);
_player->SetBattlegroundId(0, BATTLEGROUND_TYPE_NONE, PLAYER_MAX_BATTLEGROUND_QUEUES, false, false, TEAM_NEUTRAL);