diff options
author | Keader <keader.android@gmail.com> | 2021-09-28 21:48:46 -0300 |
---|---|---|
committer | Keader <keader.android@gmail.com> | 2021-09-28 21:48:46 -0300 |
commit | bddf41e718e45b32225af590d35e60b4ffbe4f38 (patch) | |
tree | 00b577a0f5d7b488af8a2bd8ae2ba1716572d4e0 | |
parent | 1526de722c9c81f1907de84054e342cd777e8501 (diff) |
Scripts/ICC: Implemented spell Dark Reckoning
Closes #26941
-rw-r--r-- | sql/updates/world/3.3.5/2021_09_28_02_world.sql | 4 | ||||
-rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp | 27 |
2 files changed, 31 insertions, 0 deletions
diff --git a/sql/updates/world/3.3.5/2021_09_28_02_world.sql b/sql/updates/world/3.3.5/2021_09_28_02_world.sql new file mode 100644 index 00000000000..7b6cb00f1a7 --- /dev/null +++ b/sql/updates/world/3.3.5/2021_09_28_02_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_deathwhisper_dark_reckoning'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(69483,'spell_deathwhisper_dark_reckoning'); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp index 8d3e5813350..5333e753d4c 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -1038,6 +1038,32 @@ class spell_deathwhisper_vampiric_might : public AuraScript } }; +// 69483 - Dark Reckoning +class spell_deathwhisper_dark_reckoning : public AuraScript +{ + PrepareAuraScript(spell_deathwhisper_dark_reckoning); + + bool Validate(SpellInfo const* spell) override + { + return ValidateSpellInfo({ spell->GetEffect(EFFECT_0).TriggerSpell }); + } + + void OnPeriodic(AuraEffect const* aurEff) + { + PreventDefaultAction(); + if (Unit* caster = GetCaster()) + { + uint32 spellId = GetSpellInfo()->GetEffect(EFFECT_0).TriggerSpell; + caster->CastSpell(GetTarget(), spellId, aurEff); + } + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathwhisper_dark_reckoning::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); + } +}; + class at_lady_deathwhisper_entrance : public OnlyOnceAreaTriggerScript { public: @@ -1068,6 +1094,7 @@ void AddSC_boss_lady_deathwhisper() RegisterSpellScript(spell_deathwhisper_dominated_mind); RegisterSpellScript(spell_deathwhisper_summon_spirits); RegisterSpellScript(spell_deathwhisper_vampiric_might); + RegisterSpellScript(spell_deathwhisper_dark_reckoning); // AreaTriggers new at_lady_deathwhisper_entrance(); |