[11452] Implement spell 14537 effects.

Also re-add in correct way sql update for prev. commit.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
stfxpi 2011-05-09 05:26:32 +04:00 committed by VladimirMangos
parent 917e832fed
commit 0c33b7bedf
6 changed files with 48 additions and 4 deletions

View file

@ -887,6 +887,37 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
}
return;
}
case 14537: // Six Demon Bag
{
if (!unitTarget)
return;
Unit* newTarget = unitTarget;
uint32 spell_id = 0;
uint32 roll = urand(0, 99);
if (roll < 25) // Fireball (25% chance)
spell_id = 15662;
else if (roll < 50) // Frostbolt (25% chance)
spell_id = 11538;
else if (roll < 70) // Chain Lighting (20% chance)
spell_id = 21179;
else if (roll < 80) // Polymorph (10% chance)
{
spell_id = 14621;
if (urand(0, 9) < 3) // 30% chance to self-cast
newTarget = m_caster;
}
else if (roll < 95) // Enveloping Winds (15% chance)
spell_id = 25189;
else // Summon Felhund minion (5% chance)
{
spell_id = 14642;
newTarget = m_caster;
}
m_caster->CastSpell(newTarget, spell_id, true, m_CastItem);
return;
}
case 15998: // Capture Worg Pup
case 29435: // Capture Female Kaliri Hatchling
{