Core/Spells: Fixed logic related to movement while channeling
This commit is contained in:
@@ -40,7 +40,7 @@ namespace Game.Movement
|
||||
if (owner.HasUnitState(UnitState.Root | UnitState.Stunned))
|
||||
return;
|
||||
|
||||
if (owner.HasUnitState(UnitState.Casting) && !owner.CanMoveDuringChannel())
|
||||
if (owner.IsMovementPreventedByCasting())
|
||||
{
|
||||
owner.CastStop();
|
||||
return;
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Game.Movement
|
||||
|
||||
public void _setRandomLocation(T creature)
|
||||
{
|
||||
if (creature.HasUnitState(UnitState.Casting) && !creature.CanMoveDuringChannel())
|
||||
if (creature.IsMovementPreventedByCasting())
|
||||
{
|
||||
creature.CastStop();
|
||||
return;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Game.Movement
|
||||
}
|
||||
|
||||
// prevent movement while casting spells with cast time or channel time
|
||||
if (owner.HasUnitState(UnitState.Casting) && !owner.CanMoveDuringChannel())
|
||||
if (owner.IsMovementPreventedByCasting())
|
||||
{
|
||||
if (!owner.isStopped())
|
||||
owner.StopMoving();
|
||||
@@ -144,7 +144,7 @@ namespace Game.Movement
|
||||
if (owner.HasUnitState(UnitState.NotMove))
|
||||
return;
|
||||
|
||||
if (owner.HasUnitState(UnitState.Casting) && !owner.CanMoveDuringChannel())
|
||||
if (owner.IsMovementPreventedByCasting())
|
||||
return;
|
||||
|
||||
if (owner.IsTypeId(TypeId.Unit) && !target.isInAccessiblePlaceFor(owner.ToCreature()))
|
||||
|
||||
Reference in New Issue
Block a user