Core/Auras: fix a typo in PowerDrain auras periodic tick handler.

This commit is contained in:
QAston
2011-06-23 15:51:14 +02:00
parent 3352cabb49
commit dc8a926c8d
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -12309,6 +12309,7 @@ int32 Unit::GetHealthGain(int32 dVal)
return gain; return gain;
} }
// returns negative amount on power reduction
int32 Unit::ModifyPower(Powers power, int32 dVal) int32 Unit::ModifyPower(Powers power, int32 dVal)
{ {
int32 gain = 0; int32 gain = 0;
@@ -6435,7 +6435,7 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con
if (powerType == POWER_MANA) if (powerType == POWER_MANA)
drainAmount -= target->GetSpellCritDamageReduction(drainAmount); drainAmount -= target->GetSpellCritDamageReduction(drainAmount);
int32 drainedAmount = target->ModifyPower(powerType, -drainAmount); int32 drainedAmount = -target->ModifyPower(powerType, -drainAmount);
float gainMultiplier = SpellMgr::CalculateSpellEffectValueMultiplier(GetSpellProto(), GetEffIndex(), caster); float gainMultiplier = SpellMgr::CalculateSpellEffectValueMultiplier(GetSpellProto(), GetEffIndex(), caster);