aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChaouki Dhib <chaodhib@gmail.com>2017-04-10 00:41:25 +0200
committerfunjoker <funjoker109@gmail.com>2020-06-14 20:04:17 +0200
commit419689b4859a431b2d678ba69a17d7a9c5376f56 (patch)
tree38e5999c7c952bd100dd4d08a4b214f4839bfb83 /src
parent55576d20d837a9b4575c11a73940c29c0e8e605b (diff)
Core/Spells: change to the way the spell effect SPELL_EFFECT_JUMP work
(cherry picked from commit d625c0f619fa0bfee137070862132e6d9e3cb445)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index a9fa7bfee03..0ec8e6f1138 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -879,15 +879,12 @@ void Spell::EffectJump(SpellEffIndex /*effIndex*/)
if (!unitTarget)
return;
- float x, y, z;
- unitTarget->GetContactPoint(m_caster, x, y, z, CONTACT_DISTANCE);
-
float speedXY, speedZ;
- CalculateJumpSpeeds(effectInfo, m_caster->GetExactDist2d(x, y), speedXY, speedZ);
+ CalculateJumpSpeeds(effectInfo, m_caster->GetExactDist2d(unitTarget), speedXY, speedZ);
JumpArrivalCastArgs arrivalCast;
arrivalCast.SpellId = effectInfo->TriggerSpell;
arrivalCast.Target = unitTarget->GetGUID();
- m_caster->GetMotionMaster()->MoveJump(x, y, z, 0.0f, speedXY, speedZ, EVENT_JUMP, false, &arrivalCast);
+ m_caster->GetMotionMaster()->MoveJump(*unitTarget, speedXY, speedZ, EVENT_JUMP, false, &arrivalCast);
}
void Spell::EffectJumpDest(SpellEffIndex /*effIndex*/)