diff options
author | megamage <none@none> | 2009-06-08 12:23:49 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-08 12:23:49 -0500 |
commit | d4576e4c2711a6b4ae04a2645fb9210fb39fa056 (patch) | |
tree | 6bec40dd03be70fbf7ae58f5b0e7d0bb6761e28e /src/game/CreatureAIImpl.h | |
parent | 06db83ab49fd2d153dd45fe94c9459bca4a0f965 (diff) |
*Fix the bug that kelthuzad summons infinite mobs.
--HG--
branch : trunk
Diffstat (limited to 'src/game/CreatureAIImpl.h')
-rw-r--r-- | src/game/CreatureAIImpl.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game/CreatureAIImpl.h b/src/game/CreatureAIImpl.h index 4bb21f1d5ba..e211c50043a 100644 --- a/src/game/CreatureAIImpl.h +++ b/src/game/CreatureAIImpl.h @@ -135,6 +135,13 @@ class EventMap : private std::map<uint32, uint32> return; uint32 eventId = begin()->second; erase(begin()); + time += m_time; + iterator itr = find(time); + while(itr != end()) + { + ++time; + itr = find(time); + } insert(std::make_pair(time, eventId)); } @@ -171,8 +178,7 @@ class EventMap : private std::map<uint32, uint32> erase(begin()); else { - uint32 eventId = (begin()->second & 0x0000FFFF); - return eventId; + return (begin()->second & 0x0000FFFF); } } return 0; |