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:
@@ -993,10 +993,12 @@ namespace Game.BattleGrounds
|
|||||||
bp.Team = team;
|
bp.Team = team;
|
||||||
bp.ActiveSpec = (int)player.GetPrimarySpecialization();
|
bp.ActiveSpec = (int)player.GetPrimarySpecialization();
|
||||||
|
|
||||||
|
bool isInBattleground = IsPlayerInBattleground(player.GetGUID());
|
||||||
// Add to list/maps
|
// Add to list/maps
|
||||||
m_Players[guid] = bp;
|
m_Players[guid] = bp;
|
||||||
|
|
||||||
UpdatePlayersCountByTeam(team, false); // +1 player
|
if (!isInBattleground)
|
||||||
|
UpdatePlayersCountByTeam(team, false); // +1 player
|
||||||
|
|
||||||
BattlegroundPlayerJoined playerJoined = new();
|
BattlegroundPlayerJoined playerJoined = new();
|
||||||
playerJoined.Guid = player.GetGUID();
|
playerJoined.Guid = player.GetGUID();
|
||||||
|
|||||||
Reference in New Issue
Block a user