mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Added unit targets for TARGET_TYPE_DEST_TARGET and TARGET_TYPE_DEST_CASTER to tackle the cases where unit targets are required but there is no other implicit target to produce them (like in 53, 0 combination).
This works in conjunction with my next commit. --HG-- branch : trunk
This commit is contained in:
@@ -2002,6 +2002,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
Position pos;
|
||||
m_caster->GetNearPosition(pos, dist, angle);
|
||||
m_targets.setDst(&pos); // also flag
|
||||
AddUnitTarget(m_caster, i);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2017,6 +2018,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
if(cur == TARGET_DST_TARGET_ENEMY || cur == TARGET_DEST_TARGET_ANY)
|
||||
{
|
||||
m_targets.setDst(target);
|
||||
AddUnitTarget(target, i);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2045,6 +2047,9 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
Position pos;
|
||||
target->GetNearPosition(pos, dist, angle);
|
||||
m_targets.setDst(&pos);
|
||||
// Teleports use this as destination
|
||||
if (m_spellInfo->Effect[i] != SPELL_EFFECT_TELEPORT_UNITS)
|
||||
AddUnitTarget(target, i);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user