Avoid increasing player count per team when re-logging (#165)

This commit is contained in:
Meltie2013 2021-11-16 15:39:51 -06:00 committed by GitHub
parent 53a6a9d176
commit 49b5f58f13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1309,7 +1309,11 @@ void BattleGround::AddPlayer(Player* plr)
// Add to list/maps
m_Players[guid] = bp;
UpdatePlayersCountByTeam(team, false); // +1 player
bool const isInBattleground = IsPlayerInBattleGround(guid);
if (!isInBattleground)
{
UpdatePlayersCountByTeam(team, false); // +1 player
}
WorldPacket data;
sBattleGroundMgr.BuildPlayerJoinedBattleGroundPacket(&data, plr);