aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Holiver <none@none>2010-05-22 04:04:51 -0300
committerJohn Holiver <none@none>2010-05-22 04:04:51 -0300
commit8b8ededec29b0bc8d0c405234adcacdebe14725a (patch)
tree3d5c54472d331cfe698bf1f60eaa86ec012d8267 /src
parent18f3d29caff48ccfa4a5ad81ed080177d87ee4ef (diff)
Fix Life Tap Formula (3.3.3)
Tnx Karolis.Rudzevicius for pointing out the problem Fixes issue #2106 --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellEffects.cpp24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 72dc031189b..987e881d27f 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -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;