From 8c7400e79005cbec88a58761fcf810baacc7103a Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 30 May 2022 14:00:04 -0400 Subject: [PATCH] Core/Battlegrounds: Avoid increasing player count per team when re-logging if player was already in the BG Port From (https://github.com/TrinityCore/TrinityCore/commit/1b56e13e87ddc2d62de6fd29f85f54e2903f6813) --- Source/Game/BattleGrounds/BattleGround.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Game/BattleGrounds/BattleGround.cs b/Source/Game/BattleGrounds/BattleGround.cs index ad4853d5e..ec42f53f7 100644 --- a/Source/Game/BattleGrounds/BattleGround.cs +++ b/Source/Game/BattleGrounds/BattleGround.cs @@ -993,10 +993,12 @@ namespace Game.BattleGrounds bp.Team = team; bp.ActiveSpec = (int)player.GetPrimarySpecialization(); + bool isInBattleground = IsPlayerInBattleground(player.GetGUID()); // Add to list/maps m_Players[guid] = bp; - UpdatePlayersCountByTeam(team, false); // +1 player + if (!isInBattleground) + UpdatePlayersCountByTeam(team, false); // +1 player BattlegroundPlayerJoined playerJoined = new(); playerJoined.Guid = player.GetGUID();