mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-07-11 03:13:10 +00:00
Core/Custom: Let the leaders be leaders
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user