aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXanadu <none@none>2010-03-18 20:41:38 +0100
committerXanadu <none@none>2010-03-18 20:41:38 +0100
commit06d491816357a045d72c9aa1a8a63cc2c77c83d5 (patch)
tree761a72ade24d467d00230fb64f75eb88d2b54080 /src
parentaca2d26bc5060808b22bb268e3a04375a1ba6d18 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/game/Spell.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 88d22b63164..b71d4bb7c1e 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -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;
}