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:
John Holiver
2010-05-22 04:04:51 -03:00
parent 18f3d29caf
commit 8b8ededec2

View File

@@ -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;