Skip to content

Commit

Permalink
[9463] Add script effect of spell 45691 and dummy effect of 45685
Browse files Browse the repository at this point in the history
Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Feb 27, 2010
1 parent 1b9aa21 commit 6ed7291
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions src/game/SpellEffects.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9462"
#define REVISION_NR "9463"
#endif // __REVISION_NR_H__

0 comments on commit 6ed7291

Please sign in to comment.