diff options
author | tobmaps <spambot42@yandex.ru> | 2011-06-21 19:45:36 +0700 |
---|---|---|
committer | tobmaps <spambot42@yandex.ru> | 2011-06-21 19:45:36 +0700 |
commit | a02d145a17eee1aff3652c7371d8f6502dc62788 (patch) | |
tree | 8fa7e13908794f5a88ac524d83bddd1e68c8d335 /src | |
parent | 8bf53f4a6b868962da49268ac87f236acf50daf9 (diff) |
Core/Spells: Prevent hit main target by 5 yard AOE effect of Starfall
Closes #1186
Closes #2085
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
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<Unit*>& 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(); } |