mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 23:50:44 +01:00
Core/Battlefield: Fixed using invalidated iterator when a player queued for wintergrasp is inside a battleground
Closes #29405
This commit is contained in:
@@ -265,11 +265,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)
|
||||
|
||||
Reference in New Issue
Block a user