aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGildor <gildor55@gmail.com>2023-01-20 17:33:21 +0100
committerGitHub <noreply@github.com>2023-01-20 17:33:21 +0100
commitaeb4d18e20c444e828ecff0964013d3d8daf67d9 (patch)
treebb87f17c0dbeaed4d3c034a4c9e7f0e9b3a2b3ad /src
parent835e2918319ed20109992086311a2c146140937f (diff)
Core/Battlegrounds: Prevent end Arena when a dead player logout (#28766)
Diffstat (limited to 'src')
-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 234148b02fb..7377caa7943 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -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()));
}