summaryrefslogtreecommitdiff
path: root/src/map/status.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/status.h')
-rw-r--r--src/map/status.h20
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__))