diff options
author | treeston <treeston.mmoc@gmail.com> | 2016-02-10 17:41:19 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2016-04-05 19:02:11 +0200 |
commit | 73b917e122a05de46e73193c110a787de6734f92 (patch) | |
tree | adbbc2775ae48b3661b38bed0894209bf9c61bc4 /src/server/game/Spells/SpellEffects.cpp | |
parent | 53722a81a233a24970f5785ec712aa3276a3a205 (diff) |
Merge remote-tracking branch 'Eliminationzx/FixJumpDestOrientation' into 3.3.5 (PR #16450) with some minor CS adjustments
(cherry picked from commit cfed2d7a3ddf4f8121d3359f9888e6116fc82e62)
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 12 |
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*/) |