fix(Core/Pathfinding): Creatures regen health, spells LOD (#4509)

This commit is contained in:
Footman
2021-02-10 02:37:05 +03:00
committed by GitHub
parent 98a61b71e5
commit 522eb9a7e4
12 changed files with 132 additions and 115 deletions

View File

@@ -553,7 +553,7 @@ void Unit::UpdateSplinePosition()
void Unit::DisableSpline()
{
m_movementInfo.RemoveMovementFlag(MovementFlags(MOVEMENTFLAG_SPLINE_ENABLED | MOVEMENTFLAG_FORWARD));
m_movementInfo.RemoveMovementFlag(MovementFlags(MOVEMENTFLAG_SPLINE_ENABLED | MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_BACKWARD));
movespline->_Interrupt();
}
@@ -13685,6 +13685,7 @@ void Unit::setDeathState(DeathState s, bool despawn)
// remove aurastates allowing special moves
ClearAllReactives();
ClearDiminishings();
GetMotionMaster()->Clear(false);
GetMotionMaster()->MoveIdle();
@@ -15894,6 +15895,10 @@ void Unit::StopMoving()
if (movespline->Finalized())
return;
// Update position now since Stop does not start a new movement that can be updated later
if (movespline->HasStarted())
UpdateSplinePosition();
Movement::MoveSplineInit init(this);
init.Stop();
}