aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 867d17688e4..27667f0ddc3 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1415,9 +1415,10 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin
if(cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS)
break;
- while(!cur->IsWithinLOSInMap(*next)
- || m_spellInfo->DmgClass==SPELL_DAMAGE_CLASS_MELEE
- && !m_caster->isInFront(*next, max_range))
+ while(m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE
+ && !m_caster->isInFront(*next, max_range)
+ || !m_caster->canSeeOrDetect(*next, false)
+ || !cur->IsWithinLOSInMap(*next))
{
++next;
if(next == tempUnitMap.end() || cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS)