Core/Spells: Fixed movement from SPELL_EFFECT_PULL_TOWARDS_DEST

This commit is contained in:
Shauren
2013-12-31 13:08:45 +01:00
parent 997d2adb21
commit 9a1282aac6

View File

@@ -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);
}