mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Battlegrounds: Prevent end Arena when a dead player logout (#28766)
This commit is contained in:
@@ -1097,8 +1097,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