From 655a4f9857e46ee14a09a6d06aa3d80802d73657 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 7 May 2022 15:10:06 -0400 Subject: [PATCH] Core/Spells: Implemented using db2 PositionFacing for SPELL_EFFECT_LEAP_BACK Port From (https://github.com/TrinityCore/TrinityCore/commit/7295bfb6a09b25d824889cfb3698a0774fc01b34) --- Source/Game/Entities/Unit/Unit.Movement.cs | 3 +-- Source/Game/Spells/SpellEffects.cs | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Game/Entities/Unit/Unit.Movement.cs b/Source/Game/Entities/Unit/Unit.Movement.cs index ab5ff2221..3c9e3277d 100644 --- a/Source/Game/Entities/Unit/Unit.Movement.cs +++ b/Source/Game/Entities/Unit/Unit.Movement.cs @@ -395,9 +395,8 @@ namespace Game.Entities return true; } - public void JumpTo(float speedXY, float speedZ, bool forward, Position dest = null) + public void JumpTo(float speedXY, float speedZ, float angle, Position dest = null) { - float angle = forward ? 0 : MathFunctions.PI; if (dest != null) angle += GetRelativeAngle(dest); diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index da79441b3..d3cbe76a5 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -3869,7 +3869,7 @@ namespace Game.Spells float speedxy = effectInfo.MiscValue / 10.0f; float speedz = damage / 10.0f; // Disengage - unitTarget.JumpTo(speedxy, speedz, m_spellInfo.IconFileDataId != 132572); + unitTarget.JumpTo(speedxy, speedz, effectInfo.PositionFacing); // changes fall time if (m_caster.GetTypeId() == TypeId.Player) @@ -3965,7 +3965,7 @@ namespace Game.Spells return; } - unitTarget.JumpTo(speedXY, speedZ, true, pos); + unitTarget.JumpTo(speedXY, speedZ, 0.0f, pos); } [SpellEffectHandler(SpellEffectName.PullTowardsDest)] @@ -4002,7 +4002,7 @@ namespace Game.Spells return; } - unitTarget.JumpTo(speedXY, speedZ, true, pos); + unitTarget.JumpTo(speedXY, speedZ, 0.0f, pos); } [SpellEffectHandler(SpellEffectName.ChangeRaidMarker)]