mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Scripts/Spells: removed broken Steady Shot energize spell_linked_spell fix and properly fix it via spell script
This commit is contained in:
5
sql/updates/world/cata_classic/2024_11_29_00_world.sql
Normal file
5
sql/updates/world/cata_classic/2024_11_29_00_world.sql
Normal file
@@ -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');
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user