diff options
author | Haru <haru@dotalux.com> | 2018-04-08 18:39:33 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2018-11-14 18:44:17 +0100 |
commit | cd634fbcefaa36bb9d05b0be071f8f23d408ea26 (patch) | |
tree | ee77b7469d8525bd6472a3d0931accfbee0ec7a9 /src/map/status.h | |
parent | 86b70dc7ea0a6d3aee6d99a0f802668fc9a0eb75 (diff) | |
download | hercules-cd634fbcefaa36bb9d05b0be071f8f23d408ea26.tar.gz hercules-cd634fbcefaa36bb9d05b0be071f8f23d408ea26.tar.bz2 hercules-cd634fbcefaa36bb9d05b0be071f8f23d408ea26.tar.xz hercules-cd634fbcefaa36bb9d05b0be071f8f23d408ea26.zip |
Use an enum as flag for status->heal() and related functions
This introduces the `enum status_heal_flag`. No functional changes are
made.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/status.h')
-rw-r--r-- | src/map/status.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/map/status.h b/src/map/status.h index 532efce17..35721c46a 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -99,6 +99,15 @@ enum scstart_flag { SCFLAG_ALL = SCFLAG_NONE|SCFLAG_NOAVOID|SCFLAG_FIXEDTICK|SCFLAG_LOADED|SCFLAG_FIXEDRATE|SCFLAG_NOICON }; +/** + * Flags to be used with status->heal() and related functions. + */ +enum status_heal_flag { + STATUS_HEAL_DEFAULT = 0x00, ///< Default + STATUS_HEAL_FORCED = 0x01, ///< Forced healing (bypassing Berserk and similar) + STATUS_HEAL_SHOWEFFECT = 0x02, ///< Show the HP/SP heal effect +}; + // Status changes listing. These code are for use by the server. typedef enum sc_type { SC_NONE = -1, @@ -2309,9 +2318,9 @@ struct status_interface { int (*charge) (struct block_list* bl, int64 hp, int64 sp); int (*percent_change) (struct block_list *src,struct block_list *target,signed char hp_rate, signed char sp_rate, int flag); //Used to set the hp/sp of an object to an absolute value (can't kill) - int (*set_hp) (struct block_list *bl, unsigned int hp, int flag); - int (*set_sp) (struct block_list *bl, unsigned int sp, int flag); - int (*heal) (struct block_list *bl,int64 hp,int64 sp, int flag); + int (*set_hp) (struct block_list *bl, unsigned int hp, enum status_heal_flag flag); + int (*set_sp) (struct block_list *bl, unsigned int sp, enum status_heal_flag flag); + int (*heal) (struct block_list *bl,int64 hp,int64 sp, enum status_heal_flag flag); int (*revive) (struct block_list *bl, unsigned char per_hp, unsigned char per_sp); int (*fixed_revive) (struct block_list *bl, unsigned int per_hp, unsigned int per_sp); struct regen_data * (*get_regen_data) (struct block_list *bl); |