Scripts/Spells: Implement dh talent "Shattered Restoration" (#31507)

This commit is contained in:
Aqua Deus
2026-02-01 21:31:26 +01:00
committed by GitHub
parent 43adf561e3
commit 586e5560d9
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dh_shattered_restoration';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(202644, 'spell_dh_shattered_restoration'),
(228532, 'spell_dh_shattered_restoration'),
(178963, 'spell_dh_shattered_restoration'),
(203794, 'spell_dh_shattered_restoration'),
(210042, 'spell_dh_shattered_restoration');

View File

@@ -176,6 +176,7 @@ enum DemonHunterSpells
SPELL_DH_RETALIATION_TALENT = 389729,
SPELL_DH_RETALIATION_PROC = 391160,
SPELL_DH_SEVER = 235964,
SPELL_DH_SHATTERED_RESTORATION = 389824,
SPELL_DH_SHATTER_SOUL = 210038,
SPELL_DH_SHATTER_SOUL_VENGEANCE_FRONT_RIGHT = 209980,
SPELL_DH_SHATTER_SOUL_VENGEANCE_BACK_RIGHT = 209981,
@@ -1845,6 +1846,26 @@ private:
int32 _furySpent = 0;
};
// 389824 - Shattered Restoration (attached to 202644, 228532, 178963, 210042, 203794 - Consume Soul)
class spell_dh_shattered_restoration : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellEffect({ { SPELL_DH_SHATTERED_RESTORATION, EFFECT_0 } });
}
void CalculateHealingBonus(SpellEffectInfo const& /*spellEffectInfo*/, Unit const* /*victim*/, int32 const& /*healing*/, int32 const& /*flatMod*/, float& pctMod) const
{
if (AuraEffect* const shatteredRestoration = GetCaster()->GetAuraEffect(SPELL_DH_SHATTERED_RESTORATION, EFFECT_0))
AddPct(pctMod, shatteredRestoration->GetAmount());
}
void Register() override
{
CalcHealing += SpellCalcHealingFn(spell_dh_shattered_restoration::CalculateHealingBonus);
}
};
// 178940 - Shattered Souls
// 204254 - Shattered Souls
class spell_dh_shattered_souls : public AuraScript
@@ -2391,6 +2412,7 @@ void AddSC_demon_hunter_spell_scripts()
RegisterSpellScript(spell_dh_restless_hunter);
RegisterSpellScript(spell_dh_retaliation);
RegisterSpellScript(spell_dh_shattered_destiny);
RegisterSpellScript(spell_dh_shattered_restoration);
RegisterSpellScriptWithArgs(spell_dh_shattered_souls, "spell_dh_shattered_souls_havoc", SPELL_DH_SHATTERED_SOULS_HAVOC);
RegisterSpellScriptWithArgs(spell_dh_shattered_souls, "spell_dh_shattered_souls_vengeance", SPELL_DH_SHATTER_SOUL);
RegisterSpellScriptWithArgs(spell_dh_shattered_souls_trigger, "spell_dh_shattered_souls_havoc_trigger", SPELL_DH_SHATTERED_SOULS_HAVOC_SHATTERED_TRIGGER, SPELL_DH_SHATTERED_SOULS_HAVOC_DEMON_TRIGGER);