diff options
-rw-r--r-- | sql/updates/world/master/2017_06_12_00_world.sql | 4 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 36 |
2 files changed, 40 insertions, 0 deletions
diff --git a/sql/updates/world/master/2017_06_12_00_world.sql b/sql/updates/world/master/2017_06_12_00_world.sql new file mode 100644 index 00000000000..71dde483721 --- /dev/null +++ b/sql/updates/world/master/2017_06_12_00_world.sql @@ -0,0 +1,4 @@ +-- Exhilaration +DELETE FROM `spell_script_names` where `ScriptName`='spell_hun_exhilaration'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(109304,'spell_hun_exhilaration'); diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 2a3da26f552..bc2a781f3ab 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -37,11 +37,13 @@ enum HunterSpells SPELL_HUNTER_CHIMERA_SHOT_HEAL = 53353, SPELL_HUNTER_EXHILARATION = 109304, SPELL_HUNTER_EXHILARATION_PET = 128594, + SPELL_HUNTER_EXHILARATION_R2 = 231546, SPELL_HUNTER_FIRE = 82926, SPELL_HUNTER_GENERIC_ENERGIZE_FOCUS = 91954, SPELL_HUNTER_IMPROVED_MEND_PET = 24406, SPELL_HUNTER_INSANITY = 95809, SPELL_HUNTER_LOCK_AND_LOAD = 56453, + SPELL_HUNTER_LONE_WOLF = 155228, SPELL_HUNTER_MASTERS_CALL_TRIGGERED = 62305, SPELL_HUNTER_MISDIRECTION_PROC = 35079, SPELL_HUNTER_PET_LAST_STAND_TRIGGERED = 53479, @@ -264,6 +266,39 @@ class spell_hun_disengage : public SpellScriptLoader } }; +// 109304 - Exhilaration +class spell_hun_exhilaration : public SpellScriptLoader +{ + public: + spell_hun_exhilaration() : SpellScriptLoader("spell_hun_exhilaration") { } + + class spell_hun_exhilaration_SpellScript : public SpellScript + { + PrepareSpellScript(spell_hun_exhilaration_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_HUNTER_EXHILARATION_R2, SPELL_HUNTER_LONE_WOLF }); + } + + void HandleOnHit() + { + if (GetCaster()->HasAura(SPELL_HUNTER_EXHILARATION_R2) && !GetCaster()->HasAura(SPELL_HUNTER_LONE_WOLF)) + GetCaster()->CastSpell((Unit*)nullptr, SPELL_HUNTER_EXHILARATION_PET, true); + } + + void Register() override + { + OnHit += SpellHitFn(spell_hun_exhilaration_SpellScript::HandleOnHit); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_hun_exhilaration_SpellScript(); + } +}; + // 212658 - Hunting Party class spell_hun_hunting_party : public SpellScriptLoader { @@ -1026,6 +1061,7 @@ void AddSC_hunter_spell_scripts() new spell_hun_chimera_shot(); new spell_hun_cobra_shot(); new spell_hun_disengage(); + new spell_hun_exhilaration(); new spell_hun_hunting_party(); new spell_hun_improved_mend_pet(); new spell_hun_last_stand_pet(); |