Core/Spells: Interruption should be checked after knowing that the knockback effect will happen (in this case, after the glyph checks).

This commit is contained in:
johnholiver
2011-05-05 18:08:01 -03:00
parent acf7f65013
commit e617c1618f

View File

@@ -6064,10 +6064,6 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex)
if (!unitTarget)
return;
// Instantly interrupt non melee spells being casted
if (unitTarget->IsNonMeleeSpellCasted(true))
unitTarget->InterruptNonMeleeSpells(true);
// Typhoon
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellFamilyFlags[1] & 0x01000000)
{
@@ -6084,6 +6080,10 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex)
return;
}
// Instantly interrupt non melee spells being casted
if (unitTarget->IsNonMeleeSpellCasted(true))
unitTarget->InterruptNonMeleeSpells(true);
float ratio = m_caster->GetCombatReach() / std::max(unitTarget->GetCombatReach(), 1.0f);
if (ratio < 1.0f)
ratio = ratio * ratio * ratio * 0.1f; // volume = length^3