Core/Spells: Implemented using db2 PositionFacing for SPELL_EFFECT_LEAP_BACK

Port From (https://github.com/TrinityCore/TrinityCore/commit/7295bfb6a09b25d824889cfb3698a0774fc01b34)
This commit is contained in:
hondacrx
2022-05-07 15:10:06 -04:00
parent 68dbe8758c
commit 655a4f9857
2 changed files with 4 additions and 5 deletions
+1 -2
View File
@@ -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);
+3 -3
View File
@@ -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)]