summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-21 10:36:26 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-21 10:36:26 +0000
commitc6b0361bd56ee72df8b9b3ee7eca824e0619d407 (patch)
tree8a178d1eff82e4329685dd8130c9b2364412ce4f /src/map/mercenary.c
parent095fe33b1d22e4bc821847b968ac508a983ae50b (diff)
downloadhercules-c6b0361bd56ee72df8b9b3ee7eca824e0619d407.tar.gz
hercules-c6b0361bd56ee72df8b9b3ee7eca824e0619d407.tar.bz2
hercules-c6b0361bd56ee72df8b9b3ee7eca824e0619d407.tar.xz
hercules-c6b0361bd56ee72df8b9b3ee7eca824e0619d407.zip
- Added status_calc_life to properly calculate hp/max_hp as a ratio taking into accounts overflows (and for now also avoids divisions by 0). Applied this function around clif.c, mob.c and pet.c
- Implemented the correct walk-speed bonus from the Bard/Dancer spirit. - Added a few error messages in case something goes wrong in the new auth db system. - Fixed logarithmic drops turning 0% drop rates into 100%. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12225 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 3e3d8a906..039a7f446 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 && hd->battle_status.hp < (hd->battle_status.max_hp*80/100))
+ if (flag && status_calc_life(hd->battle_status.hp, hd->battle_status.max_hp)< 80)
return 0;
hd->regen.state.block = 3; //Block regen while vaporized.