summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 8c9600f..fb9da26 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -250,6 +250,7 @@ HPExport void plugin_init (void)
addHookPre(script, reload, escript_reload_pre);
addHookPre(script, load_translations, escript_load_translations_pre);
addHookPre(script, load_parameters, escript_load_parameters_pre);
+ addHookPre(script, hardcoded_constants, escript_hardcoded_constants_pre);
addHookPre(status, calc_pc_additional, estatus_calc_pc_additional_pre);
addHookPost(clif, addcards, eclif_addcards_post);
diff --git a/src/emap/script.c b/src/emap/script.c
index 9f19693..e3ad3ed 100644
--- a/src/emap/script.c
+++ b/src/emap/script.c
@@ -79,6 +79,13 @@ void escript_load_parameters_pre(void)
script->constdb_comment(NULL);
}
+void escript_hardcoded_constants_pre(void)
+{
+ script->constdb_comment("Evol constants");
+ script->set_constant("MAX_SLOTS", MAX_SLOTS, false, false);
+ script->constdb_comment(NULL);
+}
+
// stripped copy from script_load_translations without actual translation loading.
void escript_load_translations_pre(void)
{
diff --git a/src/emap/script.h b/src/emap/script.h
index 3985dcf..cd29816 100644
--- a/src/emap/script.h
+++ b/src/emap/script.h
@@ -7,6 +7,7 @@
int escript_reload_pre(void);
void escript_load_translations_pre(void);
void escript_load_parameters_pre(void);
+void escript_hardcoded_constants_pre(void);
void eset_reg_npcscope_num_pre(struct script_state **stPtr,
struct reg_db **nPtr,
int64 *numPtr,