aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-14 10:16:55 -0500
committermegamage <none@none>2009-06-14 10:16:55 -0500
commit461a799a52e0f2f806de6e58bb5053fe9af497d9 (patch)
tree3f29b1746d28d93644841e7008c92840ae027608 /src/game/SpellEffects.cpp
parent6f7998cbaf94e80d92da6d128a5f11b0652ae0a3 (diff)
*Add function EnergizeBySpell. Author: nos4r2zod
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 549f79ab5f4..35e52f2208c 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2443,10 +2443,8 @@ void Spell::EffectPowerDrain(uint32 i)
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_MULTIPLE_VALUE, manaMultiplier);
int32 gain = int32(new_damage * manaMultiplier);
-
- //send log
- m_caster->SendEnergizeSpellLog(m_caster, m_spellInfo->Id, gain, POWER_MANA);
- m_caster->ModifyPower(POWER_MANA,gain);
+
+ m_caster->EnergizeBySpell(m_caster, m_spellInfo->Id, gain, POWER_MANA);
}
}
@@ -2873,8 +2871,7 @@ void Spell::EffectEnergize(uint32 i)
if(unitTarget->GetMaxPower(power) == 0)
return;
- m_caster->SendEnergizeSpellLog(unitTarget, m_spellInfo->Id, damage, power);
- unitTarget->ModifyPower(power,damage);
+ m_caster->EnergizeBySpell(unitTarget, m_spellInfo->Id, damage, power);
// Mad Alchemist's Potion
if (m_spellInfo->Id == 45051)
@@ -2936,8 +2933,7 @@ void Spell::EffectEnergizePct(uint32 i)
return;
uint32 gain = damage * maxPower / 100;
- m_caster->SendEnergizeSpellLog(unitTarget, m_spellInfo->Id, gain, power);
- unitTarget->ModifyPower(power, gain);
+ m_caster->EnergizeBySpell(unitTarget, m_spellInfo->Id, gain, power);
}
void Spell::SendLoot(uint64 guid, LootType loottype)