diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Spell.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 89f1091505f..ab075be8201 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1861,7 +1861,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; @@ -1870,14 +1870,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; @@ -1998,9 +1998,9 @@ void Spell::SetTargetMap(uint32 i, uint32 cur) sLog.outErrorDb("Spell (ID: %u) (caster Entry: %u) does not have record in `spell_script_target`", m_spellInfo->Id, m_caster->GetEntry()); if(IsPositiveEffect(m_spellInfo->Id, i)) - SearchAreaTarget(unitList, radius, PUSH_DST_CENTER, SPELL_TARGETS_ALLY); + SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ALLY); else - SearchAreaTarget(unitList, radius, PUSH_DST_CENTER, SPELL_TARGETS_ENEMY); + SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENEMY); } // let it be done in one check? else @@ -2008,7 +2008,7 @@ void Spell::SetTargetMap(uint32 i, uint32 cur) for(SpellScriptTarget::const_iterator i_spellST = lower; i_spellST != upper; ++i_spellST) { if(i_spellST->second.type == SPELL_TARGET_TYPE_CREATURE) - SearchAreaTarget(unitList, radius, PUSH_DST_CENTER, SPELL_TARGETS_ENTRY, i_spellST->second.targetEntry); + SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENTRY, i_spellST->second.targetEntry); } } break; |
