*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
This commit is contained in:
1 parent
1944cd17a1
commit
dd89c54c6e
5 files changed
+65
-45
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user