Core/Battlefield: Fixed using invalidated iterator when a player queued for wintergrasp is inside a battleground

Closes #29405

(cherry picked from commit 63cbef9e893d19318e97aab67dff7bc7e82e6544)
This commit is contained in:
Shauren
2026-05-26 23:08:27 +02:00
parent 970a3dec18
commit c7cc9fb6b0
+1 -4
View File
@@ -243,11 +243,8 @@ void Battlefield::InvitePlayerToWar(Player* player)
if (player->IsInFlight())
return;
if (player->InArena() || player->GetBattleground())
{
m_PlayersInQueue[player->GetTeamId()].erase(player->GetGUID());
if (player->GetBattleground())
return;
}
// If the player does not match minimal level requirements for the battlefield, kick him
if (player->GetLevel() < m_MinLevel)