From 1dde57b1816c52260d4bbee34467963d7f212ee5 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 11 Jan 2023 01:26:19 -0500 Subject: [PATCH] Core/Creatures: Restore IsMovementPreventedByCasting logic for casting units (non-channeled) Port From (https://github.com/TrinityCore/TrinityCore/commit/25c7656ffd1f63a32a7f92fde1dc1649fcfd1323) --- Source/Game/Entities/Creature/Creature.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index ca904070d..ee1c3eea5 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -1145,10 +1145,6 @@ namespace Game.Entities public override bool IsMovementPreventedByCasting() { - // Can always move when not casting - if (!HasUnitState(UnitState.Casting)) - return false; - // first check if currently a movement allowed channel is active and we're not casting Spell spell = GetCurrentSpell(CurrentSpellTypes.Channeled); if (spell != null) @@ -1161,6 +1157,9 @@ namespace Game.Entities if (HasSpellFocus()) return true; + if (!HasUnitState(UnitState.Casting)) + return true; + return false; }