diff options
| author | Gildor <gildor55@gmail.com> | 2021-11-16 11:46:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-16 11:46:07 +0100 |
| commit | 6c512113d35a493a420eeb1c3bf6c01253003d7b (patch) | |
| tree | 27933ca8a6febd4b0fa9d783418436b565b000a0 | |
| parent | e0f1bdcd89f3c6aaa53f4c88046fce04148ab371 (diff) | |
Core/Battlegrounds: Avoid increasing player count per team when re-logging if player was already in the BG (#27266)
| -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 34024933298..325b762abcb 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -991,10 +991,12 @@ void Battleground::AddPlayer(Player* player) bp.OfflineRemoveTime = 0; bp.Team = team; + 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 WorldPacket data; sBattlegroundMgr->BuildPlayerJoinedBattlegroundPacket(&data, player); |
