diff options
author | Warpten <vertozor@gmail.com> | 2014-07-25 14:47:07 +0200 |
---|---|---|
committer | Warpten <vertozor@gmail.com> | 2014-07-25 14:47:07 +0200 |
commit | a309ca972794f7282372b4302d6d0caddef7f745 (patch) | |
tree | b3aae49dede9c7a706e5180a4dba53bc4d41fe41 /src | |
parent | 89f67fc0c371d80596f80f67caa9d46c62d9faaf (diff) |
Core/Spells: Fixed issues with Death and Decay and similar spells not ticking if players stepping in the AoE are not in LoS with the caster.
Not exactly sure if that behavior should *exactly* be as such, but until more informations ...
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 2bf9c0e0395..037242358da 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4793,8 +4793,15 @@ SpellCastResult Spell::CheckCast(bool strict) return SPELL_FAILED_NOT_INFRONT; if (m_caster->GetEntry() != WORLD_TRIGGER) // Ignore LOS for gameobjects casts (wrongly cast by a trigger) - if (!(m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) && !DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, m_spellInfo->Id, NULL, SPELL_DISABLE_LOS) && !m_caster->IsWithinLOSInMap(target)) + { + WorldObject* losTarget = target; + if (IsTriggered() && m_triggeredByAuraSpell) + if (DynamicObject* dynObj = m_caster->GetDynObject(m_triggeredByAuraSpell)) + losTarget = dynObj; + + if (!(m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) && !DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, m_spellInfo->Id, NULL, SPELL_DISABLE_LOS) && !target->IsWithinLOSInMap(losTarget)) return SPELL_FAILED_LINE_OF_SIGHT; + } } } |