aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.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/Unit.cpp
parent6f7998cbaf94e80d92da6d128a5f11b0652ae0a3 (diff)
*Add function EnergizeBySpell. Author: nos4r2zod
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 3628b956a54..285fa93ef90 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8943,6 +8943,13 @@ void Unit::SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, Po
SendMessageToSet(&data, true);
}
+void Unit::EnergizeBySpell(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers powertype)
+{
+ SendEnergizeSpellLog(pVictim, SpellID, Damage, powertype);
+ // needs to be called after sending spell log
+ ModifyPower(powertype, Damage);
+}
+
uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack)
{
if(!spellProto || !pVictim || damagetype==DIRECT_DAMAGE )