Removed useless calculation in last commit

This commit is contained in:
Kelno committed 2015-05-20 16:16:11 +02:00
1 parent 9e985f81b4
commit c142282e34
1 file changed
+8 -1
@@ -247,7 +247,14 @@ class SmartScript
DecPhase(abs(p));
}
void DecPhase(int32 p = 1) { mEventPhase -= (mEventPhase < (uint32)p ? (uint32)p - ((uint32)p - mEventPhase) : (uint32)p); }
void DecPhase(int32 p = 1)
{
if(mEventPhase > (uint32)p)
mEventPhase -= (uint32)p;
else
mEventPhase = 0;
}
bool IsInPhase(uint32 p) const { return ((1 << (mEventPhase - 1)) & p) != 0; }
void SetPhase(uint32 p = 0) { mEventPhase = p; }