Core/Spells: Triggered spells should be ignored when checking death state at spell cast, fixes issue 3914

--HG--
branch : trunk
This commit is contained in:
Shocker
2010-09-09 15:44:24 +03:00
parent 0126590c54
commit a0ffc6ab86

View File

@@ -4702,7 +4702,7 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar
SpellCastResult Spell::CheckCast(bool strict)
{
// check death state
if (!m_caster->isAlive() && !(m_spellInfo->Attributes & SPELL_ATTR_PASSIVE) && !(m_spellInfo->Attributes & SPELL_ATTR_CASTABLE_WHILE_DEAD))
if (!m_IsTriggeredSpell && !m_caster->isAlive() && !(m_spellInfo->Attributes & SPELL_ATTR_PASSIVE) && !(m_spellInfo->Attributes & SPELL_ATTR_CASTABLE_WHILE_DEAD))
return SPELL_FAILED_CASTER_DEAD;
// check cooldowns to prevent cheating