Core/Spells: Fixed effects targeting the caster not hitting him immediately on spell launch if the spell targets a dest

Port From (https://github.com/TrinityCore/TrinityCore/commit/295c8f63269d966812f37a8bd8e988a9f2dc1235)
This commit is contained in:
hondacrx
2023-05-02 15:40:21 -04:00
parent 9decc17cd0
commit 5e5e17e23c
5 changed files with 78 additions and 36 deletions
@@ -192,7 +192,9 @@ namespace Game.Movement
public void MovementInform(Unit owner)
{
owner.ToCreature()?.GetAI()?.MovementInform(MovementGeneratorType.Point, _movementId);
// deliver EVENT_CHARGE to scripts, EVENT_CHARGE_PREPATH is just internal implementation detail of this movement generator
uint movementId = _movementId == EventId.ChargePrepath ? EventId.Charge : _movementId;
owner.ToCreature()?.GetAI()?.MovementInform(MovementGeneratorType.Point, movementId);
}
public override void UnitSpeedChanged()