diff options
-rw-r--r-- | src/common/HPMDataCheck.h | 2 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 12 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 29 |
3 files changed, 23 insertions, 20 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index 3d25d7330..a0ec8fc7e 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -648,6 +648,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "casecheck_data", sizeof(struct casecheck_data), SERVER_TYPE_MAP }, { "reg_db", sizeof(struct reg_db), SERVER_TYPE_MAP }, { "script_array", sizeof(struct script_array), SERVER_TYPE_MAP }, + { "script_buf", sizeof(struct script_buf), SERVER_TYPE_MAP }, { "script_code", sizeof(struct script_code), SERVER_TYPE_MAP }, { "script_data", sizeof(struct script_data), SERVER_TYPE_MAP }, { "script_function", sizeof(struct script_function), SERVER_TYPE_MAP }, @@ -662,6 +663,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "script_syntax_data", sizeof(struct script_syntax_data), SERVER_TYPE_MAP }, { "str_data_struct", sizeof(struct str_data_struct), SERVER_TYPE_MAP }, { "string_translation", sizeof(struct string_translation), SERVER_TYPE_MAP }, + { "string_translation_entry", sizeof(struct string_translation_entry), SERVER_TYPE_MAP }, #else #define MAP_SCRIPT_H #endif // MAP_SCRIPT_H diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 65bc2bd82..61b1f0cb7 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -5796,10 +5796,10 @@ typedef const char* (*HPMHOOK_pre_script_parse_syntax_close_sub) (const char **p typedef const char* (*HPMHOOK_post_script_parse_syntax_close_sub) (const char* retVal___, const char *p, int *flag); typedef const char* (*HPMHOOK_pre_script_parse_syntax) (const char **p); typedef const char* (*HPMHOOK_post_script_parse_syntax) (const char* retVal___, const char *p); -typedef c_op (*HPMHOOK_pre_script_get_com) (unsigned char **scriptbuf, int **pos); -typedef c_op (*HPMHOOK_post_script_get_com) (c_op retVal___, unsigned char *scriptbuf, int *pos); -typedef int (*HPMHOOK_pre_script_get_num) (unsigned char **scriptbuf, int **pos); -typedef int (*HPMHOOK_post_script_get_num) (int retVal___, unsigned char *scriptbuf, int *pos); +typedef c_op (*HPMHOOK_pre_script_get_com) (const struct script_buf **scriptbuf, int **pos); +typedef c_op (*HPMHOOK_post_script_get_com) (c_op retVal___, const struct script_buf *scriptbuf, int *pos); +typedef int (*HPMHOOK_pre_script_get_num) (const struct script_buf **scriptbuf, int **pos); +typedef int (*HPMHOOK_post_script_get_num) (int retVal___, const struct script_buf *scriptbuf, int *pos); typedef const char* (*HPMHOOK_pre_script_op2name) (int *op); typedef const char* (*HPMHOOK_post_script_op2name) (const char* retVal___, int op); typedef void (*HPMHOOK_pre_script_reportsrc) (struct script_state **st); @@ -5978,8 +5978,8 @@ typedef int (*HPMHOOK_pre_script_string_dup) (char **str); typedef int (*HPMHOOK_post_script_string_dup) (int retVal___, char *str); typedef void (*HPMHOOK_pre_script_load_translations) (void); typedef void (*HPMHOOK_post_script_load_translations) (void); -typedef void (*HPMHOOK_pre_script_load_translation) (const char **file, uint8 *lang_id, uint32 **total); -typedef void (*HPMHOOK_post_script_load_translation) (const char *file, uint8 lang_id, uint32 *total); +typedef int (*HPMHOOK_pre_script_load_translation) (const char **file, uint8 *lang_id); +typedef int (*HPMHOOK_post_script_load_translation) (int retVal___, const char *file, uint8 lang_id); typedef int (*HPMHOOK_pre_script_translation_db_destroyer) (union DBKey *key, struct DBData **data, va_list ap); typedef int (*HPMHOOK_post_script_translation_db_destroyer) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef void (*HPMHOOK_pre_script_clear_translations) (bool *reload); diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 48fae567f..820eb5832 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -61773,11 +61773,11 @@ const char* HP_script_parse_syntax(const char *p) { } return retVal___; } -c_op HP_script_get_com(unsigned char *scriptbuf, int *pos) { +c_op HP_script_get_com(const struct script_buf *scriptbuf, int *pos) { int hIndex = 0; c_op retVal___ = C_NOP; if( HPMHooks.count.HP_script_get_com_pre ) { - c_op (*preHookFunc) (unsigned char **scriptbuf, int **pos); + c_op (*preHookFunc) (const struct script_buf **scriptbuf, int **pos); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_script_get_com_pre[hIndex].func; @@ -61792,7 +61792,7 @@ c_op HP_script_get_com(unsigned char *scriptbuf, int *pos) { retVal___ = HPMHooks.source.script.get_com(scriptbuf, pos); } if( HPMHooks.count.HP_script_get_com_post ) { - c_op (*postHookFunc) (c_op retVal___, unsigned char *scriptbuf, int *pos); + c_op (*postHookFunc) (c_op retVal___, const struct script_buf *scriptbuf, int *pos); for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_script_get_com_post[hIndex].func; retVal___ = postHookFunc(retVal___, scriptbuf, pos); @@ -61800,11 +61800,11 @@ c_op HP_script_get_com(unsigned char *scriptbuf, int *pos) { } return retVal___; } -int HP_script_get_num(unsigned char *scriptbuf, int *pos) { +int HP_script_get_num(const struct script_buf *scriptbuf, int *pos) { int hIndex = 0; int retVal___ = 0; if( HPMHooks.count.HP_script_get_num_pre ) { - int (*preHookFunc) (unsigned char **scriptbuf, int **pos); + int (*preHookFunc) (const struct script_buf **scriptbuf, int **pos); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_script_get_num_pre[hIndex].func; @@ -61819,7 +61819,7 @@ int HP_script_get_num(unsigned char *scriptbuf, int *pos) { retVal___ = HPMHooks.source.script.get_num(scriptbuf, pos); } if( HPMHooks.count.HP_script_get_num_post ) { - int (*postHookFunc) (int retVal___, unsigned char *scriptbuf, int *pos); + int (*postHookFunc) (int retVal___, const struct script_buf *scriptbuf, int *pos); for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_script_get_num_post[hIndex].func; retVal___ = postHookFunc(retVal___, scriptbuf, pos); @@ -64326,31 +64326,32 @@ void HP_script_load_translations(void) { } return; } -void HP_script_load_translation(const char *file, uint8 lang_id, uint32 *total) { +int HP_script_load_translation(const char *file, uint8 lang_id) { int hIndex = 0; + int retVal___ = 0; if( HPMHooks.count.HP_script_load_translation_pre ) { - void (*preHookFunc) (const char **file, uint8 *lang_id, uint32 **total); + int (*preHookFunc) (const char **file, uint8 *lang_id); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_script_load_translation_pre[hIndex].func; - preHookFunc(&file, &lang_id, &total); + retVal___ = preHookFunc(&file, &lang_id); } if( *HPMforce_return ) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.load_translation(file, lang_id, total); + retVal___ = HPMHooks.source.script.load_translation(file, lang_id); } if( HPMHooks.count.HP_script_load_translation_post ) { - void (*postHookFunc) (const char *file, uint8 lang_id, uint32 *total); + int (*postHookFunc) (int retVal___, const char *file, uint8 lang_id); for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_script_load_translation_post[hIndex].func; - postHookFunc(file, lang_id, total); + retVal___ = postHookFunc(retVal___, file, lang_id); } } - return; + return retVal___; } int HP_script_translation_db_destroyer(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; |