mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
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)
|
||||
return false;
|
||||
|
||||
if (unit->HasUnitState(UNIT_STATE_NOT_MOVE) || unit->IsMovementPreventedByCasting())
|
||||
if (unit->IsMovementPreventedByCasting())
|
||||
{
|
||||
unit->StopMoving();
|
||||
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);
|
||||
|
||||
if (i_recalculateSpeed && !unit->movespline->Finalized())
|
||||
|
||||
Reference in New Issue
Block a user