aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDefu <estafeitor@gmail.com>2017-06-12 22:04:12 +0200
committerShauren <shauren.trinity@gmail.com>2017-06-12 22:04:12 +0200
commitd8247a3b11e02a9f6b181a9b0bf9e9d327c62993 (patch)
tree96c3875910ba283d3f6fef921c3b85587e75e888
parent677b2fba42f995cafa7754a4dfd7de5b73d83ed2 (diff)
Core/Spells: Fixed Hunter spell Exhilaration rank 2
Closes #19858
-rw-r--r--sql/updates/world/master/2017_06_12_00_world.sql4
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp36
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();