fix(Core/Spells): Upon using charge warrior should start auto attacki… (#12408)

...ng the targeted enemy once you reach them.
This commit is contained in:
UltraNix
2022-07-19 23:02:45 +02:00
committed by GitHub
parent 1c8d562f01
commit 1066bc76b1

View File

@@ -41,7 +41,7 @@ void PointMovementGenerator<T>::DoInitialize(T* unit)
unit->StopMoving();
unit->AddUnitState(UNIT_STATE_ROAMING | UNIT_STATE_ROAMING_MOVE);
if (id == EVENT_CHARGE)
if (id == EVENT_CHARGE || id == EVENT_CHARGE_PREPATH)
{
unit->AddUnitState(UNIT_STATE_CHARGING);
}
@@ -158,7 +158,7 @@ template<class T>
void PointMovementGenerator<T>::DoFinalize(T* unit)
{
unit->ClearUnitState(UNIT_STATE_ROAMING | UNIT_STATE_ROAMING_MOVE);
if (id == EVENT_CHARGE)
if (id == EVENT_CHARGE || id == EVENT_CHARGE_PREPATH)
{
unit->ClearUnitState(UNIT_STATE_CHARGING);
@@ -182,7 +182,7 @@ void PointMovementGenerator<T>::DoReset(T* unit)
unit->StopMoving();
unit->AddUnitState(UNIT_STATE_ROAMING | UNIT_STATE_ROAMING_MOVE);
if (id == EVENT_CHARGE)
if (id == EVENT_CHARGE || id == EVENT_CHARGE_PREPATH)
{
unit->AddUnitState(UNIT_STATE_CHARGING);
}