Core/AI: fix debug / nix build

--HG--
branch : trunk
This commit is contained in:
Rat
2010-10-27 23:19:35 +02:00
parent 5cb119e617
commit afe683aff4
2 changed files with 7 additions and 2 deletions

View File

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

View File

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