aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorthenecromancer <none@none>2010-02-18 00:20:17 +0100
committerthenecromancer <none@none>2010-02-18 00:20:17 +0100
commit401a8eec02992605c64900baa9a39d7c24ba7810 (patch)
treeec269b0871a47b215f6a940983edf58bebb243c8 /src
parent8ba75526b5fb7f497384cfcd36edf7d6df77df94 (diff)
Use same calculations for Pull effect as for jump effect
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellEffects.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index ccf3abe022d..585fbbc42af 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -6825,7 +6825,15 @@ void Spell::EffectPlayerPull(uint32 i)
if(!unitTarget)
return;
- unitTarget->GetMotionMaster()->MoveJump(m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), float(damage ? damage : unitTarget->GetDistance2d(m_caster)), float(m_spellInfo->EffectMiscValue[i])/10);
+ float speedZ;
+ if(m_spellInfo->EffectMiscValue[i])
+ speedZ = float(m_spellInfo->EffectMiscValue[i])/10;
+ else if(m_spellInfo->EffectMiscValueB[i])
+ speedZ = float(m_spellInfo->EffectMiscValueB[i])/10;
+ else
+ speedZ = 10.0f;
+ float speedXY = m_caster->GetExactDist2d(x, y) * 10.0f / speedZ;
+ unitTarget->GetMotionMaster()->MoveJump(m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), speedXY, speedZ);
}
void Spell::EffectDispelMechanic(uint32 i)