diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-05-01 12:14:06 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-05-01 12:14:06 +0000 |
commit | 5524938f8650e659b3c838df44212de56bf72584 (patch) | |
tree | 9696c2ef858b4ebd81eda804389f8ece788a994b /src/map/status.h | |
parent | 3bba210cc5151bfc2971be296ab5c4391ea28639 (diff) | |
download | hercules-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/status.h')
-rw-r--r-- | src/map/status.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/map/status.h b/src/map/status.h index 30c52e4d4..0cc5435a5 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -708,8 +708,6 @@ 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))) |