* Fix BG start teams, make them even, send only corrent amount of invites. thanks Machiavelli for help
--HG-- branch : trunk
This commit is contained in:
@@ -653,16 +653,34 @@ void BattleGroundQueue::Update(uint32 bgTypeId, uint32 queue_id, uint8 arenatype
|
|||||||
|
|
||||||
std::list<GroupQueueInfo* >::iterator itr;
|
std::list<GroupQueueInfo* >::iterator itr;
|
||||||
|
|
||||||
|
//Send corrent ammount of invites to both faction at start of BG, not all in current queue, makes starting teams even
|
||||||
|
unsigned int QUEUED_HORDE = m_SelectionPools[NORMAL_HORDE].SelectedGroups.size();
|
||||||
|
unsigned int QUEUED_ALLIANCE= m_SelectionPools[NORMAL_ALLIANCE].SelectedGroups.size();
|
||||||
|
unsigned int maxbginvites = 0;
|
||||||
|
|
||||||
|
if(QUEUED_ALLIANCE <= QUEUED_HORDE)
|
||||||
|
maxbginvites = QUEUED_ALLIANCE;
|
||||||
|
else
|
||||||
|
maxbginvites = QUEUED_HORDE;
|
||||||
|
|
||||||
// invite groups from horde selection pool
|
// invite groups from horde selection pool
|
||||||
|
int invitecounter = 0;
|
||||||
for(itr = m_SelectionPools[NORMAL_HORDE].SelectedGroups.begin(); itr != m_SelectionPools[NORMAL_HORDE].SelectedGroups.end(); ++itr)
|
for(itr = m_SelectionPools[NORMAL_HORDE].SelectedGroups.begin(); itr != m_SelectionPools[NORMAL_HORDE].SelectedGroups.end(); ++itr)
|
||||||
{
|
{
|
||||||
|
if (invitecounter >= maxbginvites)
|
||||||
|
return;
|
||||||
InviteGroupToBG((*itr),bg2,HORDE);
|
InviteGroupToBG((*itr),bg2,HORDE);
|
||||||
|
++invitecounter;
|
||||||
}
|
}
|
||||||
|
|
||||||
// invite groups from ally selection pools
|
// invite groups from ally selection pool
|
||||||
|
invitecounter = 0;
|
||||||
for(itr = m_SelectionPools[NORMAL_ALLIANCE].SelectedGroups.begin(); itr != m_SelectionPools[NORMAL_ALLIANCE].SelectedGroups.end(); ++itr)
|
for(itr = m_SelectionPools[NORMAL_ALLIANCE].SelectedGroups.begin(); itr != m_SelectionPools[NORMAL_ALLIANCE].SelectedGroups.end(); ++itr)
|
||||||
{
|
{
|
||||||
|
if (invitecounter >= maxbginvites)
|
||||||
|
return;
|
||||||
InviteGroupToBG((*itr),bg2,ALLIANCE);
|
InviteGroupToBG((*itr),bg2,ALLIANCE);
|
||||||
|
++invitecounter;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isRated)
|
if (isRated)
|
||||||
|
|||||||
Reference in New Issue
Block a user