summaryrefslogtreecommitdiff
path: root/src/map/script.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-08-26 20:53:05 +0200
committerGitHub <noreply@github.com>2018-08-26 20:53:05 +0200
commita7bee2cdb8b4d4a2a250d611be4babd27043b6db (patch)
tree0135aa01a07e4ca72ae035c3179da7c82a92b777 /src/map/script.h
parenta1e841ccf13c63fefad02a1bfce0e50b92c649a0 (diff)
parent4118b1135eb79c211aafb6408a4ad8cf9ce09b02 (diff)
downloadhercules-a7bee2cdb8b4d4a2a250d611be4babd27043b6db.tar.gz
hercules-a7bee2cdb8b4d4a2a250d611be4babd27043b6db.tar.bz2
hercules-a7bee2cdb8b4d4a2a250d611be4babd27043b6db.tar.xz
hercules-a7bee2cdb8b4d4a2a250d611be4babd27043b6db.zip
Merge pull request #2164 from mekolat/addvariable
always set the type to C_NAME when adding variables through script->add_str
Diffstat (limited to 'src/map/script.h')
-rw-r--r--src/map/script.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/script.h b/src/map/script.h
index 9a8425ed2..9c72b793c 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -143,7 +143,6 @@ struct item_data;
/// Returns if this a reference to a param
#define reference_toparam(data) ( script->str_data[reference_getid(data)].type == C_PARAM )
/// Returns if this a reference to a variable
-//##TODO confirm it's C_NAME [FlavioJS]
#define reference_tovariable(data) ( script->str_data[reference_getid(data)].type == C_NAME )
/// Returns the unique id of the reference (id and index)
#define reference_getuid(data) ( (data)->u.num )
@@ -829,6 +828,7 @@ struct script_interface {
void (*setarray_pc) (struct map_session_data* sd, const char* varname, uint32 idx, void* value, int* refcache);
bool (*config_read) (const char *filename, bool imported);
int (*add_str) (const char* p);
+ int (*add_variable) (const char *varname);
const char* (*get_str) (int id);
int (*search_str) (const char* p);
void (*setd_sub) (struct script_state *st, struct map_session_data *sd, const char *varname, int elem, const void *value, struct reg_db *ref);