fix(Core): Creatures should finish casting any current spells before fleeing (#12964)

This commit is contained in:
Tony Konzel
2022-09-18 22:07:32 -05:00
committed by GitHub
parent e7ea9f2555
commit dc0c6e0498

View File

@@ -4059,6 +4059,13 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff)
}
}
// Delay flee for assist event if casting
if (e.GetActionType() == SMART_ACTION_FLEE_FOR_ASSIST && me && me->HasUnitState(UNIT_STATE_CASTING))
{
e.timer = 1;
return;
}
e.active = true;//activate events with cooldown
switch (e.GetEventType())//process ONLY timed events
{