mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Battlegrounds: Prevent end Arena when a dead player logout (#28766)
(cherry picked from commit aeb4d18e20)
This commit is contained in:
@@ -1218,8 +1218,8 @@ void Battleground::EventPlayerLoggedOut(Player* player)
|
||||
// drop flag and handle other cleanups
|
||||
RemovePlayer(player, guid, GetPlayerTeam(guid));
|
||||
|
||||
// 1 player is logging out, if it is the last, then end arena!
|
||||
if (isArena())
|
||||
// 1 player is logging out, if it is the last alive, then end arena!
|
||||
if (isArena() && player->IsAlive())
|
||||
if (GetAlivePlayersCountByTeam(player->GetBGTeam()) <= 1 && GetPlayersCountByTeam(GetOtherTeam(player->GetBGTeam())))
|
||||
EndBattleground(GetOtherTeam(player->GetBGTeam()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user