mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 08:33:47 +00:00
fix(Core/Battleground): fix queue issue (#3116)
* Remove useless code that was only causing issue to the BG queue * Prevent new Battlegrounds to start if there are already other Battlegrounds that have free slots Co-authored-by Yehonal <yehonal.azeroth@gmail.com>
This commit is contained in:
@@ -106,7 +106,7 @@ 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, 0x03, true, arenaRatedTeamId); // pussywizard: looking for opponents only for this team
|
||||
m_BattlegroundQueues[bgQueueTypeId].BattlegroundQueueUpdate(bracket_id, true, arenaRatedTeamId); // pussywizard: looking for opponents only for this team
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,14 +116,13 @@ void BattlegroundMgr::Update(uint32 diff)
|
||||
// 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), 0x03, true, 0); // pussywizard: 0 for rated means looking for opponents for every team
|
||||
m_BattlegroundQueues[qtype].BattlegroundQueueUpdate(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 (uint8 action = 1; action <= 2; ++action)
|
||||
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), action, false, 0);
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user