mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +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);
|
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