diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2012-12-04 20:50:01 +0100 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2012-12-04 20:50:01 +0100 |
commit | 082c3f4267ea84a3193bdd5a15eea4a00edf397f (patch) | |
tree | c442dbb7c4ade246be8256f4d284b24f64ab8c53 /src | |
parent | 40b010e3ad9ca2bbc7ad4dc4bc469362f4e1d7b5 (diff) |
Core/Hunter: Fix Furious Howl targets
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index a73af6892ca..e52034ed2d9 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -706,6 +706,36 @@ class spell_hun_tame_beast : public SpellScriptLoader } }; +class spell_hun_furious_howl : public SpellScriptLoader +{ + public: + spell_hun_furious_howl() : SpellScriptLoader("spell_hun_furious_howl") { } + + class spell_hun_furious_howl_SpellScript : public SpellScript + { + PrepareSpellScript(spell_hun_furious_howl_SpellScript); + + void FilterTargets(std::list<WorldObject*>& targets) + { + targets.clear(); + targets.push_back(GetCaster()); + if (Unit* owner = GetCaster()->GetOwner()) + targets.push_back(owner); + } + + void Register() + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_furious_howl_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY); + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_furious_howl_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_PARTY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_hun_furious_howl_SpellScript(); + } +}; + void AddSC_hunter_spell_scripts() { new spell_hun_aspect_of_the_beast(); @@ -722,4 +752,5 @@ void AddSC_hunter_spell_scripts() new spell_hun_misdirection_proc(); new spell_hun_disengage(); new spell_hun_tame_beast(); + new spell_hun_furious_howl(); } |