From 461a799a52e0f2f806de6e58bb5053fe9af497d9 Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 14 Jun 2009 10:16:55 -0500 Subject: *Add function EnergizeBySpell. Author: nos4r2zod --HG-- branch : trunk --- src/game/Unit.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/game/Unit.cpp') 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 ) -- cgit v1.2.3