Core/Spells: change to the way the spell effect SPELL_EFFECT_JUMP work

Port From (https://github.com/TrinityCore/TrinityCore/commit/419689b4859a431b2d678ba69a17d7a9c5376f56)
This commit is contained in:
hondacrx
2020-06-19 19:52:45 -04:00
parent bacae3c190
commit c55af6ae95
+2 -5
View File
@@ -572,15 +572,12 @@ namespace Game.Spells
if (unitTarget == null)
return;
float x, y, z;
unitTarget.GetContactPoint(m_caster, out x, out y, out z, SharedConst.ContactDistance);
float speedXY, speedZ;
CalculateJumpSpeeds(effectInfo, m_caster.GetExactDist2d(x, y), out speedXY, out speedZ);
CalculateJumpSpeeds(effectInfo, m_caster.GetExactDist2d(unitTarget), out speedXY, out speedZ);
JumpArrivalCastArgs arrivalCast = new JumpArrivalCastArgs();
arrivalCast.SpellId = effectInfo.TriggerSpell;
arrivalCast.Target = unitTarget.GetGUID();
m_caster.GetMotionMaster().MoveJump(x, y, z, 0.0f, speedXY, speedZ, EventId.Jump, false, arrivalCast);
m_caster.GetMotionMaster().MoveJump(unitTarget, speedXY, speedZ, EventId.Jump, false, arrivalCast);
}
[SpellEffectHandler(SpellEffectName.JumpDest)]