diff --git a/data/sql/updates/pending_db_world/rev_1636293158309628100.sql b/data/sql/updates/pending_db_world/rev_1636293158309628100.sql new file mode 100644 index 000000000..692276bd2 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1636293158309628100.sql @@ -0,0 +1,5 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1636293158309628100'); + +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 380b2caa7..eb2fe2db3 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -1143,6 +1143,32 @@ public: } }; +// 69483 - Dark Reckoning +class spell_deathwhisper_dark_reckoning : public AuraScript +{ + PrepareAuraScript(spell_deathwhisper_dark_reckoning); + + bool Validate(SpellInfo const* spell) override + { + return ValidateSpellInfo({ spell->Effects[EFFECT_0].TriggerSpell }); + } + + void OnPeriodic(AuraEffect const* aurEff) + { + PreventDefaultAction(); + if (Unit* caster = GetCaster()) + { + uint32 spellId = GetSpellInfo()->Effects[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 AreaTriggerScript { public: @@ -1161,11 +1187,17 @@ public: void AddSC_boss_lady_deathwhisper() { + // Creatures new boss_lady_deathwhisper(); new npc_cult_fanatic(); new npc_cult_adherent(); new npc_vengeful_shade(); new npc_darnavan(); + + // Spells new spell_deathwhisper_mana_barrier(); + RegisterSpellScript(spell_deathwhisper_dark_reckoning); + + // AreaTriggers new at_lady_deathwhisper_entrance(); }