Scripts/Spells: Implement hunter talent Emergency Salve (#30854)

This commit is contained in:
Aqua Deus
2025-04-13 15:17:39 +02:00
committed by GitHub
parent 1293b0d23b
commit c2d04486b3
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (5384, 186265);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(5384, 'spell_hun_emergency_salve'),
(186265, 'spell_hun_emergency_salve');

View File

@@ -40,6 +40,8 @@ enum HunterSpells
SPELL_HUNTER_ASPECT_CHEETAH_SLOW = 186258,
SPELL_HUNTER_ASPECT_OF_THE_TURTLE_PACIFY_AURA = 205769,
SPELL_HUNTER_CONCUSSIVE_SHOT = 5116,
SPELL_HUNTER_EMERGENCY_SALVE_TALENT = 459517,
SPELL_HUNTER_EMERGENCY_SALVE_DISPEL = 459521,
SPELL_HUNTER_EXHILARATION = 109304,
SPELL_HUNTER_EXHILARATION_PET = 128594,
SPELL_HUNTER_EXHILARATION_R2 = 231546,
@@ -210,6 +212,33 @@ class spell_hun_concussive_shot : public SpellScript
}
};
// 459517 - Concussive Shot (attached to 186265 - Aspect of the Turtle and 5384 - Feign Death)
class spell_hun_emergency_salve : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_EMERGENCY_SALVE_TALENT, SPELL_HUNTER_EMERGENCY_SALVE_DISPEL });
}
bool Load() override
{
return GetCaster()->HasAura(SPELL_HUNTER_EMERGENCY_SALVE_TALENT);
}
void HandleAfterCast() const
{
GetCaster()->CastSpell(GetCaster(), SPELL_HUNTER_EMERGENCY_SALVE_DISPEL, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.TriggeringSpell = GetSpell()
});
}
void Register() override
{
AfterCast += SpellCastFn(spell_hun_emergency_salve::HandleAfterCast);
}
};
// 109304 - Exhilaration
class spell_hun_exhilaration : public SpellScript
{
@@ -851,6 +880,7 @@ void AddSC_hunter_spell_scripts()
RegisterSpellScript(spell_hun_aspect_of_the_turtle);
RegisterSpellScript(spell_hun_cobra_sting);
RegisterSpellScript(spell_hun_concussive_shot);
RegisterSpellScript(spell_hun_emergency_salve);
RegisterSpellScript(spell_hun_exhilaration);
RegisterSpellScript(spell_hun_explosive_shot);
RegisterSpellScript(spell_hun_hunting_party);