aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKillyana <morphone1@gmail.com>2018-04-14 16:45:05 +0200
committerShauren <shauren.trinity@gmail.com>2021-09-25 20:45:27 +0200
commitc0cb8fc1fe8e2079b9ae0f345e5d4ad2b1bfa730 (patch)
tree64300b75308f41e85388852c3d969606dae65329 /src
parente7f93ca96d4fb8fefa7caeddf244fdca63f6b664 (diff)
Core/SAI: Allow movements for creature using castflag 64 when silenced
Closes #20222 (cherry picked from commit 1e8227eda7f9c6a989fe6c928c857d76491e008c)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index c7f67fa348f..c5a3165e8fd 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -593,7 +593,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (me->GetDistance(target) > spellInfo->GetMaxRange(true) ||
me->GetDistance(target) < spellInfo->GetMinRange(true) ||
- !me->IsWithinLOSInMap(target) || !hasPower)
+ !me->IsWithinLOSInMap(target) ||
+ !hasPower ||
+ !me->HasUnitFlag(UNIT_FLAG_SILENCED))
allowMove = true;
ENSURE_AI(SmartAI, me->AI())->SetCombatMove(allowMove);