Scripts/ICC: Implemented spell Dark Reckoning

Closes #26941

(cherry picked from commit bddf41e718)
This commit is contained in:
Keader
2021-09-28 21:48:46 -03:00
committed by Shauren
parent e80777cb39
commit 42de9d9cd8
2 changed files with 32 additions and 0 deletions

View File

@@ -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');

View File

@@ -1038,6 +1038,33 @@ 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 !spell->GetEffects().empty()
&& ValidateSpellInfo({ spell->GetEffect(EFFECT_0).TriggerSpell });
}
void OnPeriodic(AuraEffect const* aurEff)
{
PreventDefaultAction();
if (Unit* caster = GetCaster())
{
uint32 spellId = aurEff->GetSpellEffectInfo().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 +1095,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();