aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authorKandera <KanderaDev@gmail.com>2012-03-26 11:37:03 -0400
committerKandera <KanderaDev@gmail.com>2012-03-26 11:37:03 -0400
commit7b357a502859825cfb9fd47adc6b461859e3dcc1 (patch)
treeff40ee40835ca87f65eb743ff00a01eee42a9aef /src/server/scripts/Spells
parentb1ca1ee5ec90715fcb2682e6d47ac5f7d425146b (diff)
Core/Spells: Fix Misdirection (thx to elron) closes #5869, #4343
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 855af75cd83..1d1e43d5c6d 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -560,6 +560,64 @@ class spell_hun_pet_carrion_feeder : public SpellScriptLoader
}
};
+// 34477 Misdirection
+class spell_hun_misdirection : public SpellScriptLoader
+{
+ public:
+ spell_hun_misdirection() : SpellScriptLoader("spell_hun_misdirection") { }
+
+ class spell_hun_misdirection_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_hun_misdirection_AuraScript);
+
+ void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (GetDuration())
+ caster->SetReducedThreatPercent(0, 0);
+ }
+
+ void Register()
+ {
+ AfterEffectRemove += AuraEffectRemoveFn(spell_hun_misdirection_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_hun_misdirection_AuraScript();
+ }
+};
+
+// 35079 Misdirection proc
+class spell_hun_misdirection_proc : public SpellScriptLoader
+{
+ public:
+ spell_hun_misdirection_proc() : SpellScriptLoader("spell_hun_misdirection_proc") { }
+
+ class spell_hun_misdirection_proc_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_hun_misdirection_proc_AuraScript);
+
+ void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (GetCaster())
+ GetCaster()->SetReducedThreatPercent(0, 0);
+ }
+
+ void Register()
+ {
+ AfterEffectRemove += AuraEffectRemoveFn(spell_hun_misdirection_proc_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_hun_misdirection_proc_AuraScript();
+ }
+};
+
+
void AddSC_hunter_spell_scripts()
{
new spell_hun_aspect_of_the_beast();