[11655] Add script effect of spell 62678 and 62688

Target 91 may require further adjustments.
This commit is contained in:
zergtmn 2011-06-19 22:00:36 +06:00
parent 0ebfe92e41
commit ba7ce1d7c3
4 changed files with 25 additions and 2 deletions

View file

@ -1651,6 +1651,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
targetUnitMap.push_back(m_caster);
break;
}
case TARGET_91:
case TARGET_RANDOM_NEARBY_DEST:
{
radius *= sqrtf(rand_norm_f()); // Get a random point in circle. Use sqrt(rand) to correct distribution when converting polar to Cartesian coordinates.
@ -1661,7 +1662,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
m_caster->UpdateGroundPositionZ(dest_x, dest_y, dest_z);
m_targets.setDestination(dest_x, dest_y, dest_z);
if (radius > 0.0f)
if (targetMode == TARGET_RANDOM_NEARBY_DEST && radius > 0.0f)
{
// caster included here?
FillAreaTargets(targetUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_ALL);