Core/Battlegrounds: Prevent end Arena when a dead player logout

Port From (https://github.com/TrinityCore/TrinityCore/commit/0e76b4ab9dae9547a1b8e56014affd8bda230dbd)
This commit is contained in:
hondacrx
2023-02-12 02:06:29 -05:00
parent 913614754d
commit 05f71afa4e
+2 -2
View File
@@ -1152,8 +1152,8 @@ namespace Game.BattleGrounds
// 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())) != 0)
EndBattleground(GetOtherTeam(player.GetBGTeam()));
}