aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2011-08-30 00:13:53 +0200
committerQAston <qaston@gmail.com>2011-08-30 00:13:53 +0200
commitd863562507fab42b9f4c38a9c60760ee6fe6d61d (patch)
tree04b4204364a6c33e085455940f8472e5e6529bd5
parent5708bc8b1e6374957c382ecf33d466f2ee299cee (diff)
Core/Spells: Make core be a little less strict about some spell attributes SPELL_ATTR0_CASTABLE_WHILE_DEAD and SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS checks.
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 4eee788e84e..65d4fc361dc 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4577,7 +4577,7 @@ void Spell::HandleEffects(Unit *pUnitTarget, Item *pItemTarget, GameObject *pGOT
SpellCastResult Spell::CheckCast(bool strict)
{
// check death state
- if (!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) || (IsTriggered() && !m_triggeredByAuraSpell)))
return SPELL_FAILED_CASTER_DEAD;
// check cooldowns to prevent cheating
@@ -6376,7 +6376,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
break;
}
- if (m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS)
+ if (IsTriggered() || m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS)
return true;
// todo: shit below shouldn't be here, but it's temporary