summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc34
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc52
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc13
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc359
4 files changed, 416 insertions, 42 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 2023730f7..52db3c182 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -660,10 +660,32 @@ typedef int (*HPMHOOK_pre_chr_online_data_cleanup) (int *tid, int64 *tick, int *
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_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);
@@ -5682,8 +5704,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);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index f51ddcffc..a2a7ce1a7 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -344,10 +344,32 @@ 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_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;
@@ -1817,10 +1839,32 @@ 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_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;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 4371cf81a..3c5c4fd66 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -187,8 +187,19 @@ 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->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) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index aecffbecd..1676f1a2b 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -4242,14 +4242,176 @@ void HP_chr_sql_config_read(const char *cfgName) {
}
return;
}
-void HP_chr_config_dispatch(char *w1, char *w2) {
+bool HP_chr_config_read(const char *filename, 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_config_read_pre ) {
+ 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(&filename, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.config_read(filename, imported);
+ }
+ if( HPMHooks.count.HP_chr_config_read_post ) {
+ 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___, 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_dispatch_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_chr_config_dispatch_pre[hIndex].func;
- preHookFunc(&w1, &w2);
+ 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;
@@ -4257,26 +4419,26 @@ void HP_chr_config_dispatch(char *w1, char *w2) {
}
}
{
- HPMHooks.source.chr.config_dispatch(w1, w2);
+ HPMHooks.source.chr.config_set_start_item(setting);
}
- 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_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;
}
-int HP_chr_config_read(const char *cfgName) {
+bool HP_chr_config_read_player_new(const char *filename, const struct config_t *config, bool imported) {
int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_chr_config_read_pre ) {
- int (*preHookFunc) (const char **cfgName);
+ 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_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_chr_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
+ 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;
@@ -4284,13 +4446,148 @@ int HP_chr_config_read(const char *cfgName) {
}
}
{
- retVal___ = HPMHooks.source.chr.config_read(cfgName);
+ retVal___ = HPMHooks.source.chr.config_read_player_new(filename, config, imported);
}
- if( HPMHooks.count.HP_chr_config_read_post ) {
- int (*postHookFunc) (int retVal___, const char *cfgName);
- 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);
+ 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___;
@@ -15726,15 +16023,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 +16039,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___;