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.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index a0ce224c9cc..c35d06f8a62 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -896,7 +896,7 @@ void Spell::EffectJump()
JumpArrivalCastArgs arrivalCast;
arrivalCast.SpellId = effectInfo->TriggerSpell;
arrivalCast.Target = unitTarget->GetGUID();
- unitCaster->GetMotionMaster()->MoveJump(*unitTarget, speedXY, speedZ, EVENT_JUMP, false, &arrivalCast);
+ unitCaster->GetMotionMaster()->MoveJump(*unitTarget, speedXY, speedZ, EVENT_JUMP, {}, &arrivalCast);
}
void Spell::EffectJumpDest()
@@ -916,9 +916,12 @@ void Spell::EffectJumpDest()
float speedXY, speedZ;
CalculateJumpSpeeds(effectInfo, unitCaster->GetExactDist2d(destTarget), speedXY, speedZ);
+ MovementFacingTarget facing;
+ if (!m_targets.GetUnitTargetGUID().IsEmpty())
+ facing = destTarget->GetOrientation();
JumpArrivalCastArgs arrivalCast;
arrivalCast.SpellId = effectInfo->TriggerSpell;
- unitCaster->GetMotionMaster()->MoveJump(*destTarget, speedXY, speedZ, EVENT_JUMP, !m_targets.GetObjectTargetGUID().IsEmpty(), &arrivalCast);
+ unitCaster->GetMotionMaster()->MoveJump(*destTarget, speedXY, speedZ, EVENT_JUMP, facing, &arrivalCast);
}
TeleportToOptions GetTeleportOptions(WorldObject const* caster, Unit const* unitTarget, SpellDestination const& targetDest)
@@ -5782,7 +5785,7 @@ void Spell::EffectJumpCharge()
effectExtra->ParabolicCurveId = *params->ParabolicCurveId;
}
- unitCaster->GetMotionMaster()->MoveJumpWithGravity(*destTarget, speed, params->JumpGravity, EVENT_JUMP, false,
+ unitCaster->GetMotionMaster()->MoveJumpWithGravity(*destTarget, speed, params->JumpGravity, EVENT_JUMP, {},
arrivalCast ? &*arrivalCast : nullptr,
effectExtra ? &*effectExtra : nullptr);
}