mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Fix Life Tap Formula (3.3.3)
Tnx Karolis.Rudzevicius for pointing out the problem Fixes issue #2106 --HG-- branch : trunk
This commit is contained in:
@@ -1630,30 +1630,16 @@ void Spell::EffectDummy(uint32 i)
|
||||
// Life Tap
|
||||
if (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_WARLOCK_LIFETAP)
|
||||
{
|
||||
// In 303 exist spirit depend
|
||||
uint32 spirit = uint32(m_caster->GetStat(STAT_SPIRIT));
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case 1454: damage+=spirit; break;
|
||||
case 1455: damage+=spirit*15/10; break;
|
||||
case 1456: damage+=spirit*2; break;
|
||||
case 11687: damage+=spirit*25/10; break;
|
||||
case 11688:
|
||||
case 11689:
|
||||
case 27222:
|
||||
case 57946: damage+=spirit*3; break;
|
||||
default:
|
||||
sLog.outError("Spell::EffectDummy: %u Life Tap need set spirit multipler", m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
// Think its not need (also need remove Life Tap from SpellDamageBonus or add new value)
|
||||
// damage = m_caster->SpellDamageBonus(m_caster, m_spellInfo,uint32(damage > 0 ? damage : 0), SPELL_DIRECT_DAMAGE);
|
||||
// Health = [effectBasePoints1 + SPI * 1.5]
|
||||
int32 damage = 1 + m_spellInfo->EffectBasePoints[0] + (m_caster->GetStat(STAT_SPIRIT) * 1.5);
|
||||
// Mana = [effectBasePoints1 + SPS * 0.5]
|
||||
int32 mana = 1 + m_spellInfo->EffectBasePoints[0] + (m_caster->ToPlayer()->GetBaseSpellPowerBonus() * 0.5);
|
||||
|
||||
if (unitTarget && (int32(unitTarget->GetHealth()) > damage))
|
||||
{
|
||||
// Shouldn't Appear in Combat Log
|
||||
unitTarget->ModifyHealth(-damage);
|
||||
|
||||
int32 mana = damage;
|
||||
// Improved Life Tap mod
|
||||
if (AuraEffect const * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 208, 0))
|
||||
mana = (aurEff->GetAmount() + 100)* mana / 100;
|
||||
|
||||
Reference in New Issue
Block a user