fix(Core/Spells): auto attack only selected target when charge is over (#10541)
Fixes #10353
This commit is contained in:
parent
23cd1883d6
commit
a980bd38a9
1 changed files with 5 additions and 2 deletions
|
|
@ -162,9 +162,12 @@ void PointMovementGenerator<T>::DoFinalize(T* unit)
|
|||
{
|
||||
unit->ClearUnitState(UNIT_STATE_CHARGING);
|
||||
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*unit, _chargeTargetGUID))
|
||||
if (_chargeTargetGUID && _chargeTargetGUID == unit->GetTarget())
|
||||
{
|
||||
unit->Attack(target, true);
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*unit, _chargeTargetGUID))
|
||||
{
|
||||
unit->Attack(target, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue