Skip to content

Commit

Permalink
Add script for 8606 spell
Browse files Browse the repository at this point in the history
Requires spell_target_position data from
cmangos/tbc-db@457c37b
@Grz3s
  • Loading branch information
killerwife committed Jul 4, 2017
1 parent 315e48d commit 73cb091
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,12 +805,23 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
if (m_CastItem && unitTarget)
{
// 8345 - Control the machine | 8346 = Malfunction the machine (root) | 8347 = Taunt/enrage the machine
const uint32 spell_list[3] = {8345, 8346, 8347};
const uint32 spell_list[3] = { 8345, 8346, 8347 };
m_caster->CastSpell(unitTarget, spell_list[urand(0, 2)], TRIGGERED_OLD_TRIGGERED, m_CastItem);
}

return;
}
case 8606: //Summon Cyclonian
{
if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION))
return;

float x, y, z;
m_targets.getDestination(x, y, z); // database loaded coordinates due to target type
Creature* pCreature = m_caster->SummonCreature(6239, x, y, z, 0.0f, TEMPSUMMON_TIMED_OOC_DESPAWN, 30 * IN_MILLISECONDS);

This comment has been minimized.

Copy link
@xfurry

xfurry Jul 4, 2017

Member

You don't need to define the Creature* pCreature since you are not going to use the object later in the code.
Just use the SummonCreature() function and that's it.

Also, please align the comment // Cummon cyclonian with the other spell name comments 😉


return;
}
case 9204: // Hate to Zero
{
if (unitTarget)
Expand Down

0 comments on commit 73cb091

Please sign in to comment.