summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-05-01 13:56:24 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-05-01 13:56:24 +0000
commitb1508637e414820d615888a11baed170392154d7 (patch)
treeb7900e1469a6b03f543049af58202d5000cf2165 /src/map/mercenary.c
parent5524938f8650e659b3c838df44212de56bf72584 (diff)
downloadhercules-b1508637e414820d615888a11baed170392154d7.tar.gz
hercules-b1508637e414820d615888a11baed170392154d7.tar.bz2
hercules-b1508637e414820d615888a11baed170392154d7.tar.xz
hercules-b1508637e414820d615888a11baed170392154d7.zip
Replaced the integers+checking approach in r12679 with usage of floating point arithmetic.
Applied search&replace to use the new name of the function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12680 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r--src/map/mercenary.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 0d5fb328d..05dcfa4c7 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -8,6 +8,7 @@
#include "../common/nullpo.h"
#include "../common/mmo.h"
#include "../common/showmsg.h"
+#include "../common/utils.h"
#include "log.h"
#include "clif.h"
@@ -95,7 +96,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 && percent(hd->battle_status.hp, hd->battle_status.max_hp) < 80)
+ if (flag && get_percentage(hd->battle_status.hp, hd->battle_status.max_hp) < 80)
return 0;
hd->regen.state.block = 3; //Block regen while vaporized.