aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruntaught <untaugh@mail.bg>2014-07-07 16:27:09 +0200
committerjoschiwald <joschiwald.trinity@gmail.com>2014-07-07 16:27:09 +0200
commitf64add02e8d65f3f75f4bd35918a7a13ff35fbe8 (patch)
treeeb7daee6d095b099b93946e6c6cfda27ecda4bd9
parentfb52609c3e337900bf5fdc0e4d1ae50e5543cc39 (diff)
Core/Spells: fixed Fate Rune of Unsurpassed Vigor
-rw-r--r--sql/updates/world/2014_07_07_01_world_spell_script_names.sql3
-rw-r--r--src/server/scripts/Spells/spell_item.cpp40
2 files changed, 43 insertions, 0 deletions
diff --git a/sql/updates/world/2014_07_07_01_world_spell_script_names.sql b/sql/updates/world/2014_07_07_01_world_spell_script_names.sql
new file mode 100644
index 00000000000..5926d055b0d
--- /dev/null
+++ b/sql/updates/world/2014_07_07_01_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE spell_id=7434;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(7434,'spell_item_fate_rune_of_unsurpassed_vigor');
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index a17d7dce2ea..30f9e914037 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -383,6 +383,45 @@ class spell_item_echoes_of_light : public SpellScriptLoader
}
};
+// 7434 - Fate Rune of Unsurpassed Vigor
+enum FateRuneOfUnsurpassedVigor
+{
+ SPELL_UNSURPASSED_VIGOR = 25733
+};
+
+class spell_item_fate_rune_of_unsurpassed_vigor : public SpellScriptLoader
+{
+ public:
+ spell_item_fate_rune_of_unsurpassed_vigor() : SpellScriptLoader("spell_item_fate_rune_of_unsurpassed_vigor") { }
+
+ class spell_item_fate_rune_of_unsurpassed_vigor_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_item_fate_rune_of_unsurpassed_vigor_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_UNSURPASSED_VIGOR))
+ return false;
+ return true;
+ }
+
+ void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
+ {
+ GetTarget()->CastSpell(GetTarget(), SPELL_UNSURPASSED_VIGOR, true);
+ }
+
+ void Register() override
+ {
+ OnEffectProc += AuraEffectProcFn(spell_item_fate_rune_of_unsurpassed_vigor_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_item_fate_rune_of_unsurpassed_vigor_AuraScript();
+ }
+};
+
// http://www.wowhead.com/item=47499 Flask of the North
// 67019 Flask of the North
enum FlaskOfTheNorthSpells
@@ -2607,6 +2646,7 @@ void AddSC_item_spell_scripts()
new spell_item_desperate_defense();
new spell_item_deviate_fish();
new spell_item_echoes_of_light();
+ new spell_item_fate_rune_of_unsurpassed_vigor();
new spell_item_flask_of_the_north();
new spell_item_gnomish_death_ray();
new spell_item_make_a_wish();