summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-05-01 12:14:06 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-05-01 12:14:06 +0000
commit5524938f8650e659b3c838df44212de56bf72584 (patch)
tree9696c2ef858b4ebd81eda804389f8ece788a994b /src/map/mercenary.c
parent3bba210cc5151bfc2971be296ab5c4391ea28639 (diff)
downloadhercules-5524938f8650e659b3c838df44212de56bf72584.tar.gz
hercules-5524938f8650e659b3c838df44212de56bf72584.tar.bz2
hercules-5524938f8650e659b3c838df44212de56bf72584.tar.xz
hercules-5524938f8650e659b3c838df44212de56bf72584.zip
Implemented get_percentage() for compact and safe calculation of percentual values.
Fixed integer arithmetic overflows that were occuring in several supernovice checks (bugreport:1135). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12679 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r--src/map/mercenary.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 2c76ed8d6..0d5fb328d 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -95,7 +95,7 @@ int merc_hom_vaporize(struct map_session_data *sd, int flag)
if (status_isdead(&hd->bl))
return 0; //Can't vaporize a dead homun.
- if (flag && status_calc_life(hd->battle_status.hp, hd->battle_status.max_hp)< 80)
+ if (flag && percent(hd->battle_status.hp, hd->battle_status.max_hp) < 80)
return 0;
hd->regen.state.block = 3; //Block regen while vaporized.