mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 12:47:07 +00:00
fix(Core/Spells): auto attack only selected target when charge is over (#10541)
Fixes #10353
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user