Core/SAI: Fix event phases when phase > 2

Again, phase ids != phase masks
This commit is contained in:
Nay
2011-10-23 17:50:31 +01:00
parent 5f58965fad
commit fec3db6e5d

View File

@@ -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;