fix(Core/Spells): Charging unit should always reach its target even if stunned/rooted. (#10192)
Fixes #9454
This commit is contained in:
@@ -99,12 +99,22 @@ bool PointMovementGenerator<T>::DoUpdate(T* unit, uint32 /*diff*/)
|
|||||||
if (!unit)
|
if (!unit)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (unit->HasUnitState(UNIT_STATE_NOT_MOVE) || unit->IsMovementPreventedByCasting())
|
if (unit->IsMovementPreventedByCasting())
|
||||||
{
|
{
|
||||||
unit->StopMoving();
|
unit->StopMoving();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (unit->HasUnitState(UNIT_STATE_NOT_MOVE))
|
||||||
|
{
|
||||||
|
if (!unit->HasUnitState(UNIT_STATE_CHARGING))
|
||||||
|
{
|
||||||
|
unit->StopMoving();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
unit->AddUnitState(UNIT_STATE_ROAMING_MOVE);
|
unit->AddUnitState(UNIT_STATE_ROAMING_MOVE);
|
||||||
|
|
||||||
if (i_recalculateSpeed && !unit->movespline->Finalized())
|
if (i_recalculateSpeed && !unit->movespline->Finalized())
|
||||||
|
|||||||
Reference in New Issue
Block a user