Scripts/Spells: Fix Conflagrate energize (#30184)

This commit is contained in:
Aqua Deus
2024-09-12 18:30:47 +02:00
committed by GitHub
parent 58668b4de1
commit d3b05c591c
2 changed files with 26 additions and 0 deletions

View File

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

View File

@@ -41,6 +41,7 @@ enum WarlockSpells
{
SPELL_WARLOCK_ABSOLUTE_CORRUPTION = 196103,
SPELL_WARLOCK_AGONY = 980,
SPELL_WARLOCK_CONFLAGRATE_ENERGIZE = 245330,
SPELL_WARLOCK_CORRUPTION_DAMAGE = 146739,
SPELL_WARLOCK_CREATE_HEALTHSTONE = 23517,
SPELL_WARLOCK_CURSE_OF_EXHAUSTION = 334275,
@@ -248,6 +249,27 @@ class spell_warl_chaotic_energies : public AuraScript
}
};
// 17962 - Conflagrate
class spell_warl_conflagrate : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo ({ SPELL_WARLOCK_CONFLAGRATE_ENERGIZE });
}
void HandleAfterCast(SpellEffIndex /*effIndex*/) const
{
GetCaster()->CastSpell(GetCaster(), SPELL_WARLOCK_CONFLAGRATE_ENERGIZE, CastSpellExtraArgs()
.SetTriggerFlags(TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR)
.SetTriggeringSpell(GetSpell()));
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_warl_conflagrate::HandleAfterCast, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};
// 6201 - Create Healthstone
class spell_warl_create_healthstone : public SpellScript
{
@@ -1346,6 +1368,7 @@ void AddSC_warlock_spell_scripts()
RegisterSpellScript(spell_warl_chaos_bolt);
RegisterSpellScript(spell_warl_chaotic_energies);
RegisterSpellScript(spell_warl_absolute_corruption);
RegisterSpellScript(spell_warl_conflagrate);
RegisterSpellScript(spell_warl_create_healthstone);
RegisterSpellScript(spell_warl_dark_pact);
RegisterSpellScript(spell_warl_deaths_embrace);