mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Scripts/Spells: Fix Warlock Drain Soul energize (#27512)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_warl_drain_soul';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (198590, 'spell_warl_drain_soul');
|
||||
@@ -40,6 +40,7 @@ enum WarlockSpells
|
||||
SPELL_WARLOCK_DEMONIC_CIRCLE_SUMMON = 48018,
|
||||
SPELL_WARLOCK_DEMONIC_CIRCLE_TELEPORT = 48020,
|
||||
SPELL_WARLOCK_DEVOUR_MAGIC_HEAL = 19658,
|
||||
SPELL_WARLOCK_DRAIN_SOUL_ENERGIZE = 205292,
|
||||
SPELL_WARLOCK_GLYPH_OF_DEMON_TRAINING = 56249,
|
||||
SPELL_WARLOCK_GLYPH_OF_SOUL_SWAP = 56226,
|
||||
SPELL_WARLOCK_GLYPH_OF_SUCCUBUS = 56250,
|
||||
@@ -304,6 +305,31 @@ class spell_warl_devour_magic : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 198590 - Drain Soul
|
||||
class spell_warl_drain_soul : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warl_drain_soul);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo ({ SPELL_WARLOCK_DRAIN_SOUL_ENERGIZE });
|
||||
}
|
||||
|
||||
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH)
|
||||
return;
|
||||
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(caster, SPELL_WARLOCK_DRAIN_SOUL_ENERGIZE, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectRemove += AuraEffectApplyFn(spell_warl_drain_soul::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
// 48181 - Haunt
|
||||
/// Updated 4.3.4
|
||||
class spell_warl_haunt : public SpellScriptLoader
|
||||
@@ -999,6 +1025,7 @@ void AddSC_warlock_spell_scripts()
|
||||
new spell_warl_demonic_circle_summon();
|
||||
new spell_warl_demonic_circle_teleport();
|
||||
new spell_warl_devour_magic();
|
||||
RegisterAuraScript(spell_warl_drain_soul);
|
||||
new spell_warl_haunt();
|
||||
new spell_warl_health_funnel();
|
||||
new spell_warl_healthstone_heal();
|
||||
|
||||
Reference in New Issue
Block a user