summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-14 20:17:08 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-14 20:17:08 +0300
commit451ee8a3290d79614ce800ea36ebbc3884620b57 (patch)
tree1bfcf456ba6e345e5ac1aa3b00771399bc8f86b8
parent555d55b9f08d7f60a967c7d914933a92f31016bc (diff)
downloadevol-hercules-451ee8a3290d79614ce800ea36ebbc3884620b57.tar.gz
evol-hercules-451ee8a3290d79614ce800ea36ebbc3884620b57.tar.bz2
evol-hercules-451ee8a3290d79614ce800ea36ebbc3884620b57.tar.xz
evol-hercules-451ee8a3290d79614ce800ea36ebbc3884620b57.zip
Add ClientVersion constant parameter into code.release2016-03-15
-rw-r--r--src/emap/init.c1
-rw-r--r--src/emap/script.c7
-rw-r--r--src/emap/script.h1
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);