mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core/Spells: Fixed movement from SPELL_EFFECT_PULL_TOWARDS_DEST
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user