[11042] Add dummy effect of spell 47305 and script effect of 47311

Note: spell animation (the fun part of the spells) does not play as it should, so this implementation should be revised at some point to correct that problem.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2011-01-19 16:57:37 +01:00
parent 452b3d9e05
commit 6f2804d513
2 changed files with 38 additions and 1 deletions

View file

@ -1495,6 +1495,25 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, 47178, true);
return;
}
case 47305: // Potent Explosive Charge
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
return;
// only if below 80% hp
if (unitTarget->GetHealthPercent() > 80.0f)
return;
// Issues with explosion animation (remove insta kill spell resolves the issue)
// Quest - Jormungar Explosion Spell Spawner
unitTarget->CastSpell(unitTarget, 47311, true);
// Potent Explosive Charge
unitTarget->CastSpell(unitTarget, 47306, true);
return;
}
case 49357: // Brewfest Mount Transformation
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
@ -6177,6 +6196,24 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
break;
}
case 47311: // Quest - Jormungar Explosion Spell Spawner
{
// Summons npc's. They are expected to summon GO from 47315
// but there is no way to get the summoned, to trigger a spell
// cast (workaround can be done with ai script).
// Quest - Jormungar Explosion Summon Object
for(int i = 0; i < 2; ++i)
m_caster->CastSpell(m_caster, 47309, true);
for(int i = 0; i < 2; ++i)
m_caster->CastSpell(m_caster, 47924, true);
for(int i = 0; i < 2; ++i)
m_caster->CastSpell(m_caster, 47925, true);
return;
}
case 47393: // The Focus on the Beach: Quest Completion Script
{
if (!unitTarget)