diff options
author | megamage <none@none> | 2009-04-13 17:36:37 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-13 17:36:37 -0500 |
commit | df35e1ad2b79c7d734ae4b1a32b6d6ad0d9b9400 (patch) | |
tree | 5a63e8da1949409c8ec4424a0bd965d2c876c374 /src/game/SpellAuras.cpp | |
parent | 3a2e58f81ad59365f91f265e382409f34f025b5e (diff) |
[7663] Cleanup spell interrupt code. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r-- | src/game/SpellAuras.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 275b7153e43..c1e2dba1973 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3825,18 +3825,8 @@ void AuraEffect::HandleAuraModSilence(bool apply, bool Real) m_target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED); // Stop cast only spells vs PreventionType == SPELL_PREVENTION_TYPE_SILENCE for (uint32 i = CURRENT_MELEE_SPELL; i < CURRENT_MAX_SPELL;i++) - { - Spell* currentSpell = m_target->m_currentSpells[i]; - if (currentSpell && currentSpell->m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE) - { - uint32 state = currentSpell->getState(); - // Stop spells on prepare or casting state - if ( state == SPELL_STATE_PREPARING || state == SPELL_STATE_CASTING ) - { - currentSpell->cancel(); - } - } - } + if (m_target->m_currentSpells[i] && m_target->m_currentSpells[i]->m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE) + m_target->InterruptSpell(i,false); // Stop spells on prepare or casting state switch (GetId()) { |