aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarpten <vertozor@gmail.com>2014-08-30 00:27:11 +0200
committerWarpten <vertozor@gmail.com>2014-08-30 00:27:11 +0200
commit39e4a883528f2468f15b04017ee090b036c2a0e7 (patch)
tree2844e4257d29420e0c2e45b5be2a41079464540f
parentabc0380e7f54dc39c6ecfdc1ff2410ec7d045fec (diff)
parent1c56c41d60972d8b3cab237b64c93f26b4979b35 (diff)
Merge pull request #12926 from mik1893/LOSonTriggered
Core/Spell: Triggered spells now inherit LOS checking from their triggering spell
-rw-r--r--src/server/game/Spells/Spell.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 0f79c4d0780..de6effb8b14 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -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 LOS 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 spell is triggered, 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