diff options
author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2022-01-16 23:10:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-16 23:10:09 +0100 |
commit | d95a1e7eafd268a43245d182cf945b0106cab11c (patch) | |
tree | 03ae50f128b60d096dfb7757ebb4458805c8a391 | |
parent | a3b2e4d9873874e29291f0c9851ae154029b1b3b (diff) |
Scripts/Spells: Fix warlock immolate periodic (#27615)
-rw-r--r-- | sql/updates/world/master/2022_01_16_00_world_warlock_immolate.sql | 2 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 23 |
2 files changed, 25 insertions, 0 deletions
diff --git a/sql/updates/world/master/2022_01_16_00_world_warlock_immolate.sql b/sql/updates/world/master/2022_01_16_00_world_warlock_immolate.sql new file mode 100644 index 00000000000..e931b8bfa9d --- /dev/null +++ b/sql/updates/world/master/2022_01_16_00_world_warlock_immolate.sql @@ -0,0 +1,2 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_warl_immolate'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (348, 'spell_warl_immolate'); diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index ed0b0a7c069..767d78c63f3 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -44,6 +44,7 @@ enum WarlockSpells SPELL_WARLOCK_GLYPH_OF_DEMON_TRAINING = 56249, SPELL_WARLOCK_GLYPH_OF_SOUL_SWAP = 56226, SPELL_WARLOCK_GLYPH_OF_SUCCUBUS = 56250, + SPELL_WARLOCK_IMMOLATE_PERIODIC = 157736, SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1 = 60955, SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2 = 60956, SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_R1 = 18703, @@ -451,6 +452,27 @@ class spell_warl_healthstone_heal : public SpellScriptLoader } }; +// 348 - Immolate +class spell_warl_immolate : public SpellScript +{ + PrepareSpellScript(spell_warl_immolate); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_WARLOCK_IMMOLATE_PERIODIC}); + } + + void HandleOnEffectHit(SpellEffIndex /*effIndex*/) + { + GetCaster()->CastSpell(GetHitUnit(), SPELL_WARLOCK_IMMOLATE_PERIODIC, GetSpell()); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_warl_immolate::HandleOnEffectHit, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); + } +}; + // 6358 - Seduction (Special Ability) class spell_warl_seduction : public SpellScriptLoader { @@ -1029,6 +1051,7 @@ void AddSC_warlock_spell_scripts() new spell_warl_haunt(); new spell_warl_health_funnel(); new spell_warl_healthstone_heal(); + RegisterSpellScript(spell_warl_immolate); new spell_warl_seduction(); new spell_warl_seed_of_corruption(); new spell_warl_seed_of_corruption_dummy(); |