diff options
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index a22e32abf82..922074970b2 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -4614,8 +4614,8 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex) if (unitTarget->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) return; - // Instantly interrupt non melee spells being casted - if (unitTarget->IsNonMeleeSpellCasted(true)) + // Instantly interrupt non melee spells being cast + if (unitTarget->IsNonMeleeSpellCast(true)) unitTarget->InterruptNonMeleeSpells(true); float ratio = 0.1f; @@ -4716,8 +4716,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) { @@ -4731,6 +4729,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); } |