diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 2 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.h | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 4da6dc85a5d..b95e4c108b3 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1749,7 +1749,7 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn for (SmartAIEventList::iterator i = e.begin(); i != e.end(); ++i) { #ifndef TRINITY_DEBUG - if ((*i).event_flags & EFLAG_DEBUG_ONLY) + if ((*i).event.event_flags & EFLAG_DEBUG_ONLY) continue; #endif diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index bb7722e136c..85bd5a7faa1 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -179,7 +179,12 @@ class SmartScript } private: - void IncPhase(int32 p = 1) { p >= 0 ? mEventPhase += (uint32)p : DecPhase(abs(p)); } + void IncPhase(int32 p = 1) { + if(p >= 0) + mEventPhase += (uint32)p; + else + DecPhase(abs(p)); + } void DecPhase(int32 p = 1) { mEventPhase -= (mEventPhase < (uint32)p ? (uint32)p - mEventPhase : (uint32)p); } bool IsInPhase(uint32 p) { return mEventPhase & p; } void SetPhase(uint32 p = 0) { mEventPhase = p; } |