Prevent infinite absorption (and spell damage from Incanter's Absorption) when Chaos Bolt hits Mana shield. Patch by johnholiver.

Fixes #7
This commit is contained in:
leak
2011-01-02 13:42:14 +01:00
parent 659c8f8db9
commit a7dadcb51c
+1 -1
View File
@@ -1731,7 +1731,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
int32 manaTaken = -pVictim->ModifyPower(POWER_MANA, -manaReduction); int32 manaTaken = -pVictim->ModifyPower(POWER_MANA, -manaReduction);
// take case when mana has ended up into account // take case when mana has ended up into account
currentAbsorb = int32(float(currentAbsorb)*(float(manaTaken) / float(manaReduction))); currentAbsorb = currentAbsorb ? int32(float(currentAbsorb)*(float(manaTaken) / float(manaReduction))) : 0;
dmgInfo.AbsorbDamage(currentAbsorb); dmgInfo.AbsorbDamage(currentAbsorb);