From 49b5f58f13137333c4de57e5ba9fc7f457e75334 Mon Sep 17 00:00:00 2001 From: Meltie2013 Date: Tue, 16 Nov 2021 15:39:51 -0600 Subject: [PATCH] Avoid increasing player count per team when re-logging (#165) --- src/game/BattleGround/BattleGround.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game/BattleGround/BattleGround.cpp b/src/game/BattleGround/BattleGround.cpp index 6f073a6f..bbb703fe 100644 --- a/src/game/BattleGround/BattleGround.cpp +++ b/src/game/BattleGround/BattleGround.cpp @@ -1309,7 +1309,11 @@ void BattleGround::AddPlayer(Player* plr) // Add to list/maps m_Players[guid] = bp; - UpdatePlayersCountByTeam(team, false); // +1 player + bool const isInBattleground = IsPlayerInBattleGround(guid); + if (!isInBattleground) + { + UpdatePlayersCountByTeam(team, false); // +1 player + } WorldPacket data; sBattleGroundMgr.BuildPlayerJoinedBattleGroundPacket(&data, plr);