fix(Core/Spells): Always melee attack target when charge is over. (#7316)
* fix(Core/Spells): Always melee attack target when charge is over. Fixed #7266 * Update src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
This commit is contained in:
parent
dd833a25a6
commit
6b5c3ed04f
5 changed files with 26 additions and 20 deletions
|
|
@ -139,6 +139,11 @@ void PointMovementGenerator<T>::DoFinalize(T* unit)
|
|||
if (id == EVENT_CHARGE)
|
||||
{
|
||||
unit->ClearUnitState(UNIT_STATE_CHARGING);
|
||||
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*unit, _chargeTargetGUID))
|
||||
{
|
||||
unit->Attack(target, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (unit->movespline->Finalized())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue