mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 13:37:01 +00:00
[11655] Add script effect of spell 62678 and 62688
Target 91 may require further adjustments.
This commit is contained in:
parent
0ebfe92e41
commit
ba7ce1d7c3
4 changed files with 25 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue