diff options
author | Kelno <dr.kelno@gmail.com> | 2015-05-20 15:30:39 +0200 |
---|---|---|
committer | Kelno <dr.kelno@gmail.com> | 2015-05-20 15:32:52 +0200 |
commit | 9e985f81b43dbdaa0d274284db58e6f86743adb5 (patch) | |
tree | bd625c18089acd236cbd3fb36e00c3eaebbca968 | |
parent | 9d12df69ca77a6c5522a0803d6aa5b8328575a13 (diff) |
Fixed a math error in SmartScript::DecPhase(int32)
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.h | 2 |
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 a3d75f1889b..c38cca8d98f 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -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; } |