diff options
author | QAston <none@none> | 2009-04-08 23:20:06 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-04-08 23:20:06 +0200 |
commit | bf7499d1ce3677128b55c994740665b7bd6cf3f0 (patch) | |
tree | 795b91dd7c85a10734ff3fa1e4782a8a8d0000c1 /src/game/Spell.cpp | |
parent | b3e71cfd6477541918b8b3bc3de7e42efc3170de (diff) |
*Fix Sudden Death.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 4bb55ceee04..9fc6dbffcc7 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -4001,8 +4001,18 @@ SpellCastResult Spell::CheckCast(bool strict) { if(m_spellInfo->SpellIconID == 1648) // Execute { - if(!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetHealth() > m_targets.getUnitTarget()->GetMaxHealth()*0.2) + if(!m_targets.getUnitTarget()) return SPELL_FAILED_BAD_TARGETS; + if (m_targets.getUnitTarget()->GetHealth() > m_targets.getUnitTarget()->GetMaxHealth()*0.2) + { + bool found = false; + Unit::AuraEffectList const& stateAuras = m_caster->GetAurasByType(SPELL_AURA_ABILITY_IGNORE_AURASTATE); + for(Unit::AuraEffectList::const_iterator j = stateAuras.begin();j != stateAuras.end(); ++j) + if((*j)->isAffectedOnSpell(m_spellInfo)) + found=true; + if (!found) + return SPELL_FAILED_BAD_TARGETS; + } } else if (m_spellInfo->Id == 51582) // Rocket Boots Engaged { |