From 88d31a1a718815ff8fe9abc7356d73aeffcea5bb Mon Sep 17 00:00:00 2001 From: Tereneckla <50233983+Tereneckla@users.noreply.github.com> Date: Sat, 11 Mar 2023 22:28:12 +0000 Subject: [PATCH] fix (Core/Spells) Correct Life Tap mana gain and cleanup (#15278) --- src/server/scripts/Spells/spell_warlock.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index d98d56552..822d7bf64 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -753,7 +753,6 @@ class spell_warl_siphon_life : public AuraScript }; // -1454 - Life Tap -#define LIFE_TAP_COEFFICIENT 0.9F class spell_warl_life_tap : public SpellScript { PrepareSpellScript(spell_warl_life_tap); @@ -773,12 +772,11 @@ class spell_warl_life_tap : public SpellScript Player* caster = GetCaster()->ToPlayer(); if (Unit* target = GetHitUnit()) { - int32 damage = GetEffectValue() + LIFE_TAP_COEFFICIENT; - int32 damage2Mana = GetEffectValue(); - int32 mana = int32(damage2Mana + (caster->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + static_cast(SPELL_SCHOOL_SHADOW)) * 0.5f)); + int32 spellEffect = GetEffectValue(); + int32 mana = int32(spellEffect + (caster->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_SHADOW) * 0.5f)); // Shouldn't Appear in Combat Log - target->ModifyHealth(-damage); + target->ModifyHealth(-spellEffect); // Improved Life Tap mod if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, WARLOCK_ICON_ID_IMPROVED_LIFE_TAP, 0)) @@ -801,7 +799,7 @@ class spell_warl_life_tap : public SpellScript SpellCastResult CheckCast() { - if ((int32(GetCaster()->GetHealth()) > int32(GetSpellInfo()->Effects[EFFECT_0].CalcValue() + (3.1 * GetSpellInfo()->BaseLevel) + LIFE_TAP_COEFFICIENT ))) + if ((int32(GetCaster()->GetHealth()) > int32(GetSpellInfo()->Effects[EFFECT_0].CalcValue()))) return SPELL_CAST_OK; return SPELL_FAILED_FIZZLE; }