mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
feat(Core/Battlegrounds): Implemented new timed config for queue anno… (#8053)
* feat(Core/Battlegrounds): Implemented new timed config for queue announce system. Closes #6637. * Update. * typo. * Update.
This commit is contained in:
@@ -105,25 +105,25 @@ void BattlegroundMgr::Update(uint32 diff)
|
||||
uint32 arenaRatedTeamId = scheduled[i] >> 32;
|
||||
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundQueueTypeId(scheduled[i] >> 16 & 255);
|
||||
BattlegroundBracketId bracket_id = BattlegroundBracketId(scheduled[i] & 255);
|
||||
m_BattlegroundQueues[bgQueueTypeId].BattlegroundQueueUpdate(bracket_id, true, arenaRatedTeamId); // pussywizard: looking for opponents only for this team
|
||||
m_BattlegroundQueues[bgQueueTypeId].BattlegroundQueueUpdate(diff, bracket_id, true, arenaRatedTeamId); // pussywizard: looking for opponents only for this team
|
||||
}
|
||||
}
|
||||
|
||||
// periodic queue update
|
||||
if (m_NextPeriodicQueueUpdateTime < diff)
|
||||
{
|
||||
m_NextPeriodicQueueUpdateTime = 5 * IN_MILLISECONDS;
|
||||
|
||||
// for rated arenas
|
||||
for (uint32 qtype = BATTLEGROUND_QUEUE_2v2; qtype < MAX_BATTLEGROUND_QUEUE_TYPES; ++qtype)
|
||||
for (uint32 bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket)
|
||||
m_BattlegroundQueues[qtype].BattlegroundQueueUpdate(BattlegroundBracketId(bracket), true, 0); // pussywizard: 0 for rated means looking for opponents for every team
|
||||
m_BattlegroundQueues[qtype].BattlegroundQueueUpdate(m_NextPeriodicQueueUpdateTime, BattlegroundBracketId(bracket), true, 0); // pussywizard: 0 for rated means looking for opponents for every team
|
||||
|
||||
// for battlegrounds and not rated arenas
|
||||
// in first loop try to fill already running battlegrounds, then in a second loop try to create new battlegrounds
|
||||
for (uint32 qtype = BATTLEGROUND_QUEUE_AV; qtype < MAX_BATTLEGROUND_QUEUE_TYPES; ++qtype)
|
||||
for (uint32 bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket)
|
||||
m_BattlegroundQueues[qtype].BattlegroundQueueUpdate(BattlegroundBracketId(bracket), false, 0);
|
||||
|
||||
m_NextPeriodicQueueUpdateTime = 5 * IN_MILLISECONDS;
|
||||
m_BattlegroundQueues[qtype].BattlegroundQueueUpdate(m_NextPeriodicQueueUpdateTime, BattlegroundBracketId(bracket), false, 0);
|
||||
}
|
||||
else
|
||||
m_NextPeriodicQueueUpdateTime -= diff;
|
||||
|
||||
Reference in New Issue
Block a user