diff options
author | Elron103 <elron103@trinitycore.contrib> | 2011-10-23 12:11:38 +0100 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2011-10-23 12:11:38 +0100 |
commit | 84a6417a4e635d0dfa670c532d938af7a9b77537 (patch) | |
tree | f95b8a13eddf30b08de6e12a6337cae26c822392 | |
parent | 5a12fb99642ee3d84d473a65d646d256293a6d8e (diff) |
Core/Quests: Fix pooling system causing wrong questrelations
Closes #3101 (probably few others)
-rwxr-xr-x | src/server/game/Pools/PoolMgr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index 293933c8bb9..bbef60aa5e7 100755 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -260,7 +260,7 @@ void PoolGroup<Quest>::Despawn1Object(uint32 quest_id) QuestRelations::iterator lastElement = questMap->upper_bound(itr->second); for (; qitr != lastElement; ++qitr) { - if (qitr->first == itr->second) + if (qitr->first == itr->second && qitr->second == itr->first) { questMap->erase(qitr); // iterator is now no more valid break; // but we can exit loop since the element is found @@ -279,7 +279,7 @@ void PoolGroup<Quest>::Despawn1Object(uint32 quest_id) QuestRelations::iterator lastElement = questMap->upper_bound(itr->second); for (; qitr != lastElement; ++qitr) { - if (qitr->first == itr->second) + if (qitr->first == itr->second && qitr->second == itr->first) { questMap->erase(qitr); // iterator is now no more valid break; // but we can exit loop since the element is found |