aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2011-10-23 17:50:31 +0100
committerNay <dnpd.dd@gmail.com>2011-10-23 17:50:31 +0100
commitfec3db6e5dc4d10ad1c7d5ee7e65417da06d3885 (patch)
tree4cd6d57e1c293efb0f9c1f46b04cc8df17ef03c8 /src
parent5f58965fad31a98537f55a83623ad8f0a5e4fc32 (diff)
Core/SAI: Fix event phases when phase > 2
Again, phase ids != phase masks
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h
index 03d04f4b3df..7ebe8ca500f 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.h
+++ b/src/server/game/AI/SmartScripts/SmartScript.h
@@ -222,7 +222,7 @@ class SmartScript
}
void DecPhase(int32 p = 1) { mEventPhase -= (mEventPhase < (uint32)p ? (uint32)p - mEventPhase : (uint32)p); }
- bool IsInPhase(uint32 p) const { return mEventPhase & p; }
+ bool IsInPhase(uint32 p) const { return (1 << (mEventPhase - 1)) & p; }
void SetPhase(uint32 p = 0) { mEventPhase = p; }
SmartAIEventList mEvents;