mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 01:37:05 +00:00
[10841] Implement charges counting for magnet target auras.
Also implement skip spell effects redirecting if magnet target can't be targeted by this spell effect base at spell effect target data requirements. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
1b4210e38c
commit
08b32d7d32
4 changed files with 34 additions and 12 deletions
|
|
@ -1722,7 +1722,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
{
|
||||
if (EffectChainTarget <= 1)
|
||||
{
|
||||
if(Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), m_spellInfo))
|
||||
if(Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), this, effIndex))
|
||||
{
|
||||
m_targets.setUnitTarget(pUnitTarget);
|
||||
targetUnitMap.push_back(pUnitTarget);
|
||||
|
|
@ -2077,7 +2077,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
}
|
||||
else
|
||||
{
|
||||
if(Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), m_spellInfo))
|
||||
if(Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), this, effIndex))
|
||||
{
|
||||
m_targets.setUnitTarget(pUnitTarget);
|
||||
targetUnitMap.push_back(pUnitTarget);
|
||||
|
|
@ -2107,7 +2107,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
break;
|
||||
case TARGET_SINGLE_ENEMY:
|
||||
{
|
||||
if(Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), m_spellInfo))
|
||||
if(Unit* pUnitTarget = m_caster->SelectMagnetTarget(m_targets.getUnitTarget(), this, effIndex))
|
||||
{
|
||||
m_targets.setUnitTarget(pUnitTarget);
|
||||
targetUnitMap.push_back(pUnitTarget);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue