[9856] Add dummy effect of spell 51840

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-05-09 23:15:13 +02:00
parent fc4c64b549
commit aff0d77692
2 changed files with 25 additions and 1 deletions

View file

@ -1502,6 +1502,30 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
m_caster->CastSpell(m_caster, 30452, true, NULL); m_caster->CastSpell(m_caster, 30452, true, NULL);
return; return;
} }
case 51840: // Despawn Fruit Tosser
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
return;
if (roll_chance_i(20))
{
// summon NPC, or...
unitTarget->CastSpell(m_caster, 52070, true);
}
else
{
// ...drop banana, orange or papaya
switch(urand(0,2))
{
case 0: unitTarget->CastSpell(m_caster, 51836, true); break;
case 1: unitTarget->CastSpell(m_caster, 51837, true); break;
case 2: unitTarget->CastSpell(m_caster, 51839, true); break;
}
}
((Creature*)unitTarget)->ForcedDespawn();
return;
}
case 52308: // Take Sputum Sample case 52308: // Take Sputum Sample
{ {
switch(eff_idx) switch(eff_idx)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9855" #define REVISION_NR "9856"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__