From 3bcd9cac2b4618abcf9a95b108a736a7fb2c91ca Mon Sep 17 00:00:00 2001 From: Jonas Ornfelt Date: Tue, 10 Nov 2026 17:52:08 +0100 Subject: [PATCH] Count players joining a battleground before adding them to the player map AddPlayer() inserted the player into m_Players and then asked IsPlayerInBattleGround(), which looks the player up in that same map, so it always returned true and the team counts never increased. With BattleGround.PrematureFinishTimer set, every battleground then ended with a premature finish once the timer ran out after the start. --- src/game/BattleGround/BattleGround.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/BattleGround/BattleGround.cpp b/src/game/BattleGround/BattleGround.cpp index e606ecc55..5fda1dd45 100644 --- a/src/game/BattleGround/BattleGround.cpp +++ b/src/game/BattleGround/BattleGround.cpp @@ -919,10 +919,12 @@ void BattleGround::AddPlayer(Player* plr) bp.OfflineRemoveTime = 0; bp.PlayerTeam = team; + // A player re-logging into the battleground is already counted + bool const isInBattleground = IsPlayerInBattleGround(guid); + // Add to list/maps m_Players[guid] = bp; - bool const isInBattleground = IsPlayerInBattleGround(guid); if (!isInBattleground) { UpdatePlayersCountByTeam(team, false); // +1 player