aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_07_22_02_world_spell_spell_script_names_434.sql3
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp41
2 files changed, 44 insertions, 0 deletions
diff --git a/sql/updates/world/2013_07_22_02_world_spell_spell_script_names_434.sql b/sql/updates/world/2013_07_22_02_world_spell_spell_script_names_434.sql
new file mode 100644
index 00000000000..3723575d273
--- /dev/null
+++ b/sql/updates/world/2013_07_22_02_world_spell_spell_script_names_434.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=56641;
+INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
+(56641,'spell_hun_steady_shot');
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 3335442b106..7ead0966fad 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -53,6 +53,7 @@ enum HunterSpells
SPELL_HUNTER_READINESS = 23989,
SPELL_HUNTER_SNIPER_TRAINING_R1 = 53302,
SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1 = 64418,
+ SPELL_HUNTER_STEADY_SHOT_FOCUS = 77443,
SPELL_HUNTER_THRILL_OF_THE_HUNT = 34720,
SPELL_DRAENEI_GIFT_OF_THE_NAARU = 59543,
};
@@ -811,6 +812,45 @@ class spell_hun_sniper_training : public SpellScriptLoader
}
};
+// 56641 - Steady Shot
+class spell_hun_steady_shot : public SpellScriptLoader
+{
+ public:
+ spell_hun_steady_shot() : SpellScriptLoader("spell_hun_steady_shot") { }
+
+ class spell_hun_steady_shot_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_hun_steady_shot_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_STEADY_SHOT_FOCUS))
+ return false;
+ return true;
+ }
+
+ bool Load() OVERRIDE
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void HandleOnHit()
+ {
+ GetCaster()->CastSpell(GetCaster(), SPELL_HUNTER_STEADY_SHOT_FOCUS, true);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnHit += SpellHitFn(spell_hun_steady_shot_SpellScript::HandleOnHit);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_hun_steady_shot_SpellScript();
+ }
+};
+
// 1515 - Tame Beast
class spell_hun_tame_beast : public SpellScriptLoader
{
@@ -993,6 +1033,7 @@ void AddSC_hunter_spell_scripts()
new spell_hun_readiness();
new spell_hun_scatter_shot();
new spell_hun_sniper_training();
+ new spell_hun_steady_shot();
new spell_hun_tame_beast();
new spell_hun_target_only_pet_and_owner();
new spell_hun_thrill_of_the_hunt();