mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[c12643] Correct logic when setting SPELL_FLAG_REDIRECTED
This commit is contained in:
parent
c3eccda44d
commit
b835736923
2 changed files with 12 additions and 6 deletions
|
|
@ -1894,12 +1894,15 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
if (EffectChainTarget <= 1)
|
||||
{
|
||||
if (Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), this, effIndex))
|
||||
{
|
||||
if (m_targets.getUnitTarget() != pUnitTarget)
|
||||
{
|
||||
m_targets.setUnitTarget(pUnitTarget);
|
||||
m_spellFlags |= SPELL_FLAG_REDIRECTED;
|
||||
targetUnitMap.push_back(pUnitTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit* pUnitTarget = m_targets.getUnitTarget();
|
||||
|
|
@ -2458,9 +2461,12 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
case TARGET_SINGLE_ENEMY:
|
||||
{
|
||||
if (Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), this, effIndex))
|
||||
{
|
||||
if (m_targets.getUnitTarget() != pUnitTarget)
|
||||
{
|
||||
m_targets.setUnitTarget(pUnitTarget);
|
||||
m_spellFlags |= SPELL_FLAG_REDIRECTED;
|
||||
}
|
||||
targetUnitMap.push_back(pUnitTarget);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12642"
|
||||
#define REVISION_NR "12643"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue