aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormik1893 <michele.roscelli@gmail.com>2014-08-25 17:16:02 +0200
committermik1893 <michele.roscelli@gmail.com>2014-08-25 17:16:02 +0200
commitdf744c75e7fe027e9811d3df8b5ea46d745d99a4 (patch)
treeab455b2688cb24408d6bf6ca924f3fa6cf9f5aef /src
parent70b70f9cda72aa1c689c966981acc2ebf91f6183 (diff)
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
Diffstat (limited to 'src')
-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..4172785cff4 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 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