aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLiberate <tbaart@gmail.com>2011-10-19 23:30:25 +0200
committerLiberate <tbaart@gmail.com>2011-10-19 23:30:25 +0200
commitddec56b3e0ec2c2e36264b3ac080fd9ccde099df (patch)
treeed8b6c90fa83b8745441233e74eecdd69e505aa7 /src
parenta658d0b592c3b4957c6aba3267e6c034c1e551d4 (diff)
Core/Spells: Fix shadowfiend.
Fixes #3285
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp7
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp41
2 files changed, 41 insertions, 7 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index bffe9a1871a..83cecf7d884 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -1669,13 +1669,6 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
}
return;
}
- // Priest Shadowfiend (34433) need apply mana gain trigger aura on pet
- case 41967:
- {
- if (Unit* pet = unitTarget->GetGuardianPet())
- pet->CastSpell(pet, 28305, true);
- return;
- }
}
}
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index 07b8a79691a..ef2e4c92190 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -33,6 +33,8 @@ enum PriestSpells
PRIEST_SPELL_PENANCE_R1_HEAL = 47757,
PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED = 33619,
PRIEST_SPELL_REFLECTIVE_SHIELD_R1 = 33201,
+ PRIEST_SPELL_SHADOWFIEND = 34433,
+ PRIEST_SPELL_SHADOWFIEND_TRIGGERED = 28305,
};
// Guardian Spirit
@@ -273,6 +275,44 @@ class spell_pri_reflective_shield_trigger : public SpellScriptLoader
}
};
+class spell_pri_shadowfiend : public SpellScriptLoader
+{
+ public:
+ spell_pri_shadowfiend() : SpellScriptLoader("spell_pri_shadowfiend") { }
+
+ class spell_pri_shadowfiend_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_pri_shadowfiend_SpellScript);
+
+ bool Validate(SpellInfo const* spellEntry)
+ {
+ return sSpellMgr->GetSpellInfo(PRIEST_SPELL_SHADOWFIEND) && sSpellMgr->GetSpellInfo(PRIEST_SPELL_SHADOWFIEND_TRIGGERED);
+ }
+
+ void HandleTriggerSpell(SpellEffIndex /*effIndex*/)
+ {
+ Unit* unitTarget = GetHitUnit();
+ if (!unitTarget)
+ return;
+
+ if (Unit* pet = unitTarget->GetGuardianPet())
+ {
+ pet->CastSpell(pet, PRIEST_SPELL_SHADOWFIEND_TRIGGERED, true);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_pri_shadowfiend_SpellScript::HandleTriggerSpell, EFFECT_1, SPELL_EFFECT_TRIGGER_SPELL);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_pri_shadowfiend_SpellScript;
+ }
+};
+
void AddSC_priest_spell_scripts()
{
new spell_pri_guardian_spirit();
@@ -281,4 +321,5 @@ void AddSC_priest_spell_scripts()
new spell_pri_penance;
new spell_pri_reflective_shield_trigger();
new spell_pri_mind_sear();
+ new spell_pri_shadowfiend();
}