Core/SAI: Added a new event flag to allow events to NOT reset when the creature evades (SMART_EVENT_FLAG_DONT_RESET)

Closes #5568

Signed-off-by: Subv <s.v.h21@hotmail.com>
This commit is contained in:
Subv
2012-04-05 12:09:37 -05:00
parent 4126e76862
commit 6759bcab16
2 changed files with 14 additions and 10 deletions

View File

@@ -108,8 +108,11 @@ void SmartScript::OnReset()
ResetBaseObject();
for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i)
{
InitTimer((*i));
(*i).runOnce = false;
if (!((*i).event.event_flags & SMART_EVENT_FLAG_DONT_RESET))
{
InitTimer((*i));
(*i).runOnce = false;
}
}
ProcessEventsFor(SMART_EVENT_RESET);
mLastInvoker = 0;