summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc98
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc76
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc19
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc530
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc14
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc24
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc6
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc223
8 files changed, 785 insertions, 205 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 2023730f7..4061bd4d4 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -198,12 +198,14 @@ typedef int64 (*HPMHOOK_pre_battle_add_mastery) (struct map_session_data **sd, s
typedef int64 (*HPMHOOK_post_battle_add_mastery) (int64 retVal___, struct map_session_data *sd, struct block_list *target, int64 dmg, int type);
typedef int (*HPMHOOK_pre_battle_calc_drain) (int64 *damage, int *rate, int *per);
typedef int (*HPMHOOK_post_battle_calc_drain) (int retVal___, int64 damage, int rate, int per);
-typedef int (*HPMHOOK_pre_battle_config_read) (const char **cfgName);
-typedef int (*HPMHOOK_post_battle_config_read) (int retVal___, const char *cfgName);
+typedef bool (*HPMHOOK_pre_battle_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_battle_config_read) (bool retVal___, const char *filename, bool imported);
typedef void (*HPMHOOK_pre_battle_config_set_defaults) (void);
typedef void (*HPMHOOK_post_battle_config_set_defaults) (void);
-typedef int (*HPMHOOK_pre_battle_config_set_value) (const char **w1, const char **w2);
-typedef int (*HPMHOOK_post_battle_config_set_value) (int retVal___, const char *w1, const char *w2);
+typedef bool (*HPMHOOK_pre_battle_config_set_value_sub) (int *index, int *value);
+typedef bool (*HPMHOOK_post_battle_config_set_value_sub) (bool retVal___, int index, int value);
+typedef bool (*HPMHOOK_pre_battle_config_set_value) (const char **param, const char **value);
+typedef bool (*HPMHOOK_post_battle_config_set_value) (bool retVal___, const char *param, const char *value);
typedef bool (*HPMHOOK_pre_battle_config_get_value) (const char **w1, int **value);
typedef bool (*HPMHOOK_post_battle_config_get_value) (bool retVal___, const char *w1, int *value);
typedef void (*HPMHOOK_pre_battle_config_adjust) (void);
@@ -658,12 +660,40 @@ typedef int (*HPMHOOK_pre_chr_online_data_cleanup_sub) (union DBKey *key, struct
typedef int (*HPMHOOK_post_chr_online_data_cleanup_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
typedef int (*HPMHOOK_pre_chr_online_data_cleanup) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_chr_online_data_cleanup) (int retVal___, int tid, int64 tick, int id, intptr_t data);
-typedef void (*HPMHOOK_pre_chr_sql_config_read) (const char **cfgName);
-typedef void (*HPMHOOK_post_chr_sql_config_read) (const char *cfgName);
-typedef void (*HPMHOOK_pre_chr_config_dispatch) (char **w1, char **w2);
-typedef void (*HPMHOOK_post_chr_config_dispatch) (char *w1, char *w2);
-typedef int (*HPMHOOK_pre_chr_config_read) (const char **cfgName);
-typedef int (*HPMHOOK_post_chr_config_read) (int retVal___, const char *cfgName);
+typedef bool (*HPMHOOK_pre_chr_sql_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_chr_sql_config_read) (bool retVal___, const char *filename, bool imported);
+typedef bool (*HPMHOOK_pre_chr_sql_config_read_registry) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_sql_config_read_registry) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_sql_config_read_pc) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_sql_config_read_pc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_sql_config_read_guild) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_sql_config_read_guild) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_chr_config_read) (bool retVal___, const char *filename, bool imported);
+typedef bool (*HPMHOOK_pre_chr_config_read_database) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_config_read_database) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_config_read_console) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_config_read_console) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_config_read_player_fame) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_config_read_player_fame) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_config_read_player_deletion) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_config_read_player_deletion) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_config_read_player_name) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_config_read_player_name) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef void (*HPMHOOK_pre_chr_config_set_start_item) (const struct config_setting_t **setting);
+typedef void (*HPMHOOK_post_chr_config_set_start_item) (const struct config_setting_t *setting);
+typedef bool (*HPMHOOK_pre_chr_config_read_player_new) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_config_read_player_new) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_config_read_player) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_config_read_player) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_config_read_permission) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_config_read_permission) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_config_set_ip) (const char **type, const char **value, uint32 **out_ip, char **out_ip_str);
+typedef bool (*HPMHOOK_post_chr_config_set_ip) (bool retVal___, const char *type, const char *value, uint32 *out_ip, char *out_ip_str);
+typedef bool (*HPMHOOK_pre_chr_config_read_inter) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_config_read_inter) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_config_read_top) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_config_read_top) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
#endif // CHAR_CHAR_H
#ifdef MAP_CHAT_H /* chat */
typedef bool (*HPMHOOK_pre_chat_create_pc_chat) (struct map_session_data **sd, const char **title, const char **pass, int *limit, bool *pub);
@@ -2828,8 +2858,6 @@ typedef void (*HPMHOOK_pre_inter_savereg) (int *account_id, int *char_id, const
typedef void (*HPMHOOK_post_inter_savereg) (int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string);
typedef int (*HPMHOOK_pre_inter_accreg_fromsql) (int *account_id, int *char_id, int *fd, int *type);
typedef int (*HPMHOOK_post_inter_accreg_fromsql) (int retVal___, int account_id, int char_id, int fd, int type);
-typedef int (*HPMHOOK_pre_inter_config_read) (const char **cfgName);
-typedef int (*HPMHOOK_post_inter_config_read) (int retVal___, const char *cfgName);
typedef int (*HPMHOOK_pre_inter_vlog) (char **fmt, va_list ap);
typedef int (*HPMHOOK_post_inter_vlog) (int retVal___, char *fmt, va_list ap);
typedef int (*HPMHOOK_pre_inter_init_sql) (const char **file);
@@ -2846,6 +2874,10 @@ typedef int (*HPMHOOK_pre_inter_parse_frommap) (int *fd);
typedef int (*HPMHOOK_post_inter_parse_frommap) (int retVal___, int fd);
typedef void (*HPMHOOK_pre_inter_final) (void);
typedef void (*HPMHOOK_post_inter_final) (void);
+typedef bool (*HPMHOOK_pre_inter_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_inter_config_read) (bool retVal___, const char *filename, bool imported);
+typedef bool (*HPMHOOK_pre_inter_config_read_connection) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_inter_config_read_connection) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
#endif // CHAR_INTER_H
#ifdef CHAR_INT_MAIL_H /* inter_mail */
typedef int (*HPMHOOK_pre_inter_mail_sql_init) (void);
@@ -3588,8 +3620,8 @@ typedef void (*HPMHOOK_pre_logs_branch_sub) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_logs_branch_sub) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_logs_mvpdrop_sub) (struct map_session_data **sd, int *monster_id, int **log_mvp);
typedef void (*HPMHOOK_post_logs_mvpdrop_sub) (struct map_session_data *sd, int monster_id, int *log_mvp);
-typedef int (*HPMHOOK_pre_logs_config_read) (const char **cfgName);
-typedef int (*HPMHOOK_post_logs_config_read) (int retVal___, const char *cfgName);
+typedef bool (*HPMHOOK_pre_logs_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_logs_config_read) (bool retVal___, const char *filename, bool imported);
typedef void (*HPMHOOK_pre_logs_config_done) (void);
typedef void (*HPMHOOK_post_logs_config_done) (void);
typedef void (*HPMHOOK_pre_logs_sql_init) (void);
@@ -3700,8 +3732,8 @@ typedef void (*HPMHOOK_pre_login_parse_request_connection) (int *fd, struct logi
typedef void (*HPMHOOK_post_login_parse_request_connection) (int fd, struct login_session_data *sd, const char *ip, uint32 ipl);
typedef void (*HPMHOOK_pre_login_config_set_defaults) (void);
typedef void (*HPMHOOK_post_login_config_set_defaults) (void);
-typedef int (*HPMHOOK_pre_login_config_read) (const char **cfgName);
-typedef int (*HPMHOOK_post_login_config_read) (int retVal___, const char *cfgName);
+typedef bool (*HPMHOOK_pre_login_config_read) (const char **filename, bool *included);
+typedef bool (*HPMHOOK_post_login_config_read) (bool retVal___, const char *filename, bool included);
#endif // LOGIN_LOGIN_H
#ifdef CHAR_LOGINIF_H /* loginif */
typedef void (*HPMHOOK_pre_loginif_init) (void);
@@ -3936,8 +3968,8 @@ typedef int (*HPMHOOK_pre_map_random_dir) (struct block_list **bl, short **x, sh
typedef int (*HPMHOOK_post_map_random_dir) (int retVal___, struct block_list *bl, short *x, short *y);
typedef int (*HPMHOOK_pre_map_cleanup_sub) (struct block_list **bl, va_list ap);
typedef int (*HPMHOOK_post_map_cleanup_sub) (int retVal___, struct block_list *bl, va_list ap);
-typedef int (*HPMHOOK_pre_map_delmap) (char **mapname);
-typedef int (*HPMHOOK_post_map_delmap) (int retVal___, char *mapname);
+typedef int (*HPMHOOK_pre_map_delmap) (const char **mapname);
+typedef int (*HPMHOOK_post_map_delmap) (int retVal___, const char *mapname);
typedef void (*HPMHOOK_pre_map_flags_init) (void);
typedef void (*HPMHOOK_post_map_flags_init) (void);
typedef bool (*HPMHOOK_pre_map_iwall_set) (int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char **wall_name);
@@ -4006,14 +4038,16 @@ typedef int (*HPMHOOK_pre_map_readgat) (struct map_data **m);
typedef int (*HPMHOOK_post_map_readgat) (int retVal___, struct map_data *m);
typedef int (*HPMHOOK_pre_map_readallmaps) (void);
typedef int (*HPMHOOK_post_map_readallmaps) (int retVal___);
-typedef int (*HPMHOOK_pre_map_config_read) (char **cfgName);
-typedef int (*HPMHOOK_post_map_config_read) (int retVal___, char *cfgName);
-typedef int (*HPMHOOK_pre_map_config_read_sub) (char **cfgName);
-typedef int (*HPMHOOK_post_map_config_read_sub) (int retVal___, char *cfgName);
-typedef void (*HPMHOOK_pre_map_reloadnpc_sub) (char **cfgName);
-typedef void (*HPMHOOK_post_map_reloadnpc_sub) (char *cfgName);
-typedef int (*HPMHOOK_pre_map_inter_config_read) (char **cfgName);
-typedef int (*HPMHOOK_post_map_inter_config_read) (int retVal___, char *cfgName);
+typedef bool (*HPMHOOK_pre_map_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_map_config_read) (bool retVal___, const char *filename, bool imported);
+typedef bool (*HPMHOOK_pre_map_read_npclist) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_map_read_npclist) (bool retVal___, const char *filename, bool imported);
+typedef bool (*HPMHOOK_pre_map_inter_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_map_inter_config_read) (bool retVal___, const char *filename, bool imported);
+typedef bool (*HPMHOOK_pre_map_inter_config_read_database_names) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_map_inter_config_read_database_names) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_map_inter_config_read_connection) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_map_inter_config_read_connection) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
typedef int (*HPMHOOK_pre_map_sql_init) (void);
typedef int (*HPMHOOK_post_map_sql_init) (int retVal___);
typedef int (*HPMHOOK_pre_map_sql_close) (void);
@@ -4448,8 +4482,8 @@ typedef int (*HPMHOOK_pre_mapreg_destroyreg) (union DBKey *key, struct DBData **
typedef int (*HPMHOOK_post_mapreg_destroyreg) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
typedef void (*HPMHOOK_pre_mapreg_reload) (void);
typedef void (*HPMHOOK_post_mapreg_reload) (void);
-typedef bool (*HPMHOOK_pre_mapreg_config_read) (const char **w1, const char **w2);
-typedef bool (*HPMHOOK_post_mapreg_config_read) (bool retVal___, const char *w1, const char *w2);
+typedef bool (*HPMHOOK_pre_mapreg_config_read) (const char **filename, const struct config_setting_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_mapreg_config_read) (bool retVal___, const char *filename, const struct config_setting_t *config, bool imported);
#endif // MAP_MAPREG_H
#ifdef COMMON_MD5CALC_H /* md5 */
typedef void (*HPMHOOK_pre_md5_string) (const char **string, char **output);
@@ -5682,8 +5716,8 @@ typedef int (*HPMHOOK_pre_pincode_compare) (int *fd, struct char_session_data **
typedef int (*HPMHOOK_post_pincode_compare) (int retVal___, int fd, struct char_session_data *sd, char *pin);
typedef void (*HPMHOOK_pre_pincode_check) (int *fd, struct char_session_data **sd);
typedef void (*HPMHOOK_post_pincode_check) (int fd, struct char_session_data *sd);
-typedef bool (*HPMHOOK_pre_pincode_config_read) (char **w1, char **w2);
-typedef bool (*HPMHOOK_post_pincode_config_read) (bool retVal___, char *w1, char *w2);
+typedef bool (*HPMHOOK_pre_pincode_config_read) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_pincode_config_read) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
#endif // CHAR_PINCODE_H
#ifdef MAP_QUEST_H /* quest */
typedef void (*HPMHOOK_pre_quest_init) (bool *minimal);
@@ -5840,8 +5874,8 @@ typedef void (*HPMHOOK_pre_script_cleararray_pc) (struct map_session_data **sd,
typedef void (*HPMHOOK_post_script_cleararray_pc) (struct map_session_data *sd, const char *varname, void *value);
typedef void (*HPMHOOK_pre_script_setarray_pc) (struct map_session_data **sd, const char **varname, uint32 *idx, void **value, int **refcache);
typedef void (*HPMHOOK_post_script_setarray_pc) (struct map_session_data *sd, const char *varname, uint32 idx, void *value, int *refcache);
-typedef int (*HPMHOOK_pre_script_config_read) (char **cfgName);
-typedef int (*HPMHOOK_post_script_config_read) (int retVal___, char *cfgName);
+typedef bool (*HPMHOOK_pre_script_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_script_config_read) (bool retVal___, const char *filename, bool imported);
typedef int (*HPMHOOK_pre_script_add_str) (const char **p);
typedef int (*HPMHOOK_post_script_add_str) (int retVal___, const char *p);
typedef const char* (*HPMHOOK_pre_script_get_str) (int *id);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index f51ddcffc..44b56143f 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -344,10 +344,38 @@ struct {
struct HPMHookPoint *HP_chr_online_data_cleanup_post;
struct HPMHookPoint *HP_chr_sql_config_read_pre;
struct HPMHookPoint *HP_chr_sql_config_read_post;
- struct HPMHookPoint *HP_chr_config_dispatch_pre;
- struct HPMHookPoint *HP_chr_config_dispatch_post;
+ struct HPMHookPoint *HP_chr_sql_config_read_registry_pre;
+ struct HPMHookPoint *HP_chr_sql_config_read_registry_post;
+ struct HPMHookPoint *HP_chr_sql_config_read_pc_pre;
+ struct HPMHookPoint *HP_chr_sql_config_read_pc_post;
+ struct HPMHookPoint *HP_chr_sql_config_read_guild_pre;
+ struct HPMHookPoint *HP_chr_sql_config_read_guild_post;
struct HPMHookPoint *HP_chr_config_read_pre;
struct HPMHookPoint *HP_chr_config_read_post;
+ struct HPMHookPoint *HP_chr_config_read_database_pre;
+ struct HPMHookPoint *HP_chr_config_read_database_post;
+ struct HPMHookPoint *HP_chr_config_read_console_pre;
+ struct HPMHookPoint *HP_chr_config_read_console_post;
+ struct HPMHookPoint *HP_chr_config_read_player_fame_pre;
+ struct HPMHookPoint *HP_chr_config_read_player_fame_post;
+ struct HPMHookPoint *HP_chr_config_read_player_deletion_pre;
+ struct HPMHookPoint *HP_chr_config_read_player_deletion_post;
+ struct HPMHookPoint *HP_chr_config_read_player_name_pre;
+ struct HPMHookPoint *HP_chr_config_read_player_name_post;
+ struct HPMHookPoint *HP_chr_config_set_start_item_pre;
+ struct HPMHookPoint *HP_chr_config_set_start_item_post;
+ struct HPMHookPoint *HP_chr_config_read_player_new_pre;
+ struct HPMHookPoint *HP_chr_config_read_player_new_post;
+ struct HPMHookPoint *HP_chr_config_read_player_pre;
+ struct HPMHookPoint *HP_chr_config_read_player_post;
+ struct HPMHookPoint *HP_chr_config_read_permission_pre;
+ struct HPMHookPoint *HP_chr_config_read_permission_post;
+ struct HPMHookPoint *HP_chr_config_set_ip_pre;
+ struct HPMHookPoint *HP_chr_config_set_ip_post;
+ struct HPMHookPoint *HP_chr_config_read_inter_pre;
+ struct HPMHookPoint *HP_chr_config_read_inter_post;
+ struct HPMHookPoint *HP_chr_config_read_top_pre;
+ struct HPMHookPoint *HP_chr_config_read_top_post;
struct HPMHookPoint *HP_cmdline_init_pre;
struct HPMHookPoint *HP_cmdline_init_post;
struct HPMHookPoint *HP_cmdline_final_pre;
@@ -506,8 +534,6 @@ struct {
struct HPMHookPoint *HP_inter_savereg_post;
struct HPMHookPoint *HP_inter_accreg_fromsql_pre;
struct HPMHookPoint *HP_inter_accreg_fromsql_post;
- struct HPMHookPoint *HP_inter_config_read_pre;
- struct HPMHookPoint *HP_inter_config_read_post;
struct HPMHookPoint *HP_inter_vlog_pre;
struct HPMHookPoint *HP_inter_vlog_post;
struct HPMHookPoint *HP_inter_init_sql_pre;
@@ -524,6 +550,10 @@ struct {
struct HPMHookPoint *HP_inter_parse_frommap_post;
struct HPMHookPoint *HP_inter_final_pre;
struct HPMHookPoint *HP_inter_final_post;
+ struct HPMHookPoint *HP_inter_config_read_pre;
+ struct HPMHookPoint *HP_inter_config_read_post;
+ struct HPMHookPoint *HP_inter_config_read_connection_pre;
+ struct HPMHookPoint *HP_inter_config_read_connection_post;
struct HPMHookPoint *HP_inter_mail_sql_init_pre;
struct HPMHookPoint *HP_inter_mail_sql_init_post;
struct HPMHookPoint *HP_inter_mail_sql_final_pre;
@@ -1817,10 +1847,38 @@ struct {
int HP_chr_online_data_cleanup_post;
int HP_chr_sql_config_read_pre;
int HP_chr_sql_config_read_post;
- int HP_chr_config_dispatch_pre;
- int HP_chr_config_dispatch_post;
+ int HP_chr_sql_config_read_registry_pre;
+ int HP_chr_sql_config_read_registry_post;
+ int HP_chr_sql_config_read_pc_pre;
+ int HP_chr_sql_config_read_pc_post;
+ int HP_chr_sql_config_read_guild_pre;
+ int HP_chr_sql_config_read_guild_post;
int HP_chr_config_read_pre;
int HP_chr_config_read_post;
+ int HP_chr_config_read_database_pre;
+ int HP_chr_config_read_database_post;
+ int HP_chr_config_read_console_pre;
+ int HP_chr_config_read_console_post;
+ int HP_chr_config_read_player_fame_pre;
+ int HP_chr_config_read_player_fame_post;
+ int HP_chr_config_read_player_deletion_pre;
+ int HP_chr_config_read_player_deletion_post;
+ int HP_chr_config_read_player_name_pre;
+ int HP_chr_config_read_player_name_post;
+ int HP_chr_config_set_start_item_pre;
+ int HP_chr_config_set_start_item_post;
+ int HP_chr_config_read_player_new_pre;
+ int HP_chr_config_read_player_new_post;
+ int HP_chr_config_read_player_pre;
+ int HP_chr_config_read_player_post;
+ int HP_chr_config_read_permission_pre;
+ int HP_chr_config_read_permission_post;
+ int HP_chr_config_set_ip_pre;
+ int HP_chr_config_set_ip_post;
+ int HP_chr_config_read_inter_pre;
+ int HP_chr_config_read_inter_post;
+ int HP_chr_config_read_top_pre;
+ int HP_chr_config_read_top_post;
int HP_cmdline_init_pre;
int HP_cmdline_init_post;
int HP_cmdline_final_pre;
@@ -1979,8 +2037,6 @@ struct {
int HP_inter_savereg_post;
int HP_inter_accreg_fromsql_pre;
int HP_inter_accreg_fromsql_post;
- int HP_inter_config_read_pre;
- int HP_inter_config_read_post;
int HP_inter_vlog_pre;
int HP_inter_vlog_post;
int HP_inter_init_sql_pre;
@@ -1997,6 +2053,10 @@ struct {
int HP_inter_parse_frommap_post;
int HP_inter_final_pre;
int HP_inter_final_post;
+ int HP_inter_config_read_pre;
+ int HP_inter_config_read_post;
+ int HP_inter_config_read_connection_pre;
+ int HP_inter_config_read_connection_post;
int HP_inter_mail_sql_init_pre;
int HP_inter_mail_sql_init_post;
int HP_inter_mail_sql_final_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 4371cf81a..35f9044d5 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -187,8 +187,22 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(chr->online_data_cleanup_sub, HP_chr_online_data_cleanup_sub) },
{ HP_POP(chr->online_data_cleanup, HP_chr_online_data_cleanup) },
{ HP_POP(chr->sql_config_read, HP_chr_sql_config_read) },
- { HP_POP(chr->config_dispatch, HP_chr_config_dispatch) },
+ { HP_POP(chr->sql_config_read_registry, HP_chr_sql_config_read_registry) },
+ { HP_POP(chr->sql_config_read_pc, HP_chr_sql_config_read_pc) },
+ { HP_POP(chr->sql_config_read_guild, HP_chr_sql_config_read_guild) },
{ HP_POP(chr->config_read, HP_chr_config_read) },
+ { HP_POP(chr->config_read_database, HP_chr_config_read_database) },
+ { HP_POP(chr->config_read_console, HP_chr_config_read_console) },
+ { HP_POP(chr->config_read_player_fame, HP_chr_config_read_player_fame) },
+ { HP_POP(chr->config_read_player_deletion, HP_chr_config_read_player_deletion) },
+ { HP_POP(chr->config_read_player_name, HP_chr_config_read_player_name) },
+ { HP_POP(chr->config_set_start_item, HP_chr_config_set_start_item) },
+ { HP_POP(chr->config_read_player_new, HP_chr_config_read_player_new) },
+ { HP_POP(chr->config_read_player, HP_chr_config_read_player) },
+ { HP_POP(chr->config_read_permission, HP_chr_config_read_permission) },
+ { HP_POP(chr->config_set_ip, HP_chr_config_set_ip) },
+ { HP_POP(chr->config_read_inter, HP_chr_config_read_inter) },
+ { HP_POP(chr->config_read_top, HP_chr_config_read_top) },
/* cmdline_interface */
{ HP_POP(cmdline->init, HP_cmdline_init) },
{ HP_POP(cmdline->final, HP_cmdline_final) },
@@ -279,7 +293,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(inter->vmsg_to_fd, HP_inter_vmsg_to_fd) },
{ HP_POP(inter->savereg, HP_inter_savereg) },
{ HP_POP(inter->accreg_fromsql, HP_inter_accreg_fromsql) },
- { HP_POP(inter->config_read, HP_inter_config_read) },
{ HP_POP(inter->vlog, HP_inter_vlog) },
{ HP_POP(inter->init_sql, HP_inter_init_sql) },
{ HP_POP(inter->mapif_init, HP_inter_mapif_init) },
@@ -288,6 +301,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(inter->check_length, HP_inter_check_length) },
{ HP_POP(inter->parse_frommap, HP_inter_parse_frommap) },
{ HP_POP(inter->final, HP_inter_final) },
+ { HP_POP(inter->config_read, HP_inter_config_read) },
+ { HP_POP(inter->config_read_connection, HP_inter_config_read_connection) },
/* inter_mail_interface */
{ HP_POP(inter_mail->sql_init, HP_inter_mail_sql_init) },
{ HP_POP(inter_mail->sql_final, HP_inter_mail_sql_final) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index aecffbecd..3669b2da8 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -4216,67 +4216,123 @@ int HP_chr_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) {
}
return retVal___;
}
-void HP_chr_sql_config_read(const char *cfgName) {
+bool HP_chr_sql_config_read(const char *filename, bool imported) {
int hIndex = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_chr_sql_config_read_pre ) {
- void (*preHookFunc) (const char **cfgName);
+ bool (*preHookFunc) (const char **filename, bool *imported);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chr_sql_config_read_pre[hIndex].func;
- preHookFunc(&cfgName);
+ retVal___ = preHookFunc(&filename, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return;
+ return retVal___;
}
}
{
- HPMHooks.source.chr.sql_config_read(cfgName);
+ retVal___ = HPMHooks.source.chr.sql_config_read(filename, imported);
}
if( HPMHooks.count.HP_chr_sql_config_read_post ) {
- void (*postHookFunc) (const char *cfgName);
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_chr_sql_config_read_post[hIndex].func;
- postHookFunc(cfgName);
+ retVal___ = postHookFunc(retVal___, filename, imported);
}
}
- return;
+ return retVal___;
}
-void HP_chr_config_dispatch(char *w1, char *w2) {
+bool HP_chr_sql_config_read_registry(const char *filename, const struct config_t *config, bool imported) {
int hIndex = 0;
- if( HPMHooks.count.HP_chr_config_dispatch_pre ) {
- void (*preHookFunc) (char **w1, char **w2);
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_sql_config_read_registry_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_dispatch_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_chr_config_dispatch_pre[hIndex].func;
- preHookFunc(&w1, &w2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_registry_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_sql_config_read_registry_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return;
+ return retVal___;
}
}
{
- HPMHooks.source.chr.config_dispatch(w1, w2);
+ retVal___ = HPMHooks.source.chr.sql_config_read_registry(filename, config, imported);
}
- if( HPMHooks.count.HP_chr_config_dispatch_post ) {
- void (*postHookFunc) (char *w1, char *w2);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_dispatch_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_chr_config_dispatch_post[hIndex].func;
- postHookFunc(w1, w2);
+ if( HPMHooks.count.HP_chr_sql_config_read_registry_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_registry_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_sql_config_read_registry_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
}
}
- return;
+ return retVal___;
}
-int HP_chr_config_read(const char *cfgName) {
+bool HP_chr_sql_config_read_pc(const char *filename, const struct config_t *config, bool imported) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_sql_config_read_pc_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_sql_config_read_pc_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.sql_config_read_pc(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_sql_config_read_pc_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_sql_config_read_pc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_sql_config_read_guild(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_sql_config_read_guild_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_guild_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_sql_config_read_guild_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.sql_config_read_guild(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_sql_config_read_guild_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_guild_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_sql_config_read_guild_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_config_read(const char *filename, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_chr_config_read_pre ) {
- int (*preHookFunc) (const char **cfgName);
+ bool (*preHookFunc) (const char **filename, bool *imported);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chr_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
+ retVal___ = preHookFunc(&filename, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -4284,13 +4340,336 @@ int HP_chr_config_read(const char *cfgName) {
}
}
{
- retVal___ = HPMHooks.source.chr.config_read(cfgName);
+ retVal___ = HPMHooks.source.chr.config_read(filename, imported);
}
if( HPMHooks.count.HP_chr_config_read_post ) {
- int (*postHookFunc) (int retVal___, const char *cfgName);
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_chr_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, cfgName);
+ retVal___ = postHookFunc(retVal___, filename, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_config_read_database(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_config_read_database_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_database_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_read_database_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_read_database(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_config_read_database_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_database_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_read_database_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_config_read_console(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_config_read_console_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_console_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_read_console_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_read_console(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_config_read_console_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_console_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_read_console_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_config_read_player_fame(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_config_read_player_fame_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_fame_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_read_player_fame_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_read_player_fame(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_config_read_player_fame_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_fame_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_read_player_fame_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_config_read_player_deletion(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_config_read_player_deletion_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_deletion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_read_player_deletion_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_read_player_deletion(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_config_read_player_deletion_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_deletion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_read_player_deletion_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_config_read_player_name(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_config_read_player_name_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_read_player_name_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_read_player_name(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_config_read_player_name_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_read_player_name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+void HP_chr_config_set_start_item(const struct config_setting_t *setting) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chr_config_set_start_item_pre ) {
+ void (*preHookFunc) (const struct config_setting_t **setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_start_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_set_start_item_pre[hIndex].func;
+ preHookFunc(&setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chr.config_set_start_item(setting);
+ }
+ if( HPMHooks.count.HP_chr_config_set_start_item_post ) {
+ void (*postHookFunc) (const struct config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_start_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_set_start_item_post[hIndex].func;
+ postHookFunc(setting);
+ }
+ }
+ return;
+}
+bool HP_chr_config_read_player_new(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_config_read_player_new_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_new_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_read_player_new_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_read_player_new(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_config_read_player_new_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_new_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_read_player_new_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_config_read_player(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_config_read_player_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_read_player_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_read_player(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_config_read_player_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_read_player_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_config_read_permission(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_config_read_permission_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_permission_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_read_permission_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_read_permission(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_config_read_permission_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_permission_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_read_permission_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_config_set_ip(const char *type, const char *value, uint32 *out_ip, char *out_ip_str) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_config_set_ip_pre ) {
+ bool (*preHookFunc) (const char **type, const char **value, uint32 **out_ip, char **out_ip_str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_ip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_set_ip_pre[hIndex].func;
+ retVal___ = preHookFunc(&type, &value, &out_ip, &out_ip_str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_set_ip(type, value, out_ip, out_ip_str);
+ }
+ if( HPMHooks.count.HP_chr_config_set_ip_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *type, const char *value, uint32 *out_ip, char *out_ip_str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_ip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_set_ip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, type, value, out_ip, out_ip_str);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_config_read_inter(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_config_read_inter_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_inter_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_read_inter_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_read_inter(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_config_read_inter_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_inter_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_read_inter_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_config_read_top(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_config_read_top_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_top_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_config_read_top_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_read_top(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_config_read_top_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_top_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_config_read_top_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
}
}
return retVal___;
@@ -6427,33 +6806,6 @@ int HP_inter_accreg_fromsql(int account_id, int char_id, int fd, int type) {
}
return retVal___;
}
-int HP_inter_config_read(const char *cfgName) {
- int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_inter_config_read_pre ) {
- int (*preHookFunc) (const char **cfgName);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_inter_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.inter.config_read(cfgName);
- }
- if( HPMHooks.count.HP_inter_config_read_post ) {
- int (*postHookFunc) (int retVal___, const char *cfgName);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_inter_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, cfgName);
- }
- }
- return retVal___;
-}
int HP_inter_vlog(char *fmt, va_list ap) {
int hIndex = 0;
int retVal___ = 0;
@@ -6681,6 +7033,60 @@ void HP_inter_final(void) {
}
return;
}
+bool HP_inter_config_read(const char *filename, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_inter_config_read_pre ) {
+ bool (*preHookFunc) (const char **filename, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_inter_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter.config_read(filename, imported);
+ }
+ if( HPMHooks.count.HP_inter_config_read_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_inter_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_inter_config_read_connection(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_inter_config_read_connection_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_connection_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_inter_config_read_connection_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter.config_read_connection(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_inter_config_read_connection_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_connection_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_inter_config_read_connection_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
/* inter_mail_interface */
int HP_inter_mail_sql_init(void) {
int hIndex = 0;
@@ -15726,15 +16132,15 @@ void HP_pincode_check(int fd, struct char_session_data *sd) {
}
return;
}
-bool HP_pincode_config_read(char *w1, char *w2) {
+bool HP_pincode_config_read(const char *filename, const struct config_t *config, bool imported) {
int hIndex = 0;
bool retVal___ = false;
if( HPMHooks.count.HP_pincode_config_read_pre ) {
- bool (*preHookFunc) (char **w1, char **w2);
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pincode_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&w1, &w2);
+ retVal___ = preHookFunc(&filename, &config, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -15742,13 +16148,13 @@ bool HP_pincode_config_read(char *w1, char *w2) {
}
}
{
- retVal___ = HPMHooks.source.pincode.config_read(w1, w2);
+ retVal___ = HPMHooks.source.pincode.config_read(filename, config, imported);
}
if( HPMHooks.count.HP_pincode_config_read_post ) {
- bool (*postHookFunc) (bool retVal___, char *w1, char *w2);
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pincode_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2);
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
}
}
return retVal___;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 013a56104..290c2283a 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -4689,15 +4689,15 @@ void HP_login_config_set_defaults(void) {
}
return;
}
-int HP_login_config_read(const char *cfgName) {
+bool HP_login_config_read(const char *filename, bool included) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_login_config_read_pre ) {
- int (*preHookFunc) (const char **cfgName);
+ bool (*preHookFunc) (const char **filename, bool *included);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_login_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
+ retVal___ = preHookFunc(&filename, &included);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -4705,13 +4705,13 @@ int HP_login_config_read(const char *cfgName) {
}
}
{
- retVal___ = HPMHooks.source.login.config_read(cfgName);
+ retVal___ = HPMHooks.source.login.config_read(filename, included);
}
if( HPMHooks.count.HP_login_config_read_post ) {
- int (*postHookFunc) (int retVal___, const char *cfgName);
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool included);
for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_login_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, cfgName);
+ retVal___ = postHookFunc(retVal___, filename, included);
}
}
return retVal___;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 06c4acc50..0845d8cdd 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -198,6 +198,8 @@ struct {
struct HPMHookPoint *HP_battle_config_read_post;
struct HPMHookPoint *HP_battle_config_set_defaults_pre;
struct HPMHookPoint *HP_battle_config_set_defaults_post;
+ struct HPMHookPoint *HP_battle_config_set_value_sub_pre;
+ struct HPMHookPoint *HP_battle_config_set_value_sub_post;
struct HPMHookPoint *HP_battle_config_set_value_pre;
struct HPMHookPoint *HP_battle_config_set_value_post;
struct HPMHookPoint *HP_battle_config_get_value_pre;
@@ -3234,12 +3236,14 @@ struct {
struct HPMHookPoint *HP_map_readallmaps_post;
struct HPMHookPoint *HP_map_config_read_pre;
struct HPMHookPoint *HP_map_config_read_post;
- struct HPMHookPoint *HP_map_config_read_sub_pre;
- struct HPMHookPoint *HP_map_config_read_sub_post;
- struct HPMHookPoint *HP_map_reloadnpc_sub_pre;
- struct HPMHookPoint *HP_map_reloadnpc_sub_post;
+ struct HPMHookPoint *HP_map_read_npclist_pre;
+ struct HPMHookPoint *HP_map_read_npclist_post;
struct HPMHookPoint *HP_map_inter_config_read_pre;
struct HPMHookPoint *HP_map_inter_config_read_post;
+ struct HPMHookPoint *HP_map_inter_config_read_database_names_pre;
+ struct HPMHookPoint *HP_map_inter_config_read_database_names_post;
+ struct HPMHookPoint *HP_map_inter_config_read_connection_pre;
+ struct HPMHookPoint *HP_map_inter_config_read_connection_post;
struct HPMHookPoint *HP_map_sql_init_pre;
struct HPMHookPoint *HP_map_sql_init_post;
struct HPMHookPoint *HP_map_sql_close_pre;
@@ -6249,6 +6253,8 @@ struct {
int HP_battle_config_read_post;
int HP_battle_config_set_defaults_pre;
int HP_battle_config_set_defaults_post;
+ int HP_battle_config_set_value_sub_pre;
+ int HP_battle_config_set_value_sub_post;
int HP_battle_config_set_value_pre;
int HP_battle_config_set_value_post;
int HP_battle_config_get_value_pre;
@@ -9285,12 +9291,14 @@ struct {
int HP_map_readallmaps_post;
int HP_map_config_read_pre;
int HP_map_config_read_post;
- int HP_map_config_read_sub_pre;
- int HP_map_config_read_sub_post;
- int HP_map_reloadnpc_sub_pre;
- int HP_map_reloadnpc_sub_post;
+ int HP_map_read_npclist_pre;
+ int HP_map_read_npclist_post;
int HP_map_inter_config_read_pre;
int HP_map_inter_config_read_post;
+ int HP_map_inter_config_read_database_names_pre;
+ int HP_map_inter_config_read_database_names_post;
+ int HP_map_inter_config_read_connection_pre;
+ int HP_map_inter_config_read_connection_post;
int HP_map_sql_init_pre;
int HP_map_sql_init_post;
int HP_map_sql_close_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 2cef7f135..30ede196a 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -115,6 +115,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(battle->calc_drain, HP_battle_calc_drain) },
{ HP_POP(battle->config_read, HP_battle_config_read) },
{ HP_POP(battle->config_set_defaults, HP_battle_config_set_defaults) },
+ { HP_POP(battle->config_set_value_sub, HP_battle_config_set_value_sub) },
{ HP_POP(battle->config_set_value, HP_battle_config_set_value) },
{ HP_POP(battle->config_get_value, HP_battle_config_get_value) },
{ HP_POP(battle->config_adjust, HP_battle_config_adjust) },
@@ -1659,9 +1660,10 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(map->readgat, HP_map_readgat) },
{ HP_POP(map->readallmaps, HP_map_readallmaps) },
{ HP_POP(map->config_read, HP_map_config_read) },
- { HP_POP(map->config_read_sub, HP_map_config_read_sub) },
- { HP_POP(map->reloadnpc_sub, HP_map_reloadnpc_sub) },
+ { HP_POP(map->read_npclist, HP_map_read_npclist) },
{ HP_POP(map->inter_config_read, HP_map_inter_config_read) },
+ { HP_POP(map->inter_config_read_database_names, HP_map_inter_config_read_database_names) },
+ { HP_POP(map->inter_config_read_connection, HP_map_inter_config_read_connection) },
{ HP_POP(map->sql_init, HP_map_sql_init) },
{ HP_POP(map->sql_close, HP_map_sql_close) },
{ HP_POP(map->zone_mf_cache, HP_map_zone_mf_cache) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 9ef56800f..819c3b28c 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -2335,15 +2335,15 @@ int HP_battle_calc_drain(int64 damage, int rate, int per) {
}
return retVal___;
}
-int HP_battle_config_read(const char *cfgName) {
+bool HP_battle_config_read(const char *filename, bool imported) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_battle_config_read_pre ) {
- int (*preHookFunc) (const char **cfgName);
+ bool (*preHookFunc) (const char **filename, bool *imported);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
+ retVal___ = preHookFunc(&filename, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -2351,13 +2351,13 @@ int HP_battle_config_read(const char *cfgName) {
}
}
{
- retVal___ = HPMHooks.source.battle.config_read(cfgName);
+ retVal___ = HPMHooks.source.battle.config_read(filename, imported);
}
if( HPMHooks.count.HP_battle_config_read_post ) {
- int (*postHookFunc) (int retVal___, const char *cfgName);
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_battle_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, cfgName);
+ retVal___ = postHookFunc(retVal___, filename, imported);
}
}
return retVal___;
@@ -2388,15 +2388,42 @@ void HP_battle_config_set_defaults(void) {
}
return;
}
-int HP_battle_config_set_value(const char *w1, const char *w2) {
+bool HP_battle_config_set_value_sub(int index, int value) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_battle_config_set_value_sub_pre ) {
+ bool (*preHookFunc) (int *index, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_config_set_value_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&index, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.config_set_value_sub(index, value);
+ }
+ if( HPMHooks.count.HP_battle_config_set_value_sub_post ) {
+ bool (*postHookFunc) (bool retVal___, int index, int value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_config_set_value_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, index, value);
+ }
+ }
+ return retVal___;
+}
+bool HP_battle_config_set_value(const char *param, const char *value) {
+ int hIndex = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_battle_config_set_value_pre ) {
- int (*preHookFunc) (const char **w1, const char **w2);
+ bool (*preHookFunc) (const char **param, const char **value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_config_set_value_pre[hIndex].func;
- retVal___ = preHookFunc(&w1, &w2);
+ retVal___ = preHookFunc(&param, &value);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -2404,13 +2431,13 @@ int HP_battle_config_set_value(const char *w1, const char *w2) {
}
}
{
- retVal___ = HPMHooks.source.battle.config_set_value(w1, w2);
+ retVal___ = HPMHooks.source.battle.config_set_value(param, value);
}
if( HPMHooks.count.HP_battle_config_set_value_post ) {
- int (*postHookFunc) (int retVal___, const char *w1, const char *w2);
+ bool (*postHookFunc) (bool retVal___, const char *param, const char *value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_battle_config_set_value_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2);
+ retVal___ = postHookFunc(retVal___, param, value);
}
}
return retVal___;
@@ -38818,15 +38845,15 @@ void HP_logs_mvpdrop_sub(struct map_session_data *sd, int monster_id, int *log_m
}
return;
}
-int HP_logs_config_read(const char *cfgName) {
+bool HP_logs_config_read(const char *filename, bool imported) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_logs_config_read_pre ) {
- int (*preHookFunc) (const char **cfgName);
+ bool (*preHookFunc) (const char **filename, bool *imported);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_logs_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
+ retVal___ = preHookFunc(&filename, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -38834,13 +38861,13 @@ int HP_logs_config_read(const char *cfgName) {
}
}
{
- retVal___ = HPMHooks.source.logs.config_read(cfgName);
+ retVal___ = HPMHooks.source.logs.config_read(filename, imported);
}
if( HPMHooks.count.HP_logs_config_read_post ) {
- int (*postHookFunc) (int retVal___, const char *cfgName);
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_logs_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, cfgName);
+ retVal___ = postHookFunc(retVal___, filename, imported);
}
}
return retVal___;
@@ -41774,11 +41801,11 @@ int HP_map_cleanup_sub(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-int HP_map_delmap(char *mapname) {
+int HP_map_delmap(const char *mapname) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_map_delmap_pre ) {
- int (*preHookFunc) (char **mapname);
+ int (*preHookFunc) (const char **mapname);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_delmap_pre[hIndex].func;
@@ -41793,7 +41820,7 @@ int HP_map_delmap(char *mapname) {
retVal___ = HPMHooks.source.map.delmap(mapname);
}
if( HPMHooks.count.HP_map_delmap_post ) {
- int (*postHookFunc) (int retVal___, char *mapname);
+ int (*postHookFunc) (int retVal___, const char *mapname);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_map_delmap_post[hIndex].func;
retVal___ = postHookFunc(retVal___, mapname);
@@ -42734,15 +42761,15 @@ int HP_map_readallmaps(void) {
}
return retVal___;
}
-int HP_map_config_read(char *cfgName) {
+bool HP_map_config_read(const char *filename, bool imported) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_map_config_read_pre ) {
- int (*preHookFunc) (char **cfgName);
+ bool (*preHookFunc) (const char **filename, bool *imported);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
+ retVal___ = preHookFunc(&filename, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42750,26 +42777,26 @@ int HP_map_config_read(char *cfgName) {
}
}
{
- retVal___ = HPMHooks.source.map.config_read(cfgName);
+ retVal___ = HPMHooks.source.map.config_read(filename, imported);
}
if( HPMHooks.count.HP_map_config_read_post ) {
- int (*postHookFunc) (int retVal___, char *cfgName);
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_map_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, cfgName);
+ retVal___ = postHookFunc(retVal___, filename, imported);
}
}
return retVal___;
}
-int HP_map_config_read_sub(char *cfgName) {
+bool HP_map_read_npclist(const char *filename, bool imported) {
int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_map_config_read_sub_pre ) {
- int (*preHookFunc) (char **cfgName);
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_map_read_npclist_pre ) {
+ bool (*preHookFunc) (const char **filename, bool *imported);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_sub_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_map_config_read_sub_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_npclist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_read_npclist_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42777,52 +42804,53 @@ int HP_map_config_read_sub(char *cfgName) {
}
}
{
- retVal___ = HPMHooks.source.map.config_read_sub(cfgName);
+ retVal___ = HPMHooks.source.map.read_npclist(filename, imported);
}
- if( HPMHooks.count.HP_map_config_read_sub_post ) {
- int (*postHookFunc) (int retVal___, char *cfgName);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_sub_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_map_config_read_sub_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, cfgName);
+ if( HPMHooks.count.HP_map_read_npclist_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_npclist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_read_npclist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, imported);
}
}
return retVal___;
}
-void HP_map_reloadnpc_sub(char *cfgName) {
+bool HP_map_inter_config_read(const char *filename, bool imported) {
int hIndex = 0;
- if( HPMHooks.count.HP_map_reloadnpc_sub_pre ) {
- void (*preHookFunc) (char **cfgName);
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_map_inter_config_read_pre ) {
+ bool (*preHookFunc) (const char **filename, bool *imported);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_pre[hIndex].func;
- preHookFunc(&cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_inter_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return;
+ return retVal___;
}
}
{
- HPMHooks.source.map.reloadnpc_sub(cfgName);
+ retVal___ = HPMHooks.source.map.inter_config_read(filename, imported);
}
- if( HPMHooks.count.HP_map_reloadnpc_sub_post ) {
- void (*postHookFunc) (char *cfgName);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_post[hIndex].func;
- postHookFunc(cfgName);
+ if( HPMHooks.count.HP_map_inter_config_read_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_inter_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, imported);
}
}
- return;
+ return retVal___;
}
-int HP_map_inter_config_read(char *cfgName) {
+bool HP_map_inter_config_read_database_names(const char *filename, const struct config_t *config, bool imported) {
int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_map_inter_config_read_pre ) {
- int (*preHookFunc) (char **cfgName);
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_map_inter_config_read_database_names_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_map_inter_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_database_names_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_inter_config_read_database_names_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42830,13 +42858,40 @@ int HP_map_inter_config_read(char *cfgName) {
}
}
{
- retVal___ = HPMHooks.source.map.inter_config_read(cfgName);
+ retVal___ = HPMHooks.source.map.inter_config_read_database_names(filename, config, imported);
}
- if( HPMHooks.count.HP_map_inter_config_read_post ) {
- int (*postHookFunc) (int retVal___, char *cfgName);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_map_inter_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, cfgName);
+ if( HPMHooks.count.HP_map_inter_config_read_database_names_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_database_names_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_inter_config_read_database_names_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_map_inter_config_read_connection(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_map_inter_config_read_connection_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_connection_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_inter_config_read_connection_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.inter_config_read_connection(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_map_inter_config_read_connection_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_connection_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_inter_config_read_connection_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
}
}
return retVal___;
@@ -44050,15 +44105,15 @@ void HP_mapreg_reload(void) {
}
return;
}
-bool HP_mapreg_config_read(const char *w1, const char *w2) {
+bool HP_mapreg_config_read(const char *filename, const struct config_setting_t *config, bool imported) {
int hIndex = 0;
bool retVal___ = false;
if( HPMHooks.count.HP_mapreg_config_read_pre ) {
- bool (*preHookFunc) (const char **w1, const char **w2);
+ bool (*preHookFunc) (const char **filename, const struct config_setting_t **config, bool *imported);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&w1, &w2);
+ retVal___ = preHookFunc(&filename, &config, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -44066,13 +44121,13 @@ bool HP_mapreg_config_read(const char *w1, const char *w2) {
}
}
{
- retVal___ = HPMHooks.source.mapreg.config_read(w1, w2);
+ retVal___ = HPMHooks.source.mapreg.config_read(filename, config, imported);
}
if( HPMHooks.count.HP_mapreg_config_read_post ) {
- bool (*postHookFunc) (bool retVal___, const char *w1, const char *w2);
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_setting_t *config, bool imported);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapreg_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2);
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
}
}
return retVal___;
@@ -62196,15 +62251,15 @@ void HP_script_setarray_pc(struct map_session_data *sd, const char *varname, uin
}
return;
}
-int HP_script_config_read(char *cfgName) {
+bool HP_script_config_read(const char *filename, bool imported) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_script_config_read_pre ) {
- int (*preHookFunc) (char **cfgName);
+ bool (*preHookFunc) (const char **filename, bool *imported);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
+ retVal___ = preHookFunc(&filename, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -62212,13 +62267,13 @@ int HP_script_config_read(char *cfgName) {
}
}
{
- retVal___ = HPMHooks.source.script.config_read(cfgName);
+ retVal___ = HPMHooks.source.script.config_read(filename, imported);
}
if( HPMHooks.count.HP_script_config_read_post ) {
- int (*postHookFunc) (int retVal___, char *cfgName);
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_script_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, cfgName);
+ retVal___ = postHookFunc(retVal___, filename, imported);
}
}
return retVal___;