mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Spell: Triggered spells should inherit LOS checking from triggering aura
Avoid triggered spells to ignore LOS by default Fixed wrong behaviour of Bladestorm spell
This commit is contained in:
@@ -6446,7 +6446,12 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff, Position const* lo
|
||||
break;
|
||||
}
|
||||
|
||||
if (IsTriggered() || m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS || DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, m_spellInfo->Id, NULL, SPELL_DISABLE_LOS))
|
||||
// check for ignore self on the effect itself
|
||||
if (m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS || DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, m_spellInfo->Id, NULL, SPELL_DISABLE_LOS))
|
||||
return true;
|
||||
|
||||
// if is a triggered spell, i need to check for los disable on the aura triggering it and inherit that behaviour
|
||||
if (IsTriggered() && m_triggeredByAuraSpell && (m_triggeredByAuraSpell->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS || DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, m_triggeredByAuraSpell->Id, NULL, SPELL_DISABLE_LOS)))
|
||||
return true;
|
||||
|
||||
/// @todo shit below shouldn't be here, but it's temporary
|
||||
|
||||
Reference in New Issue
Block a user