diff options
-rw-r--r-- | sql/updates/world/2012_11_20_00_world_misc.sql | 39 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 36 |
2 files changed, 75 insertions, 0 deletions
diff --git a/sql/updates/world/2012_11_20_00_world_misc.sql b/sql/updates/world/2012_11_20_00_world_misc.sql new file mode 100644 index 00000000000..c0a95134b0a --- /dev/null +++ b/sql/updates/world/2012_11_20_00_world_misc.sql @@ -0,0 +1,39 @@ +-- Mark of the Wild +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=1126; +DELETE FROM `spell_script_names` WHERE `spell_id`=1126 OR `ScriptName`='spell_dru_mark_of_the_wild'; +INSERT INTO `spell_script_names` VALUES +(1126,'spell_dru_mark_of_the_wild'); + +-- Arcane Brilliance +DELETE FROM `spell_script_names` WHERE `spell_id`=1459 OR `ScriptName`='spell_mage_arcane_brilliance'; +INSERT INTO `spell_script_names` VALUES +(1459,'spell_mage_arcane_brilliance'); + +-- Dalaran Brilliance +DELETE FROM `spell_script_names` WHERE `spell_id`=61316 OR `ScriptName`='spell_mage_dalaran_brilliance'; +INSERT INTO `spell_script_names` VALUES +(61316,'spell_mage_dalaran_brilliance'); + +-- Blessing of Kings +DELETE FROM `spell_script_names` WHERE `spell_id`=20217 OR `ScriptName`='spell_pal_blessing_of_kings'; +INSERT INTO `spell_script_names` VALUES +(20217,'spell_pal_blessing_of_kings'); + +-- Blessing of Might +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=19740; +DELETE FROM `spell_script_names` WHERE `spell_id`=19740 OR `ScriptName`='spell_pal_blessing_of_might'; +INSERT INTO `spell_script_names` VALUES +(19740,'spell_pal_blessing_of_might'); + +-- Power Word: Fortitude +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=21562; +DELETE FROM `spell_script_names` WHERE `spell_id`=21562 OR `ScriptName`='spell_pri_power_word_fortitude'; +INSERT INTO `spell_script_names` VALUES +(21562,'spell_pri_power_word_fortitude'); + +-- Shadow Protection +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=27683; +DELETE FROM `spell_scripts` WHERE `id`=27683; +DELETE FROM `spell_script_names` WHERE `spell_id`=27683 OR `ScriptName`='spell_pri_shadow_protection'; +INSERT INTO `spell_script_names` VALUES +(27683,'spell_pri_shadow_protection'); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 65fde6059c9..1f23d0a4d7a 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -3306,6 +3306,35 @@ class spell_gen_gift_of_naaru : public SpellScriptLoader } }; +class spell_gen_increase_stats_buff : public SpellScriptLoader +{ + public: + spell_gen_increase_stats_buff(char const* scriptName) : SpellScriptLoader(scriptName) { } + + class spell_gen_increase_stats_buff_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gen_increase_stats_buff_SpellScript); + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + if (GetHitUnit()->IsInRaidWith(GetCaster())) + GetCaster()->CastSpell(GetCaster(), GetEffectValue() + 1, true); // raid buff + else + GetCaster()->CastSpell(GetHitUnit(), GetEffectValue(), true); // single-target buff + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_gen_increase_stats_buff_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_gen_increase_stats_buff_SpellScript(); + } +}; + void AddSC_generic_spell_scripts() { new spell_gen_absorb0_hitlimit1(); @@ -3382,4 +3411,11 @@ void AddSC_generic_spell_scripts() new spell_gen_upper_deck_create_foam_sword(); new spell_gen_bonked(); new spell_gen_gift_of_naaru(); + new spell_gen_increase_stats_buff("spell_pal_blessing_of_kings"); + new spell_gen_increase_stats_buff("spell_pal_blessing_of_might"); + new spell_gen_increase_stats_buff("spell_dru_mark_of_the_wild"); + new spell_gen_increase_stats_buff("spell_pri_power_word_fortitude"); + new spell_gen_increase_stats_buff("spell_pri_shadow_protection"); + new spell_gen_increase_stats_buff("spell_mage_arcane_brilliance"); + new spell_gen_increase_stats_buff("spell_mage_dalaran_brilliance"); } |