diff options
author | Haru <haru@dotalux.com> | 2014-09-20 15:16:56 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-09-20 15:22:14 +0200 |
commit | b0006317e5cc4a48cd5b8a501b94813cd3b93670 (patch) | |
tree | 82e5f26c5ea7139adc824ee9273cb547425512b6 /src/map/status.h | |
parent | 9d91a8ea819c24df708b89d6dc0b98c3fea36876 (diff) | |
download | hercules-b0006317e5cc4a48cd5b8a501b94813cd3b93670.tar.gz hercules-b0006317e5cc4a48cd5b8a501b94813cd3b93670.tar.bz2 hercules-b0006317e5cc4a48cd5b8a501b94813cd3b93670.tar.xz hercules-b0006317e5cc4a48cd5b8a501b94813cd3b93670.zip |
Replaced hardcoded values with constants for status_change_start's flag
- Please use the values from enum scstart_flag when calling
status_change_start or related functions.
- This also applies to the sc_start script commands.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/status.h')
-rw-r--r-- | src/map/status.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/map/status.h b/src/map/status.h index 568348d23..623ba7eb3 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -67,6 +67,20 @@ typedef enum sc_conf_type { SC_NO_CLEAR = 0x80, } sc_conf_type; +/** + * Flags to be used with status->change_start + */ +enum scstart_flag { + // Note: When updating this enum, also update the documentation in doc/script_commands.txt and the constants in db/const.txt + SCFLAG_NONE = 0x00, ///< No special behavior. + SCFLAG_NOAVOID = 0x01, ///< Cannot be avoided (it has to start). + SCFLAG_FIXEDTICK = 0x02, ///< Tick should not be reduced (by vit, luk, lv, etc). + SCFLAG_LOADED = 0x04, ///< sc_data was loaded, no value has to be altered. + SCFLAG_FIXEDRATE = 0x08, ///< rate should not be reduced (not evaluated in status_change_start, but in some calls to other functions). + SCFLAG_NOICON = 0x10, ///< Status icon (SI) should not be sent. + SCFLAG_ALL = SCFLAG_NONE|SCFLAG_NOAVOID|SCFLAG_FIXEDTICK|SCFLAG_LOADED|SCFLAG_FIXEDRATE|SCFLAG_NOICON +}; + // Status changes listing. These code are for use by the server. typedef enum sc_type { SC_NONE = -1, @@ -1921,9 +1935,9 @@ struct status_change { #define status_get_mode(bl) (status->get_status_data(bl)->mode) //Short version, receives rate in 1->100 range, and does not uses a flag setting. -#define sc_start(src, bl, type, rate, val1, tick) (status->change_start((src),(bl),(type),100*(rate),(val1),0,0,0,(tick),0)) -#define sc_start2(src, bl, type, rate, val1, val2, tick) (status->change_start((src),(bl),(type),100*(rate),(val1),(val2),0,0,(tick),0)) -#define sc_start4(src, bl, type, rate, val1, val2, val3, val4, tick) (status->change_start((src),(bl),(type),100*(rate),(val1),(val2),(val3),(val4),(tick),0)) +#define sc_start(src, bl, type, rate, val1, tick) (status->change_start((src),(bl),(type),100*(rate),(val1),0,0,0,(tick),SCFLAG_NONE)) +#define sc_start2(src, bl, type, rate, val1, val2, tick) (status->change_start((src),(bl),(type),100*(rate),(val1),(val2),0,0,(tick),SCFLAG_NONE)) +#define sc_start4(src, bl, type, rate, val1, val2, val3, val4, tick) (status->change_start((src),(bl),(type),100*(rate),(val1),(val2),(val3),(val4),(tick),SCFLAG_NONE)) #define status_change_end(bl,type,tid) (status->change_end_((bl),(type),(tid),__FILE__,__LINE__)) |