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)
This commit is contained in:
hondacrx
2022-05-30 14:00:04 -04:00
parent 3beab79944
commit 8c7400e790
+3 -1
View File
@@ -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();