From 451ee8a3290d79614ce800ea36ebbc3884620b57 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 14 Mar 2016 20:17:08 +0300 Subject: Add ClientVersion constant parameter into code. --- src/emap/init.c | 1 + src/emap/script.c | 7 +++++++ src/emap/script.h | 1 + 3 files changed, 9 insertions(+) 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); -- cgit v1.2.3-70-g09d2