aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobmaps <spambot42@yandex.ru>2011-06-21 19:45:36 +0700
committertobmaps <spambot42@yandex.ru>2011-06-21 19:45:36 +0700
commita02d145a17eee1aff3652c7371d8f6502dc62788 (patch)
tree8fa7e13908794f5a88ac524d83bddd1e68c8d335
parent8bf53f4a6b868962da49268ac87f236acf50daf9 (diff)
Core/Spells: Prevent hit main target by 5 yard AOE effect of Starfall
Closes #1186 Closes #2085
-rw-r--r--sql/updates/world/2011_06_21_01_world_spell_script_names.sql3
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp27
2 files changed, 30 insertions, 0 deletions
diff --git a/sql/updates/world/2011_06_21_01_world_spell_script_names.sql b/sql/updates/world/2011_06_21_01_world_spell_script_names.sql
new file mode 100644
index 00000000000..087891c0cbf
--- /dev/null
+++ b/sql/updates/world/2011_06_21_01_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` = -50294;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(-50294,'spell_dru_starfall_aoe');
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();
}