mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 11:21:58 +01:00
Scripts/Spells: Update talent Concussive Shot to 11.1 (#30855)
This commit is contained in:
4
sql/updates/world/master/2025_04_13_01_world.sql
Normal file
4
sql/updates/world/master/2025_04_13_01_world.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN (56641, 193455);
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(56641, 'spell_hun_concussive_shot'),
|
||||
(193455, 'spell_hun_concussive_shot');
|
||||
@@ -39,6 +39,7 @@ enum HunterSpells
|
||||
SPELL_HUNTER_AIMED_SHOT = 19434,
|
||||
SPELL_HUNTER_ASPECT_CHEETAH_SLOW = 186258,
|
||||
SPELL_HUNTER_ASPECT_OF_THE_TURTLE_PACIFY_AURA = 205769,
|
||||
SPELL_HUNTER_CONCUSSIVE_SHOT = 5116,
|
||||
SPELL_HUNTER_EXHILARATION = 109304,
|
||||
SPELL_HUNTER_EXHILARATION_PET = 128594,
|
||||
SPELL_HUNTER_EXHILARATION_R2 = 231546,
|
||||
@@ -60,6 +61,7 @@ enum HunterSpells
|
||||
SPELL_HUNTER_POSTHASTE_TALENT = 109215,
|
||||
SPELL_HUNTER_RAPID_FIRE_DAMAGE = 257045,
|
||||
SPELL_HUNTER_RAPID_FIRE_ENERGIZE = 263585,
|
||||
SPELL_HUNTER_STEADY_SHOT = 56641,
|
||||
SPELL_HUNTER_STEADY_SHOT_FOCUS = 77443,
|
||||
SPELL_HUNTER_T9_4P_GREATNESS = 68130,
|
||||
SPELL_HUNTER_T29_2P_MARKSMANSHIP_DAMAGE = 394371,
|
||||
@@ -179,6 +181,35 @@ class spell_hun_cobra_sting : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 5116 - Concussive Shot (attached to 193455 - Cobra Shot and 56641 - Steady Shot)
|
||||
class spell_hun_concussive_shot : public SpellScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo ({ SPELL_HUNTER_CONCUSSIVE_SHOT, })
|
||||
&& ValidateSpellEffect({ { SPELL_HUNTER_STEADY_SHOT, EFFECT_2 } });
|
||||
}
|
||||
|
||||
void HandleDuration(SpellEffIndex /*effIndex*/) const
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
|
||||
if (Aura* concussiveShot = GetHitUnit()->GetAura(SPELL_HUNTER_CONCUSSIVE_SHOT, caster->GetGUID()))
|
||||
{
|
||||
SpellInfo const* steadyShot = sSpellMgr->AssertSpellInfo(SPELL_HUNTER_STEADY_SHOT, GetCastDifficulty());
|
||||
Milliseconds extraDuration = Seconds(steadyShot->GetEffect(EFFECT_2).CalcValue(caster) / 10);
|
||||
Milliseconds newDuration = Milliseconds(concussiveShot->GetDuration()) + extraDuration;
|
||||
concussiveShot->SetDuration(newDuration.count());
|
||||
concussiveShot->SetMaxDuration(newDuration.count());
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_hun_concussive_shot::HandleDuration, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
// 109304 - Exhilaration
|
||||
class spell_hun_exhilaration : public SpellScript
|
||||
{
|
||||
@@ -819,6 +850,7 @@ void AddSC_hunter_spell_scripts()
|
||||
RegisterSpellScript(spell_hun_aspect_cheetah);
|
||||
RegisterSpellScript(spell_hun_aspect_of_the_turtle);
|
||||
RegisterSpellScript(spell_hun_cobra_sting);
|
||||
RegisterSpellScript(spell_hun_concussive_shot);
|
||||
RegisterSpellScript(spell_hun_exhilaration);
|
||||
RegisterSpellScript(spell_hun_explosive_shot);
|
||||
RegisterSpellScript(spell_hun_hunting_party);
|
||||
|
||||
Reference in New Issue
Block a user