mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/SAI: Properly implement the second parameter of SMART_ACTION_CALL_TIMED_ACTIONLIST to reflect the wiki (which also makes more sense)
This commit is contained in:
@@ -206,7 +206,7 @@ void SmartAI::EndPath(bool fail)
|
||||
mLastWP = NULL;
|
||||
|
||||
if (mCanRepeatPath)
|
||||
StartPath(mRun, GetScript()->GetPathId(), mCanRepeatPath);
|
||||
StartPath(mRun, GetScript()->GetPathId(), true);
|
||||
else
|
||||
GetScript()->SetPathId(0);
|
||||
|
||||
|
||||
@@ -1585,8 +1585,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
}
|
||||
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (targets)
|
||||
if (ObjectList* targets = GetTargets(e, unit))
|
||||
{
|
||||
for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
{
|
||||
@@ -3463,16 +3462,15 @@ void SmartScript::SetScript9(SmartScriptHolder& e, uint32 entry)
|
||||
return;
|
||||
for (SmartAIEventList::iterator i = mTimedActionList.begin(); i != mTimedActionList.end(); ++i)
|
||||
{
|
||||
if (i == mTimedActionList.begin())
|
||||
{
|
||||
i->enableTimed = true;//enable processing only for the first action
|
||||
}
|
||||
else i->enableTimed = false;
|
||||
i->enableTimed = i == mTimedActionList.begin();//enable processing only for the first action
|
||||
|
||||
if (e.action.timedActionList.timerType == 1)
|
||||
if (e.action.timedActionList.timerType == 0)
|
||||
i->event.type = SMART_EVENT_UPDATE_OOC;
|
||||
else if (e.action.timedActionList.timerType == 1)
|
||||
i->event.type = SMART_EVENT_UPDATE_IC;
|
||||
else if (e.action.timedActionList.timerType > 1)
|
||||
i->event.type = SMART_EVENT_UPDATE;
|
||||
|
||||
InitTimer((*i));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user