aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2010-07-21 02:06:51 +0200
committerQAston <none@none>2010-07-21 02:06:51 +0200
commitdd89c54c6ec903f491d7acdec00685b20bcfe1c4 (patch)
treeca88b380d3ddbcf6fd91263fd9d623af0593fcd3 /src/server/game/Spells/Spell.cpp
parent1944cd17a1b71a23e6597d28a06de04186184c69 (diff)
*Move target handling of TARGET_DEST_CASTER_FRONT_LEAP out of SPELL_EFFECT_LEAP handler, this fixes spells with SPELL_EFFECT_LEAP using other target types.
--HG-- branch : trunk
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index d845ee76b22..052c829676b 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2005,6 +2005,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
float objSize = m_caster->GetObjectSize();
dist = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
+ if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, dist, this);
if (dist < objSize)
dist = objSize;
else if (cur == TARGET_DEST_CASTER_RANDOM)
@@ -2026,7 +2027,10 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
}
Position pos;
- m_caster->GetNearPosition(pos, dist, angle);
+ if (cur == TARGET_DEST_CASTER_FRONT_LEAP)
+ m_caster->GetFirstCollisionPosition(pos, dist, angle);
+ else
+ m_caster->GetNearPosition(pos, dist, angle);
m_targets.setDst(&pos); // also flag
break;
}