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.
This commit is contained in:
@@ -4577,7 +4577,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 (!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;
|
return SPELL_FAILED_CASTER_DEAD;
|
||||||
|
|
||||||
// check cooldowns to prevent cheating
|
// check cooldowns to prevent cheating
|
||||||
@@ -6376,7 +6376,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
|
|||||||
break;
|
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;
|
return true;
|
||||||
|
|
||||||
// todo: shit below shouldn't be here, but it's temporary
|
// todo: shit below shouldn't be here, but it's temporary
|
||||||
|
|||||||
Reference in New Issue
Block a user