Core/Creatures: Restore IsMovementPreventedByCasting logic for casting units (non-channeled)

Port From (https://github.com/TrinityCore/TrinityCore/commit/25c7656ffd1f63a32a7f92fde1dc1649fcfd1323)
This commit is contained in:
hondacrx
2023-01-11 01:26:19 -05:00
parent b5c9ce5b7e
commit 1dde57b181
+3 -4
View File
@@ -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;
}