mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-16 04:59:41 -04:00
Core/SAI: Fixed the crash with using SMART_ACTION_ATTACK_START inside a TimedActionList, closes #4650
Signed-off-by: Subv2112 <s.v.h21@hotmail.com>
This commit is contained in:
@@ -78,22 +78,6 @@ void SmartScript::OnReset()
|
||||
|
||||
void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob)
|
||||
{
|
||||
if (e == SMART_EVENT_AGGRO)
|
||||
{
|
||||
if (!mResumeActionList)
|
||||
mTimedActionList.clear();//clear action list if it is not resumable
|
||||
else
|
||||
{
|
||||
for (SmartAIEventList::iterator itr = mTimedActionList.begin(); itr != mTimedActionList.end(); ++itr)
|
||||
{
|
||||
if (itr->enableTimed)
|
||||
{
|
||||
InitTimer((*itr));//re-init the currently enabled timer, so it restarts the timer when resumed
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i)
|
||||
{
|
||||
SMART_EVENT eventType = SMART_EVENT((*i).GetEventType());
|
||||
@@ -3017,7 +3001,6 @@ void SmartScript::SetScript9(SmartScriptHolder& e, uint32 entry)
|
||||
i->event.type = SMART_EVENT_UPDATE_IC;
|
||||
else if (e.action.timedActionList.timerType > 1)
|
||||
i->event.type = SMART_EVENT_UPDATE;
|
||||
mResumeActionList = e.action.timedActionList.dontResume ? false : true;
|
||||
InitTimer((*i));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user