mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Battlegrounds: Avoid increasing player count per team when re-logging if player was already in the BG (#27266)
(cherry picked from commit 6c512113d3)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user