aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/cata_classic/2024_11_29_00_world.sql5
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp24
2 files changed, 28 insertions, 1 deletions
diff --git a/sql/updates/world/cata_classic/2024_11_29_00_world.sql b/sql/updates/world/cata_classic/2024_11_29_00_world.sql
new file mode 100644
index 00000000000..3e5e0c06a8d
--- /dev/null
+++ b/sql/updates/world/cata_classic/2024_11_29_00_world.sql
@@ -0,0 +1,5 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_hun_steady_shot';
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 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 a3ebb2a2bfc..12797725746 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -31,7 +31,8 @@ namespace Scripts::Spells::Hunter
{
enum HunterSpells
{
- SPELL_HUN_IMPROVED_STEADY_SHOT_TRIGGERED = 53220
+ SPELL_HUN_IMPROVED_STEADY_SHOT_TRIGGERED = 53220,
+ SPELL_HUN_STEADY_SHOT_ENERGIZE = 77443
};
enum HunterSpellFamilies
@@ -85,10 +86,31 @@ namespace Scripts::Spells::Hunter
private:
uint8 _steadyShotCount = 0;
};
+
+ // 56641 - Steady Shot
+ class spell_hun_steady_shot : public SpellScript
+ {
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_HUN_STEADY_SHOT_ENERGIZE });
+ }
+
+ // Cast the energize spell when successfully launching the spell against a target. Will not trigger when the target is missed (intentional)
+ void HandleEnergize(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell(nullptr, SPELL_HUN_STEADY_SHOT_ENERGIZE, CastSpellExtraArgs(TRIGGERED_FULL_MASK));
+ }
+
+ void Register() override
+ {
+ OnEffectLaunchTarget += SpellEffectFn(spell_hun_steady_shot::HandleEnergize, EFFECT_0, SPELL_EFFECT_NORMALIZED_WEAPON_DMG);
+ }
+ };
}
void AddSC_hunter_spell_scripts()
{
using namespace Scripts::Spells::Hunter;
RegisterSpellScript(spell_hun_improved_steady_shot);
+ RegisterSpellScript(spell_hun_steady_shot);
}