diff --git a/data/sql/updates/pending_db_world/rev_1655034493544919400.sql b/data/sql/updates/pending_db_world/rev_1655034493544919400.sql new file mode 100644 index 000000000..082287602 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1655034493544919400.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id`=29341; +INSERT INTO `spell_script_names` VALUES +(29341,'spell_warl_shadowburn'); diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index cd8d9233e..cfa787420 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -1208,6 +1208,27 @@ class spell_warl_drain_soul : public AuraScript } }; +// 29341 - Shadowburn +class spell_warl_shadowburn : public AuraScript +{ + PrepareAuraScript(spell_warl_shadowburn); + + void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + Unit* caster = GetCaster(); + Unit* target = GetTarget(); + if (!(GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEATH && caster && target && caster->IsPlayer() && caster->ToPlayer()->isHonorOrXPTarget(target))) + { + PreventDefaultAction(); + } + } + + void Register() override + { + OnEffectRemove += AuraEffectRemoveFn(spell_warl_shadowburn::RemoveEffect, EFFECT_0, SPELL_AURA_CHANNEL_DEATH_ITEM, AURA_EFFECT_HANDLE_REAL); + } +}; + void AddSC_warlock_spell_scripts() { RegisterSpellScript(spell_warl_eye_of_kilrogg); @@ -1238,4 +1259,5 @@ void AddSC_warlock_spell_scripts() RegisterSpellScript(spell_warl_soulshatter); RegisterSpellScript(spell_warl_unstable_affliction); RegisterSpellScript(spell_warl_drain_soul); + RegisterSpellScript(spell_warl_shadowburn); }