From c6b0361bd56ee72df8b9b3ee7eca824e0619d407 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 21 Feb 2008 10:36:26 +0000 Subject: - 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 --- src/map/status.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/map/status.h') diff --git a/src/map/status.h b/src/map/status.h index 23f8ec4b1..5d91fa62d 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -599,6 +599,8 @@ int status_set_sp(struct block_list *bl, unsigned int sp, int flag); int status_heal(struct block_list *bl,int hp,int sp, int flag); int status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per_sp); +char status_calc_life(unsigned int base, unsigned int max); + //Define for copying a status_data structure from b to a, without overwriting current Hp and Sp #define status_cpy(a, b) \ memcpy(&((a)->max_hp), &((b)->max_hp), sizeof(struct status_data)-(sizeof((a)->hp)+sizeof((a)->sp))) -- cgit v1.2.3-60-g2f50