aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMachiavelli <none@none>2009-08-17 08:41:20 +0200
committerMachiavelli <none@none>2009-08-17 08:41:20 +0200
commita96c31c95d062f89d6d1088aa5d4ecbb9080437a (patch)
tree174eb9b850d0df00127000d70aa40564f1c2c13b /src
parentc5287ba58e0e95dd3b090e1b87d1559a8e05230e (diff)
* Correct some calculation in Unit::CalcAbsorb resist, prevents players being killed because absorbed value was negative.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Unit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index e3350940692..fc8ac129644 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -2149,7 +2149,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
}
}
- *absorb = damage - RemainingDamage - *resist;
+ *absorb = RemainingDamage > 0 ? (damage - RemainingDamage - *resist) : (damage - *resist);
if (*absorb)
{