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

Closes #29405
This commit is contained in:
Shauren authored and Ovahlord committed 2023-12-04 22:06:32 +01:00
1 parent 679298cb59
commit 63f06c1157
1 file changed
+1 -4
+1 -4
View File
@@ -264,11 +264,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)