aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2013-12-31 13:08:45 +0100
committerShauren <shauren.trinity@gmail.com>2013-12-31 13:08:45 +0100
commit9a1282aac6befe6b3e26deb39d066fdc04452f4a (patch)
treeea35e786a415a96410fb74b3da921b8b9956c782 /src
parent997d2adb213cd641a6c883ae85257186f897610e (diff)
Core/Spells: Fixed movement from SPELL_EFFECT_PULL_TOWARDS_DEST
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 90334281a8a..3bb74bad9d7 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5003,8 +5003,6 @@ void Spell::EffectPullTowards(SpellEffIndex effIndex)
if (!unitTarget)
return;
- float speedZ = (float)(m_spellInfo->Effects[effIndex].CalcValue() / 10);
- float speedXY = (float)(m_spellInfo->Effects[effIndex].MiscValue/10);
Position pos;
if (m_spellInfo->Effects[effIndex].Effect == SPELL_EFFECT_PULL_TOWARDS_DEST)
{
@@ -5018,6 +5016,9 @@ void Spell::EffectPullTowards(SpellEffIndex effIndex)
pos.Relocate(m_caster);
}
+ float speedXY = float(m_spellInfo->Effects[effIndex].MiscValue) * 0.1f;
+ float speedZ = unitTarget->GetDistance(pos) / speedXY * 0.5f * Movement::gravity;
+
unitTarget->GetMotionMaster()->MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ);
}