From dd89c54c6ec903f491d7acdec00685b20bcfe1c4 Mon Sep 17 00:00:00 2001 From: QAston Date: Wed, 21 Jul 2010 02:06:51 +0200 Subject: *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 --- src/server/game/Spells/Spell.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/server/game/Spells/Spell.cpp') 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; } -- cgit v1.2.3