Fixed a math error in SmartScript::DecPhase(int32)

This commit is contained in:
Kelno
2015-05-20 15:30:39 +02:00
parent 9d12df69ca
commit 9e985f81b4

View File

@@ -247,7 +247,7 @@ class SmartScript
DecPhase(abs(p));
}
void DecPhase(int32 p = 1) { mEventPhase -= (mEventPhase < (uint32)p ? (uint32)p - mEventPhase : (uint32)p); }
void DecPhase(int32 p = 1) { mEventPhase -= (mEventPhase < (uint32)p ? (uint32)p - ((uint32)p - mEventPhase) : (uint32)p); }
bool IsInPhase(uint32 p) const { return ((1 << (mEventPhase - 1)) & p) != 0; }
void SetPhase(uint32 p = 0) { mEventPhase = p; }