aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-02 18:04:22 -0500
committermegamage <none@none>2009-05-02 18:04:22 -0500
commit83a383a4604591b2eaa5c258c4ecf118b12ff7de (patch)
treeb665f13b1a1934ff8e485e632fbd7352ff86e6dc /src
parent60ba92c02f715aa1a6c12df47841934df34546d4 (diff)
*Check originalCaster for TARGET_TYPE_CHANNEL spells.
--HG-- branch : trunk
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;