fix (Core/Spells) Correct Life Tap mana gain and cleanup (#15278)
This commit is contained in:
@@ -753,7 +753,6 @@ class spell_warl_siphon_life : public AuraScript
|
|||||||
};
|
};
|
||||||
|
|
||||||
// -1454 - Life Tap
|
// -1454 - Life Tap
|
||||||
#define LIFE_TAP_COEFFICIENT 0.9F
|
|
||||||
class spell_warl_life_tap : public SpellScript
|
class spell_warl_life_tap : public SpellScript
|
||||||
{
|
{
|
||||||
PrepareSpellScript(spell_warl_life_tap);
|
PrepareSpellScript(spell_warl_life_tap);
|
||||||
@@ -773,12 +772,11 @@ class spell_warl_life_tap : public SpellScript
|
|||||||
Player* caster = GetCaster()->ToPlayer();
|
Player* caster = GetCaster()->ToPlayer();
|
||||||
if (Unit* target = GetHitUnit())
|
if (Unit* target = GetHitUnit())
|
||||||
{
|
{
|
||||||
int32 damage = GetEffectValue() + LIFE_TAP_COEFFICIENT;
|
int32 spellEffect = GetEffectValue();
|
||||||
int32 damage2Mana = GetEffectValue();
|
int32 mana = int32(spellEffect + (caster->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_SHADOW) * 0.5f));
|
||||||
int32 mana = int32(damage2Mana + (caster->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + static_cast<uint8>(SPELL_SCHOOL_SHADOW)) * 0.5f));
|
|
||||||
|
|
||||||
// Shouldn't Appear in Combat Log
|
// Shouldn't Appear in Combat Log
|
||||||
target->ModifyHealth(-damage);
|
target->ModifyHealth(-spellEffect);
|
||||||
|
|
||||||
// Improved Life Tap mod
|
// Improved Life Tap mod
|
||||||
if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, WARLOCK_ICON_ID_IMPROVED_LIFE_TAP, 0))
|
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()
|
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_CAST_OK;
|
||||||
return SPELL_FAILED_FIZZLE;
|
return SPELL_FAILED_FIZZLE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user