From 05f71afa4eb8baf72210750de102501ff088aa08 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 12 Feb 2023 02:06:29 -0500 Subject: [PATCH] Core/Battlegrounds: Prevent end Arena when a dead player logout Port From (https://github.com/TrinityCore/TrinityCore/commit/0e76b4ab9dae9547a1b8e56014affd8bda230dbd) --- Source/Game/BattleGrounds/BattleGround.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Game/BattleGrounds/BattleGround.cs b/Source/Game/BattleGrounds/BattleGround.cs index 9b893f4ef..3eca086f6 100644 --- a/Source/Game/BattleGrounds/BattleGround.cs +++ b/Source/Game/BattleGrounds/BattleGround.cs @@ -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())); }