diff options
author | Wilds <ivoselva@gmail.com> | 2011-12-25 09:32:09 +0100 |
---|---|---|
committer | Wilds <ivoselva@gmail.com> | 2011-12-25 09:32:09 +0100 |
commit | 711a5793bc8bffbd78da20ae4c05d3bf13bdc273 (patch) | |
tree | 3caa5db66aad85e16140f407d6b9ef8430a32a32 /src | |
parent | 64a2a29506591f09eeaef86ecf839e49a07e69d3 (diff) |
Core/Battleground: fix invite accept wait timer (m_events must be always updated, not only when schedule)
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Battlegrounds/BattlegroundMgr.cpp | 4 | ||||
-rwxr-xr-x | src/server/game/Battlegrounds/BattlegroundQueue.cpp | 7 | ||||
-rwxr-xr-x | src/server/game/Battlegrounds/BattlegroundQueue.h | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index a9acced82ae..b1a708b3d7f 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -116,6 +116,10 @@ void BattlegroundMgr::Update(uint32 diff) } } + // update events timer + for (int qtype = BATTLEGROUND_QUEUE_NONE; qtype < MAX_BATTLEGROUND_QUEUE_TYPES; ++qtype) + m_BattlegroundQueues[qtype].UpdateEvents(diff); + // update scheduled queues if (!m_QueueUpdateScheduler.empty()) { diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 0d76759e1be..963a41435c7 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -721,6 +721,11 @@ bool BattlegroundQueue::CheckSkirmishForSameFaction(BattlegroundBracketId bracke return true; } +void BattlegroundQueue::UpdateEvents(uint32 diff) +{ + m_events.Update(diff); +} + /* this method is called when group is inserted, or player / group is removed from BG Queue - there is only one player's status changed, so we don't use while (true) cycles to invite whole queue it must be called after fully adding the members of a group to ensure group joining @@ -728,8 +733,6 @@ should be called from Battleground::RemovePlayer function in some cases */ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id, uint8 arenaType, bool isRated, uint32 arenaRating) { - m_events.Update(diff); - //if no players in queue - do nothing if (m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].empty() && m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].empty() && diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h index 6b19c23ca68..38c1d93bd7c 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.h +++ b/src/server/game/Battlegrounds/BattlegroundQueue.h @@ -70,6 +70,7 @@ class BattlegroundQueue ~BattlegroundQueue(); void BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id, uint8 arenaType = 0, bool isRated = false, uint32 minRating = 0); + void UpdateEvents(uint32 diff); void FillPlayersToBG(Battleground* bg, BattlegroundBracketId bracket_id); bool CheckPremadeMatch(BattlegroundBracketId bracket_id, uint32 MinPlayersPerTeam, uint32 MaxPlayersPerTeam); |