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)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user