diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 6493594c9..523205699 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1685,7 +1685,9 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& // This targetMode is often used as 'last' implicitTarget for positive spells, that just require coordinates // and no unitTarget (e.g. summon effects). As MaNGOS always needs a unitTarget we add just the caster here. - if (IsPositiveSpell(m_spellInfo)) + // Logic: This is first target, and no second target => use m_caster -- This is second target: use m_caster if the spell is positive or a summon spell + if ((spellEffect->EffectImplicitTargetA == targetMode && spellEffect->EffectImplicitTargetB == TARGET_NONE) || + (spellEffect->EffectImplicitTargetB == targetMode && (IsPositiveSpell(m_spellInfo) || spellEffect->Effect == SPELL_EFFECT_SUMMON))) targetUnitMap.push_back(m_caster); break; } @@ -1720,7 +1722,9 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& // This targetMode is often used as 'last' implicitTarget for positive spells, that just require coordinates // and no unitTarget (e.g. summon effects). As MaNGOS always needs a unitTarget we add just the caster here. - if (IsPositiveSpell(m_spellInfo)) + // Logic: This is first target, and no second target => use m_caster -- This is second target: use m_caster if the spell is positive or a summon spell + if ((spellEffect->EffectImplicitTargetA == targetMode && spellEffect->EffectImplicitTargetB == TARGET_NONE) || + (spellEffect->EffectImplicitTargetB == targetMode && (IsPositiveSpell(m_spellInfo) || spellEffect->Effect == SPELL_EFFECT_SUMMON))) targetUnitMap.push_back(m_caster); break; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 486c48b11..c71547b09 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12556" + #define REVISION_NR "12557" #endif // __REVISION_NR_H__