From a02d145a17eee1aff3652c7371d8f6502dc62788 Mon Sep 17 00:00:00 2001 From: tobmaps Date: Tue, 21 Jun 2011 19:45:36 +0700 Subject: Core/Spells: Prevent hit main target by 5 yard AOE effect of Starfall Closes #1186 Closes #2085 --- src/server/scripts/Spells/spell_druid.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src') diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 1166ccdebb0..6f0ca65ce6e 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -270,6 +270,32 @@ class spell_dru_t10_restoration_4p_bonus : public SpellScriptLoader } }; +class spell_dru_starfall_aoe : public SpellScriptLoader +{ + public: + spell_dru_starfall_aoe() : SpellScriptLoader("spell_dru_starfall_aoe") { } + + class spell_dru_starfall_aoe_SpellScript : public SpellScript + { + PrepareSpellScript(spell_dru_starfall_aoe_SpellScript); + + void FilterTargets(std::list& unitList) + { + unitList.remove(GetTargetUnit()); + } + + void Register() + { + OnUnitTargetSelect += SpellUnitTargetFn(spell_dru_starfall_aoe_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_AREA_ENEMY_DST); + } + }; + + SpellScript *GetSpellScript() const + { + return new spell_dru_starfall_aoe_SpellScript(); + } +}; + void AddSC_druid_spell_scripts() { new spell_dru_glyph_of_starfire(); @@ -277,4 +303,5 @@ void AddSC_druid_spell_scripts() new spell_dru_primal_tenacity(); new spell_dru_savage_defense(); new spell_dru_t10_restoration_4p_bonus(); + new spell_dru_starfall_aoe(); } -- cgit v1.2.3