Core/Custom: Let the leaders be leaders

This commit is contained in:
mik1893
2016-07-29 08:52:12 +01:00
parent 1364696651
commit b02b94dceb
@@ -439,14 +439,14 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
uint32 allyCount = bg->GetPlayersCountByTeam(TEAM_ALLIANCE);
uint32 hordeCount = bg->GetPlayersCountByTeam(TEAM_HORDE);
if (allyCount == hordeCount)
if (allyCount && hordeCount && allyCount == hordeCount)
{
if (roll_chance_i(50))
teamId = _player->GetTeamId(true) == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE;
}
else if (allyCount < hordeCount)
teamId = TEAM_ALLIANCE;
else
else if (hordeCount < allyCount)
teamId = TEAM_HORDE;
// [/AZTH]