mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Core/Spell): solve issue with Life Tap All Ranks (#4408)
This commit is contained in:
@@ -915,6 +915,7 @@ public:
|
||||
};
|
||||
|
||||
// -1454 - Life Tap
|
||||
#define LIFE_TAP_COEFFICIENT 0.9F
|
||||
class spell_warl_life_tap : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -939,7 +940,7 @@ public:
|
||||
Player* caster = GetCaster()->ToPlayer();
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
int32 damage = GetEffectValue() + 1.0f + (caster->GetStat(STAT_SPIRIT) * 1.5f);
|
||||
int32 damage = GetEffectValue() + LIFE_TAP_COEFFICIENT;
|
||||
int32 damage2Mana = GetEffectValue();
|
||||
int32 mana = int32(damage2Mana + (caster->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW) * 0.5f));
|
||||
|
||||
@@ -967,7 +968,7 @@ public:
|
||||
|
||||
SpellCastResult CheckCast()
|
||||
{
|
||||
if ((int32(GetCaster()->GetHealth()) > int32(GetSpellInfo()->Effects[EFFECT_0].CalcValue() + (6.3875 * GetSpellInfo()->BaseLevel) + (GetCaster()->GetStat(STAT_SPIRIT) * 1.5f) + 1.0f )))
|
||||
if ((int32(GetCaster()->GetHealth()) > int32(GetSpellInfo()->Effects[EFFECT_0].CalcValue() + (3.1 * GetSpellInfo()->BaseLevel) + LIFE_TAP_COEFFICIENT )))
|
||||
return SPELL_CAST_OK;
|
||||
return SPELL_FAILED_FIZZLE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user