[c12557] Fix some summon spells which have only coordinate targeting

This commit is contained in:
Schmoozerd 2013-05-31 09:08:33 +01:00 committed by Antz
parent 788803fe5f
commit d3e9161f96
2 changed files with 7 additions and 3 deletions

View file

@ -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 // 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. // 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); targetUnitMap.push_back(m_caster);
break; 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 // 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. // 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); targetUnitMap.push_back(m_caster);
break; break;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "12556" #define REVISION_NR "12557"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__