aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-10-05 16:43:43 +0200
committerShauren <shauren.trinity@gmail.com>2011-10-05 16:43:43 +0200
commit8a3ced48c180fe1ad1925879f71a13f936bb4f7e (patch)
treeb5140aa65504c4bd2b4611e917671f2c97848c73 /src
parent5db7bf9cc33ee30b5201ab46a2fc788bbad2ab35 (diff)
Core/Scripts: Limited possible phase number for EventMap to prevent overflows
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/AI/CreatureAIImpl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h
index 46060445ee9..848c2561f3f 100755
--- a/src/server/game/AI/CreatureAIImpl.h
+++ b/src/server/game/AI/CreatureAIImpl.h
@@ -329,7 +329,7 @@ class EventMap : private std::map<uint32, uint32>
// Sets event phase, must be in range 1 - 8
void SetPhase(uint32 phase)
{
- if (phase && phase < 9)
+ if (phase && phase < 8)
_phase = (1 << (phase + 24));
}
@@ -340,7 +340,7 @@ class EventMap : private std::map<uint32, uint32>
time += _time;
if (groupId && groupId < 9)
eventId |= (1 << (groupId + 16));
- if (phase && phase < 9)
+ if (phase && phase < 8)
eventId |= (1 << (phase + 24));
const_iterator itr = find(time);
while (itr != end())