aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 0e5d15af6b9..500dfe0b627 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -3388,6 +3388,16 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff)
}
}
+ // Delay flee for assist event if stunned or rooted
+ if (e.GetActionType() == SMART_ACTION_FLEE_FOR_ASSIST)
+ {
+ if (me && me->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED))
+ {
+ e.timer = 1;
+ return;
+ }
+ }
+
e.active = true;//activate events with cooldown
switch (e.GetEventType())//process ONLY timed events
{