Scripts/Spells: Fix demon hunter talent "Feast of Souls" (#30501)

This commit is contained in:
Aqua Deus
2025-01-17 17:52:29 +01:00
committed by GitHub
parent 73ef7d166e
commit 5ea4b26f7a
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dh_feast_of_souls';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(228477, 'spell_dh_feast_of_souls');

View File

@@ -741,6 +741,33 @@ class spell_dh_eye_beam : public AuraScript
}
};
// Called by 228477 - Soul Cleave
class spell_dh_feast_of_souls : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_DH_FEAST_OF_SOULS, SPELL_DH_FEAST_OF_SOULS_PERIODIC_HEAL });
}
bool Load() override
{
return GetCaster()->HasAura(SPELL_DH_FEAST_OF_SOULS);
}
void HandleHeal() const
{
GetCaster()->CastSpell(GetCaster(), SPELL_DH_FEAST_OF_SOULS_PERIODIC_HEAL, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.TriggeringSpell = GetSpell()
});
}
void Register() override
{
AfterCast += SpellCastFn(spell_dh_feast_of_souls::HandleHeal);
}
};
// 212084 - Fel Devastation
class spell_dh_fel_devastation : public AuraScript
{
@@ -1543,6 +1570,7 @@ void AddSC_demon_hunter_spell_scripts()
RegisterSpellScript(spell_dh_demon_spikes);
RegisterSpellScript(spell_dh_essence_break);
RegisterSpellScript(spell_dh_eye_beam);
RegisterSpellScript(spell_dh_feast_of_souls);
RegisterSpellScript(spell_dh_fel_devastation);
RegisterSpellScript(spell_dh_fel_flame_fortification);
RegisterSpellScript(spell_dh_felblade);