From b5c9ce5b7e54bad6901d3f7832255b2fcb3f5b13 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 11 Jan 2023 01:25:23 -0500 Subject: [PATCH] Core/Creatures: Fix IsMovementPreventedByCasting logic Port From (https://github.com/TrinityCore/TrinityCore/commit/e2ed3e23f8241933b4f931e9def7eee69f1abb79) --- Source/Game/Entities/Creature/Creature.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index e83a0b1e7..ca904070d 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -1145,22 +1145,22 @@ 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) { if (spell.GetState() != SpellState.Finished && spell.IsChannelActive()) if (spell.CheckMovement() != SpellCastResult.SpellCastOk) - if (HasUnitState(UnitState.Casting)) return true; } if (HasSpellFocus()) return true; - if (HasUnitState(UnitState.Casting)) - return true; - return false; }