aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorGildor <gildor55@gmail.com>2023-01-20 17:33:21 +0100
committerShauren <shauren.trinity@gmail.com>2023-02-09 10:31:48 +0100
commit0e76b4ab9dae9547a1b8e56014affd8bda230dbd (patch)
treeb254df7428b1760ac6aa11f64b9c436f99730c5f /src/server
parent0aa153c6fe0ff8b9aa8291feaa566c85734ec183 (diff)
Core/Battlegrounds: Prevent end Arena when a dead player logout (#28766)
(cherry picked from commit aeb4d18e20c444e828ecff0964013d3d8daf67d9)
Diffstat (limited to 'src/server')
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 00f03068dc0..0bca373d715 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -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()));
}