aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 0c2fc2e5d91..e4624eada2d 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -924,7 +924,7 @@ void Spell::EffectJump(SpellEffIndex /*effIndex*/)
float speedXY, speedZ;
CalculateJumpSpeeds(effectInfo, m_caster->GetExactDist2d(x, y), speedXY, speedZ);
- m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ, EVENT_JUMP, effectInfo->TriggerSpell, unitTarget->GetGUID());
+ m_caster->GetMotionMaster()->MoveJump(x, y, z, 0.0f, speedXY, speedZ, EVENT_JUMP, false, effectInfo->TriggerSpell, unitTarget->GetGUID());
}
void Spell::EffectJumpDest(SpellEffIndex /*effIndex*/)
@@ -938,13 +938,9 @@ void Spell::EffectJumpDest(SpellEffIndex /*effIndex*/)
if (!m_targets.HasDst())
return;
- // Init dest coordinates
- float x, y, z;
- destTarget->GetPosition(x, y, z);
-
float speedXY, speedZ;
- CalculateJumpSpeeds(effectInfo, m_caster->GetExactDist2d(x, y), speedXY, speedZ);
- m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ, EVENT_JUMP, effectInfo->TriggerSpell);
+ CalculateJumpSpeeds(effectInfo, m_caster->GetExactDist2d(destTarget), speedXY, speedZ);
+ m_caster->GetMotionMaster()->MoveJump(*destTarget, speedXY, speedZ, EVENT_JUMP, true, effectInfo->TriggerSpell);
}
void Spell::CalculateJumpSpeeds(SpellEffectInfo const* effInfo, float dist, float& speedXY, float& speedZ)
@@ -4671,7 +4667,7 @@ void Spell::EffectPullTowards(SpellEffIndex /*effIndex*/)
float speedXY = float(effectInfo->MiscValue) * 0.1f;
float speedZ = unitTarget->GetDistance(pos) / speedXY * 0.5f * Movement::gravity;
- unitTarget->GetMotionMaster()->MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ);
+ unitTarget->GetMotionMaster()->MoveJump(pos, speedXY, speedZ);
}
void Spell::EffectChangeRaidMarker(SpellEffIndex /*effIndex*/)