Core/Movement: Prevent NO_PATH evades from incorrectly happening in a few places.
Port From (https://github.com/TrinityCore/TrinityCore/commit/6f0e58cce0088dd030d5bf85ae03e9d942241800)
This commit is contained in:
@@ -85,6 +85,9 @@ namespace Game.Movement
|
||||
{
|
||||
owner.StopMoving();
|
||||
_lastTargetPosition = null;
|
||||
Creature cOwner = owner.ToCreature();
|
||||
if (cOwner != null)
|
||||
cOwner.SetCannotReachTarget(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -119,6 +122,9 @@ namespace Game.Movement
|
||||
if (owner.HasUnitState(UnitState.ChaseMove) && owner.MoveSpline.Finalized())
|
||||
{
|
||||
_path = null;
|
||||
Creature cOwner = owner.ToCreature();
|
||||
if (cOwner != null)
|
||||
cOwner.SetCannotReachTarget(false);
|
||||
owner.ClearUnitState(UnitState.ChaseMove);
|
||||
owner.SetInFront(target);
|
||||
DoMovementInform(owner, target);
|
||||
@@ -201,6 +207,9 @@ namespace Game.Movement
|
||||
{
|
||||
AddFlag(MovementGeneratorFlags.Deactivated);
|
||||
owner.ClearUnitState(UnitState.ChaseMove);
|
||||
Creature cOwner = owner.ToCreature();
|
||||
if (cOwner != null)
|
||||
cOwner.SetCannotReachTarget(false);
|
||||
}
|
||||
|
||||
public override void Finalize(Unit owner, bool active, bool movementInform)
|
||||
|
||||
Reference in New Issue
Block a user