Skip to content

Commit

Permalink
Scripts/Spells: Fix demon hunter talent "Feast of Souls" (TrinityCore…
Browse files Browse the repository at this point in the history
  • Loading branch information
aquadeus authored Jan 17, 2025
1 parent 73ef7d1 commit 5ea4b26
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sql/updates/world/master/2025_01_17_05_world.sql
Original file line number Diff line number Diff line change
@@ -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');
28 changes: 28 additions & 0 deletions src/server/scripts/Spells/spell_dh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5ea4b26

Please sign in to comment.