Scripts/Spells: Implement dh talent "Voidglare Boon" (#31660)

This commit is contained in:
Aqua Deus
2026-02-27 00:36:13 +01:00
committed by GitHub
parent 18a99afd32
commit dd416b9e9a
2 changed files with 34 additions and 0 deletions

View File

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

View File

@@ -239,6 +239,8 @@ enum DemonHunterSpells
SPELL_DH_VENGEFUL_RETREAT_TRIGGER = 198793,
SPELL_DH_VOIDBLADE_CHARGE = 1241285,
SPELL_DH_VOIDBLADE_DAMAGE = 1245414,
SPELL_DH_VOIDGLARE_BOON_ENERGIZE = 1241922,
SPELL_DH_VOIDGLARE_BOON_TALENT = 1240202,
SPELL_DH_VOID_RAY_DAMAGE = 1213649,
SPELL_DH_WAVE_OF_DEBILITATION_TALENT = 452403,
SPELL_DH_WAVE_OF_DEBILITATION_SLOW = 453263,
@@ -2505,6 +2507,34 @@ class spell_dh_voidblade_charge : public SpellScript
}
};
// 1240202 - Voidglare Boon (attached to 473728 - Void Ray)
class spell_dh_voidglare_boon : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_DH_VOIDGLARE_BOON_TALENT, SPELL_DH_VOIDGLARE_BOON_ENERGIZE });
}
bool Load() override
{
return GetUnitOwner()->HasAura(SPELL_DH_VOIDGLARE_BOON_TALENT);
}
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
{
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
return;
Unit* target = GetTarget();
target->CastSpell(target, SPELL_DH_VOIDGLARE_BOON_ENERGIZE, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
}
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_dh_voidglare_boon::HandleEffectRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
// 473728 - Void Ray
class spell_dh_void_ray : public AuraScript
{
@@ -2639,6 +2669,7 @@ void AddSC_demon_hunter_spell_scripts()
RegisterSpellScript(spell_dh_violent_transformation);
RegisterSpellScript(spell_dh_voidblade);
RegisterSpellScript(spell_dh_voidblade_charge);
RegisterSpellScript(spell_dh_voidglare_boon);
RegisterSpellScript(spell_dh_void_ray);
RegisterSpellScript(spell_dh_wave_of_debilitation);