Core/Spells: Don't check triggered flags for SPELL_ATTR0_CASTABLE_WHILE_DEAD attribute check - triggered spells have this flag set correctly - fixes problems with auras triggering spells for dead casters while they shouldn't.

This commit is contained in:
QAston
2011-08-21 09:39:53 +02:00
parent 080c420e6a
commit edb1f1d436
+1 -1
View File
@@ -4552,7 +4552,7 @@ void Spell::HandleEffects(Unit *pUnitTarget, Item *pItemTarget, GameObject *pGOT
SpellCastResult Spell::CheckCast(bool strict) SpellCastResult Spell::CheckCast(bool strict)
{ {
// check death state // check death state
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CASTER_AURASTATE) && !m_caster->isAlive() && !(m_spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !(m_spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_DEAD)) if (!m_caster->isAlive() && !(m_spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !(m_spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_DEAD))
return SPELL_FAILED_CASTER_DEAD; return SPELL_FAILED_CASTER_DEAD;
// check cooldowns to prevent cheating // check cooldowns to prevent cheating