From 8a0ca6b6a1fbb5690a81c8158039a2800c50e1c8 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 15 Dec 2008 09:55:57 -0600 Subject: *Let talents such as focused mind have effect on counterspell effects. --HG-- branch : trunk --- src/game/SpellEffects.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 62605a4f7a7..66d810ce681 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4457,7 +4457,7 @@ void Spell::EffectHealMaxHealth(uint32 /*i*/) m_healing+=heal; } -void Spell::EffectInterruptCast(uint32 /*i*/) +void Spell::EffectInterruptCast(uint32 i) { if(!unitTarget) return; @@ -4473,7 +4473,11 @@ void Spell::EffectInterruptCast(uint32 /*i*/) // check if we can interrupt spell if ( unitTarget->m_currentSpells[i]->m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT && unitTarget->m_currentSpells[i]->m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE ) { - unitTarget->ProhibitSpellScholl(GetSpellSchoolMask(unitTarget->m_currentSpells[i]->m_spellInfo), GetSpellDuration(m_spellInfo)); + if(m_originalCaster) + { + int32 duration = m_originalCaster->CalculateSpellDuration(m_spellInfo, i, unitTarget); + unitTarget->ProhibitSpellScholl(GetSpellSchoolMask(unitTarget->m_currentSpells[i]->m_spellInfo), duration/*GetSpellDuration(m_spellInfo)*/); + } unitTarget->InterruptSpell(i,false); } } -- cgit v1.2.3