diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 1289625dc..915c1fdcc 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1895,9 +1895,12 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& { if (Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), this, effIndex)) { - m_targets.setUnitTarget(pUnitTarget); - m_spellFlags |= SPELL_FLAG_REDIRECTED; - targetUnitMap.push_back(pUnitTarget); + if (m_targets.getUnitTarget() != pUnitTarget) + { + m_targets.setUnitTarget(pUnitTarget); + m_spellFlags |= SPELL_FLAG_REDIRECTED; + targetUnitMap.push_back(pUnitTarget); + } } } else @@ -2459,8 +2462,11 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& { if (Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), this, effIndex)) { - m_targets.setUnitTarget(pUnitTarget); - m_spellFlags |= SPELL_FLAG_REDIRECTED; + if (m_targets.getUnitTarget() != pUnitTarget) + { + m_targets.setUnitTarget(pUnitTarget); + m_spellFlags |= SPELL_FLAG_REDIRECTED; + } targetUnitMap.push_back(pUnitTarget); } break; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a8a6efd6b..eeceda298 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 "12642" + #define REVISION_NR "12643" #endif // __REVISION_NR_H__