Core/Spell: Fix SpellDamageBonusTaken calculation for negative value

This commit is contained in:
Vincent-Michael
2012-05-15 23:43:06 +02:00
parent c05c16a8de
commit b90cb5878d
+1 -1
View File
@@ -10875,7 +10875,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
TakenTotal+= int32(TakenAdvertisedBenefit * coeff * factorMod); TakenTotal+= int32(TakenAdvertisedBenefit * coeff * factorMod);
} }
float tmpDamage = (pdamage + TakenTotal) * TakenTotalMod; float tmpDamage = (int32(pdamage) + TakenTotal) * TakenTotalMod;
return uint32(std::max(tmpDamage, 0.0f)); return uint32(std::max(tmpDamage, 0.0f));
} }