[9463] Add script effect of spell 45691 and dummy effect of 45685

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-02-26 23:51:42 +01:00
parent a421990a5b
commit fc08496048
2 changed files with 28 additions and 1 deletions

View file

@ -1213,6 +1213,15 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
return;
}
case 45685: // Magnataur On Death 2
{
m_caster->RemoveAurasDueToSpell(45673);
m_caster->RemoveAurasDueToSpell(45672);
m_caster->RemoveAurasDueToSpell(45677);
m_caster->RemoveAurasDueToSpell(45681);
m_caster->RemoveAurasDueToSpell(45683);
return;
}
case 45990: // Collect Oil
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
@ -5413,6 +5422,24 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
return;
}
case 45691: // Magnataur On Death 1
{
// assuming caster is creature, if not, then return
if (m_caster->GetTypeId() != TYPEID_UNIT)
return;
Player* pPlayer = ((Creature*)m_caster)->GetLootRecipient();
if (!pPlayer)
return;
if (pPlayer->HasAura(45674) || pPlayer->HasAura(45675) || pPlayer->HasAura(45678) || pPlayer->HasAura(45682) || pPlayer->HasAura(45684))
pPlayer->CastSpell(pPlayer, 45686, true);
m_caster->CastSpell(m_caster, 45685, true);
return;
}
case 46203: // Goblin Weather Machine
{
if (!unitTarget)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9462"
#define REVISION_NR "9463"
#endif // __REVISION_NR_H__