diff options
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 68c115f9faf..0ab7c2fcb54 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -614,6 +614,47 @@ class spell_gen_burn_brutallus : public SpellScriptLoader } }; +// 48750 - Burning Depths Necrolyte Image +class spell_gen_burning_depths_necrolyte_image : public SpellScriptLoader +{ + public: + spell_gen_burning_depths_necrolyte_image() : SpellScriptLoader("spell_gen_burning_depths_necrolyte_image") { } + + class spell_gen_burning_depths_necrolyte_image_AuraScript : public AuraScript + { + PrepareAuraScript(spell_gen_burning_depths_necrolyte_image_AuraScript); + + bool Validate(SpellInfo const* spellInfo) override + { + if (!sSpellMgr->GetSpellInfo(uint32(spellInfo->Effects[EFFECT_2].CalcValue()))) + return false; + return true; + } + + void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (Unit* caster = GetCaster()) + caster->CastSpell(GetTarget(), uint32(GetSpellInfo()->Effects[EFFECT_2].CalcValue())); + } + + void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveAurasDueToSpell(uint32(GetSpellInfo()->Effects[EFFECT_2].CalcValue()), GetCasterGUID()); + } + + void Register() override + { + AfterEffectApply += AuraEffectApplyFn(spell_gen_burning_depths_necrolyte_image_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_gen_burning_depths_necrolyte_image_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_gen_burning_depths_necrolyte_image_AuraScript(); + } +}; + enum CannibalizeSpells { SPELL_CANNIBALIZE_TRIGGERED = 20578 @@ -4093,6 +4134,7 @@ void AddSC_generic_spell_scripts() new spell_gen_break_shield("spell_gen_break_shield"); new spell_gen_break_shield("spell_gen_tournament_counterattack"); new spell_gen_burn_brutallus(); + new spell_gen_burning_depths_necrolyte_image(); new spell_gen_cannibalize(); new spell_gen_chaos_blast(); new spell_gen_clone(); |
