diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-14 20:17:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-14 20:17:08 +0300 |
commit | 451ee8a3290d79614ce800ea36ebbc3884620b57 (patch) | |
tree | 1bfcf456ba6e345e5ac1aa3b00771399bc8f86b8 | |
parent | 555d55b9f08d7f60a967c7d914933a92f31016bc (diff) | |
download | evol-hercules-release2016-03-15.tar.gz evol-hercules-release2016-03-15.tar.bz2 evol-hercules-release2016-03-15.tar.xz evol-hercules-release2016-03-15.zip |
Add ClientVersion constant parameter into code.release2016-03-15
-rw-r--r-- | src/emap/init.c | 1 | ||||
-rw-r--r-- | src/emap/script.c | 7 | ||||
-rw-r--r-- | src/emap/script.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/emap/init.c b/src/emap/init.c index f89829f..021fcf2 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -227,6 +227,7 @@ HPExport void plugin_init (void) addHookPre("script->set_reg_ref_str", eset_reg_npcscope_str); addHookPre("script->reload", escript_reload); addHookPre("script->load_translations", escript_load_translations); + addHookPre("script->load_parameters", escript_load_parameters); addHookPre("status->calc_pc_additional", estatus_calc_pc_additional); addHookPost("clif->getareachar_unit", eclif_getareachar_unit_post); diff --git a/src/emap/script.c b/src/emap/script.c index 4b60fe7..12e01e5 100644 --- a/src/emap/script.c +++ b/src/emap/script.c @@ -94,6 +94,13 @@ int escript_reload(void) return 0; } +void escript_load_parameters(void) +{ + script->constdb_comment("Evol parameters"); + script->set_constant("ClientVersion", 10000, true, false); + script->constdb_comment(NULL); +} + // stripped copy from script_load_translations without actual translation loading. void escript_load_translations(void) { diff --git a/src/emap/script.h b/src/emap/script.h index feae1c0..a801189 100644 --- a/src/emap/script.h +++ b/src/emap/script.h @@ -6,6 +6,7 @@ int escript_reload(void); void escript_load_translations(void); +void escript_load_parameters(void); void eset_reg_npcscope_num(struct script_state* st, struct reg_db *n, int64 *num, const char* name, int *val); int eget_val_npcscope_num(struct script_state* st, struct reg_db *n, struct script_data* data); void eset_reg_npcscope_str(struct script_state* st, struct reg_db *n, int64 *num, const char* name, const char *str); |