diff options
author | Gildor <gildor55@gmail.com> | 2021-11-16 11:46:07 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-03-22 00:17:33 +0100 |
commit | 1b56e13e87ddc2d62de6fd29f85f54e2903f6813 (patch) | |
tree | 79e50a549ee91fea6cf688b775ce7dcff4ac6b5a | |
parent | d6ec0afc78055294b9d701d114bd4d3ea571e953 (diff) |
Core/Battlegrounds: Avoid increasing player count per team when re-logging if player was already in the BG (#27266)
(cherry picked from commit 6c512113d35a493a420eeb1c3bf6c01253003d7b)
-rw-r--r-- | src/server/game/Battlegrounds/Battleground.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 001c186e820..8bf9867a4d3 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1046,10 +1046,12 @@ void Battleground::AddPlayer(Player* player) bp.Team = team; bp.ActiveSpec = player->GetPrimarySpecialization(); + bool const isInBattleground = IsPlayerInBattleground(player->GetGUID()); // Add to list/maps m_Players[player->GetGUID()] = bp; - UpdatePlayersCountByTeam(team, false); // +1 player + if (!isInBattleground) + UpdatePlayersCountByTeam(team, false); // +1 player WorldPackets::Battleground::BattlegroundPlayerJoined playerJoined; playerJoined.Guid = player->GetGUID(); |