diff options
| author | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-01-02 14:12:48 +0100 |
|---|---|---|
| committer | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-01-02 14:12:48 +0100 |
| commit | b873156c3c1654553319158275f29ac2f818f3ce (patch) | |
| tree | 204be4b38ee32328a980fe65b46e41336c5a38e8 /src/server/game/Instances/InstanceSaveMgr.cpp | |
| parent | 05efdaf39349f057eabf58252532dff76511e7ef (diff) | |
| parent | ebd14b4f01cc64a2a488bdbb1046897cc4da8e9a (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps
Conflicts:
src/server/game/Movement/Spline/MoveSplineInit.h
Diffstat (limited to 'src/server/game/Instances/InstanceSaveMgr.cpp')
| -rw-r--r-- | src/server/game/Instances/InstanceSaveMgr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index ca09a570beb..81b148d8eaf 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -295,6 +295,7 @@ void InstanceSaveManager::LoadResetTimes() // index instance ids by map/difficulty pairs for fast reset warning send typedef std::multimap<uint32 /*PAIR32(map, difficulty)*/, uint32 /*instanceid*/ > ResetTimeMapDiffInstances; + typedef std::pair<ResetTimeMapDiffInstances::const_iterator, ResetTimeMapDiffInstances::const_iterator> ResetTimeMapDiffInstancesBounds; ResetTimeMapDiffInstances mapDiffResetInstances; QueryResult result = CharacterDatabase.Query("SELECT id, map, difficulty, resettime FROM instance ORDER BY id ASC"); @@ -378,8 +379,6 @@ void InstanceSaveManager::LoadResetTimes() } while (result->NextRow()); } - ResetTimeMapDiffInstances::const_iterator in_itr; - // calculate new global reset times for expired instances and those that have never been reset yet // add the global reset times to the priority queue for (MapDifficultyMap::const_iterator itr = sMapDifficultyMap.begin(); itr != sMapDifficultyMap.end(); ++itr) @@ -423,8 +422,9 @@ void InstanceSaveManager::LoadResetTimes() ScheduleReset(true, t - ResetTimeDelay[type-1], InstResetEvent(type, mapid, difficulty, 0)); - for (in_itr = mapDiffResetInstances.lower_bound(map_diff_pair); in_itr != mapDiffResetInstances.upper_bound(map_diff_pair); ++in_itr) - ScheduleReset(true, t - ResetTimeDelay[type-1], InstResetEvent(type, mapid, difficulty, in_itr->second)); + ResetTimeMapDiffInstancesBounds range = mapDiffResetInstances.equal_range(map_diff_pair); + for (; range.first != range.second; ++range.first) + ScheduleReset(true, t - ResetTimeDelay[type-1], InstResetEvent(type, mapid, difficulty, range.first->second)); } } |
