aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Spell.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 9c9fde63796..36a73ba3109 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1856,7 +1856,7 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
case TARGET_TYPE_CHANNEL:
{
- if(!m_caster->m_currentSpells[CURRENT_CHANNELED_SPELL])
+ if(!m_originalCaster || !m_originalCaster->m_currentSpells[CURRENT_CHANNELED_SPELL])
{
sLog.outError( "SPELL: no current channeled spell for spell ID %u", m_spellInfo->Id );
break;
@@ -1865,14 +1865,14 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
switch(cur)
{
case TARGET_UNIT_CHANNEL:
- if(Unit* target = m_caster->m_currentSpells[CURRENT_CHANNELED_SPELL]->m_targets.getUnitTarget())
+ if(Unit* target = m_originalCaster->m_currentSpells[CURRENT_CHANNELED_SPELL]->m_targets.getUnitTarget())
AddUnitTarget(target, i);
else
sLog.outError( "SPELL: cannot find channel spell target for spell ID %u", m_spellInfo->Id );
break;
case TARGET_DEST_CHANNEL:
- if(m_caster->m_currentSpells[CURRENT_CHANNELED_SPELL]->m_targets.HasDst())
- m_targets = m_caster->m_currentSpells[CURRENT_CHANNELED_SPELL]->m_targets;
+ if(m_originalCaster->m_currentSpells[CURRENT_CHANNELED_SPELL]->m_targets.HasDst())
+ m_targets = m_originalCaster->m_currentSpells[CURRENT_CHANNELED_SPELL]->m_targets;
else
sLog.outError( "SPELL: cannot find channel spell destination for spell ID %u", m_spellInfo->Id );
break;