Core/Unit: Some charm fixes:

Port From (https://github.com/TrinityCore/TrinityCore/commit/34f9666f209ab3f281bf81de92c4bc1a164b0059)
This commit is contained in:
hondacrx
2021-11-02 14:14:58 -04:00
parent 430d163dee
commit 78a466e5b6
5 changed files with 45 additions and 45 deletions
@@ -109,7 +109,7 @@ namespace Game.Movement
if (owner == null)
return;
if (owner.HasUnitState(UnitState.NotMove) || owner.IsMovementPreventedByCasting())
if (owner.HasUnitState(UnitState.NotMove | UnitState.LostControl) || owner.IsMovementPreventedByCasting())
{
AddFlag(MovementGeneratorFlags.Interrupted);
owner.StopMoving();
@@ -140,7 +140,7 @@ namespace Game.Movement
if (HasFlag(MovementGeneratorFlags.Finalized | MovementGeneratorFlags.Paused) || _path == null || _path.nodes.Empty())
return true;
if (owner.HasUnitState(UnitState.NotMove) || owner.IsMovementPreventedByCasting())
if (owner.HasUnitState(UnitState.NotMove | UnitState.LostControl) || owner.IsMovementPreventedByCasting())
{
AddFlag(MovementGeneratorFlags.Interrupted);
owner.StopMoving();