fix(Core): Creatures should finish casting any current spells before fleeing (#12964)
This commit is contained in:
parent
e7ea9f2555
commit
dc0c6e0498
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue