diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index a6ded26121..3245e6f6c4 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -545,6 +545,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "item_package_must_entry", sizeof(struct item_package_must_entry), SERVER_TYPE_MAP }, { "item_package_rand_entry", sizeof(struct item_package_rand_entry), SERVER_TYPE_MAP }, { "item_package_rand_group", sizeof(struct item_package_rand_group), SERVER_TYPE_MAP }, + { "item_reform", sizeof(struct item_reform), SERVER_TYPE_MAP }, { "itemdb_interface", sizeof(struct itemdb_interface), SERVER_TYPE_MAP }, { "itemdb_option", sizeof(struct itemdb_option), SERVER_TYPE_MAP }, { "itemlist", sizeof(struct itemlist), SERVER_TYPE_MAP }, diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 736502c68f..fa52db03c1 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -2882,6 +2882,14 @@ typedef unsigned short (*HPMHOOK_pre_clif_parse_cmd_decrypt) (int *fd, struct ma typedef unsigned short (*HPMHOOK_post_clif_parse_cmd_decrypt) (unsigned short retVal___, int fd, struct map_session_data *sd); typedef unsigned short (*HPMHOOK_pre_clif_parse_cmd_optional) (int *fd, struct map_session_data **sd); typedef unsigned short (*HPMHOOK_post_clif_parse_cmd_optional) (unsigned short retVal___, int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_item_reform_open) (struct map_session_data **sd, int *itemId); +typedef void (*HPMHOOK_post_clif_item_reform_open) (struct map_session_data *sd, int itemId); +typedef void (*HPMHOOK_pre_clif_pItemReformClose) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pItemReformClose) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pItemReformAck) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pItemReformAck) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_item_reform_result) (struct map_session_data **sd, int *index, enum item_reform_status *result); +typedef void (*HPMHOOK_post_clif_item_reform_result) (struct map_session_data *sd, int index, enum item_reform_status result); #endif // MAP_CLIF_H #ifdef COMMON_CORE_H /* cmdline */ typedef void (*HPMHOOK_pre_cmdline_init) (void); @@ -4198,6 +4206,8 @@ typedef struct item_data* (*HPMHOOK_pre_itemdb_exists) (int *nameid); typedef struct item_data* (*HPMHOOK_post_itemdb_exists) (struct item_data* retVal___, int nameid); typedef struct itemdb_option* (*HPMHOOK_pre_itemdb_option_exists) (int *idx); typedef struct itemdb_option* (*HPMHOOK_post_itemdb_option_exists) (struct itemdb_option* retVal___, int idx); +typedef struct item_reform* (*HPMHOOK_pre_itemdb_reform_exists) (int *idx); +typedef struct item_reform* (*HPMHOOK_post_itemdb_reform_exists) (struct item_reform* retVal___, int idx); typedef bool (*HPMHOOK_pre_itemdb_in_group) (struct item_group **group, int *nameid); typedef bool (*HPMHOOK_post_itemdb_in_group) (bool retVal___, struct item_group *group, int nameid); typedef int (*HPMHOOK_pre_itemdb_group_item) (struct item_group **group); @@ -4282,6 +4292,8 @@ typedef int (*HPMHOOK_pre_itemdb_final_sub) (union DBKey *key, struct DBData **d typedef int (*HPMHOOK_post_itemdb_final_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef int (*HPMHOOK_pre_itemdb_options_final_sub) (union DBKey *key, struct DBData **data, va_list ap); typedef int (*HPMHOOK_post_itemdb_options_final_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_itemdb_reform_final_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_itemdb_reform_final_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef void (*HPMHOOK_pre_itemdb_clear) (bool *total); typedef void (*HPMHOOK_post_itemdb_clear) (bool total); typedef struct item_combo* (*HPMHOOK_pre_itemdb_id2combo) (int *id); @@ -4306,6 +4318,24 @@ typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_lapineupgrade_sub) (struct conf typedef bool (*HPMHOOK_post_itemdb_read_libconfig_lapineupgrade_sub) (bool retVal___, struct config_setting_t *it, const char *source); typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_lapineupgrade_sub_targets) (struct config_setting_t **sources, struct item_data **data); typedef bool (*HPMHOOK_post_itemdb_read_libconfig_lapineupgrade_sub_targets) (bool retVal___, struct config_setting_t *sources, struct item_data *data); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_item_reform_info) (void); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_item_reform_info) (bool retVal___); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_item_reform_info_sub) (struct config_setting_t **it, const char **source); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_item_reform_info_sub) (bool retVal___, struct config_setting_t *it, const char *source); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_item_reform_info_materials) (struct config_setting_t **it, struct item_reform **ir); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_item_reform_info_materials) (bool retVal___, struct config_setting_t *it, struct item_reform *ir); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_item_reform_info_reqinfo) (struct config_setting_t **it, struct item_reform **ir); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_item_reform_info_reqinfo) (bool retVal___, struct config_setting_t *it, struct item_reform *ir); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_item_reform_info_behinfo) (struct config_setting_t **it, struct item_reform **ir); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_item_reform_info_behinfo) (bool retVal___, struct config_setting_t *it, struct item_reform *ir); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_item_reform_list) (void); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_item_reform_list) (bool retVal___); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_item_reform_list_sub) (struct config_setting_t **it, const char **source); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_item_reform_list_sub) (bool retVal___, struct config_setting_t *it, const char *source); +typedef void (*HPMHOOK_pre_itemdb_item_reform) (struct map_session_data **sd, const struct item_reform **ir, int *idx); +typedef void (*HPMHOOK_post_itemdb_item_reform) (struct map_session_data *sd, const struct item_reform *ir, int idx); +typedef const struct item_reform* (*HPMHOOK_pre_itemdb_search_reform_baseitem) (const struct item_data **itd, int *nameid); +typedef const struct item_reform* (*HPMHOOK_post_itemdb_search_reform_baseitem) (const struct item_reform* retVal___, const struct item_data *itd, int nameid); #endif // MAP_ITEMDB_H #ifdef LOGIN_LOGIN_H /* lchrif */ typedef void (*HPMHOOK_pre_lchrif_server_init) (int *id); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index aeafb634e4..15b799aff6 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -2470,6 +2470,14 @@ struct { struct HPMHookPoint *HP_clif_parse_cmd_decrypt_post; struct HPMHookPoint *HP_clif_parse_cmd_optional_pre; struct HPMHookPoint *HP_clif_parse_cmd_optional_post; + struct HPMHookPoint *HP_clif_item_reform_open_pre; + struct HPMHookPoint *HP_clif_item_reform_open_post; + struct HPMHookPoint *HP_clif_pItemReformClose_pre; + struct HPMHookPoint *HP_clif_pItemReformClose_post; + struct HPMHookPoint *HP_clif_pItemReformAck_pre; + struct HPMHookPoint *HP_clif_pItemReformAck_post; + struct HPMHookPoint *HP_clif_item_reform_result_pre; + struct HPMHookPoint *HP_clif_item_reform_result_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -3366,6 +3374,8 @@ struct { struct HPMHookPoint *HP_itemdb_exists_post; struct HPMHookPoint *HP_itemdb_option_exists_pre; struct HPMHookPoint *HP_itemdb_option_exists_post; + struct HPMHookPoint *HP_itemdb_reform_exists_pre; + struct HPMHookPoint *HP_itemdb_reform_exists_post; struct HPMHookPoint *HP_itemdb_in_group_pre; struct HPMHookPoint *HP_itemdb_in_group_post; struct HPMHookPoint *HP_itemdb_group_item_pre; @@ -3450,6 +3460,8 @@ struct { struct HPMHookPoint *HP_itemdb_final_sub_post; struct HPMHookPoint *HP_itemdb_options_final_sub_pre; struct HPMHookPoint *HP_itemdb_options_final_sub_post; + struct HPMHookPoint *HP_itemdb_reform_final_sub_pre; + struct HPMHookPoint *HP_itemdb_reform_final_sub_post; struct HPMHookPoint *HP_itemdb_clear_pre; struct HPMHookPoint *HP_itemdb_clear_post; struct HPMHookPoint *HP_itemdb_id2combo_pre; @@ -3474,6 +3486,24 @@ struct { struct HPMHookPoint *HP_itemdb_read_libconfig_lapineupgrade_sub_post; struct HPMHookPoint *HP_itemdb_read_libconfig_lapineupgrade_sub_targets_pre; struct HPMHookPoint *HP_itemdb_read_libconfig_lapineupgrade_sub_targets_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_info_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_info_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_info_sub_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_info_sub_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_info_materials_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_info_materials_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_info_reqinfo_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_info_reqinfo_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_info_behinfo_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_info_behinfo_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_list_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_list_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_list_sub_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_item_reform_list_sub_post; + struct HPMHookPoint *HP_itemdb_item_reform_pre; + struct HPMHookPoint *HP_itemdb_item_reform_post; + struct HPMHookPoint *HP_itemdb_search_reform_baseitem_pre; + struct HPMHookPoint *HP_itemdb_search_reform_baseitem_post; struct HPMHookPoint *HP_libconfig_set_db_path_pre; struct HPMHookPoint *HP_libconfig_set_db_path_post; struct HPMHookPoint *HP_libconfig_format_db_path_pre; @@ -9805,6 +9835,14 @@ struct { int HP_clif_parse_cmd_decrypt_post; int HP_clif_parse_cmd_optional_pre; int HP_clif_parse_cmd_optional_post; + int HP_clif_item_reform_open_pre; + int HP_clif_item_reform_open_post; + int HP_clif_pItemReformClose_pre; + int HP_clif_pItemReformClose_post; + int HP_clif_pItemReformAck_pre; + int HP_clif_pItemReformAck_post; + int HP_clif_item_reform_result_pre; + int HP_clif_item_reform_result_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; @@ -10701,6 +10739,8 @@ struct { int HP_itemdb_exists_post; int HP_itemdb_option_exists_pre; int HP_itemdb_option_exists_post; + int HP_itemdb_reform_exists_pre; + int HP_itemdb_reform_exists_post; int HP_itemdb_in_group_pre; int HP_itemdb_in_group_post; int HP_itemdb_group_item_pre; @@ -10785,6 +10825,8 @@ struct { int HP_itemdb_final_sub_post; int HP_itemdb_options_final_sub_pre; int HP_itemdb_options_final_sub_post; + int HP_itemdb_reform_final_sub_pre; + int HP_itemdb_reform_final_sub_post; int HP_itemdb_clear_pre; int HP_itemdb_clear_post; int HP_itemdb_id2combo_pre; @@ -10809,6 +10851,24 @@ struct { int HP_itemdb_read_libconfig_lapineupgrade_sub_post; int HP_itemdb_read_libconfig_lapineupgrade_sub_targets_pre; int HP_itemdb_read_libconfig_lapineupgrade_sub_targets_post; + int HP_itemdb_read_libconfig_item_reform_info_pre; + int HP_itemdb_read_libconfig_item_reform_info_post; + int HP_itemdb_read_libconfig_item_reform_info_sub_pre; + int HP_itemdb_read_libconfig_item_reform_info_sub_post; + int HP_itemdb_read_libconfig_item_reform_info_materials_pre; + int HP_itemdb_read_libconfig_item_reform_info_materials_post; + int HP_itemdb_read_libconfig_item_reform_info_reqinfo_pre; + int HP_itemdb_read_libconfig_item_reform_info_reqinfo_post; + int HP_itemdb_read_libconfig_item_reform_info_behinfo_pre; + int HP_itemdb_read_libconfig_item_reform_info_behinfo_post; + int HP_itemdb_read_libconfig_item_reform_list_pre; + int HP_itemdb_read_libconfig_item_reform_list_post; + int HP_itemdb_read_libconfig_item_reform_list_sub_pre; + int HP_itemdb_read_libconfig_item_reform_list_sub_post; + int HP_itemdb_item_reform_pre; + int HP_itemdb_item_reform_post; + int HP_itemdb_search_reform_baseitem_pre; + int HP_itemdb_search_reform_baseitem_post; int HP_libconfig_set_db_path_pre; int HP_libconfig_set_db_path_post; int HP_libconfig_format_db_path_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 06f56bef30..35b8b656dd 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -1259,6 +1259,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->parse_cmd_normal, HP_clif_parse_cmd_normal) }, { HP_POP(clif->parse_cmd_decrypt, HP_clif_parse_cmd_decrypt) }, { HP_POP(clif->parse_cmd_optional, HP_clif_parse_cmd_optional) }, + { HP_POP(clif->item_reform_open, HP_clif_item_reform_open) }, + { HP_POP(clif->pItemReformClose, HP_clif_pItemReformClose) }, + { HP_POP(clif->pItemReformAck, HP_clif_pItemReformAck) }, + { HP_POP(clif->item_reform_result, HP_clif_item_reform_result) }, /* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, @@ -1723,6 +1727,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->search, HP_itemdb_search) }, { HP_POP(itemdb->exists, HP_itemdb_exists) }, { HP_POP(itemdb->option_exists, HP_itemdb_option_exists) }, + { HP_POP(itemdb->reform_exists, HP_itemdb_reform_exists) }, { HP_POP(itemdb->in_group, HP_itemdb_in_group) }, { HP_POP(itemdb->group_item, HP_itemdb_group_item) }, { HP_POP(itemdb->chain_item, HP_itemdb_chain_item) }, @@ -1765,6 +1770,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->destroy_item_data, HP_itemdb_destroy_item_data) }, { HP_POP(itemdb->final_sub, HP_itemdb_final_sub) }, { HP_POP(itemdb->options_final_sub, HP_itemdb_options_final_sub) }, + { HP_POP(itemdb->reform_final_sub, HP_itemdb_reform_final_sub) }, { HP_POP(itemdb->clear, HP_itemdb_clear) }, { HP_POP(itemdb->id2combo, HP_itemdb_id2combo) }, { HP_POP(itemdb->is_item_usable, HP_itemdb_is_item_usable) }, @@ -1777,6 +1783,15 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->read_libconfig_lapineupgrade, HP_itemdb_read_libconfig_lapineupgrade) }, { HP_POP(itemdb->read_libconfig_lapineupgrade_sub, HP_itemdb_read_libconfig_lapineupgrade_sub) }, { HP_POP(itemdb->read_libconfig_lapineupgrade_sub_targets, HP_itemdb_read_libconfig_lapineupgrade_sub_targets) }, + { HP_POP(itemdb->read_libconfig_item_reform_info, HP_itemdb_read_libconfig_item_reform_info) }, + { HP_POP(itemdb->read_libconfig_item_reform_info_sub, HP_itemdb_read_libconfig_item_reform_info_sub) }, + { HP_POP(itemdb->read_libconfig_item_reform_info_materials, HP_itemdb_read_libconfig_item_reform_info_materials) }, + { HP_POP(itemdb->read_libconfig_item_reform_info_reqinfo, HP_itemdb_read_libconfig_item_reform_info_reqinfo) }, + { HP_POP(itemdb->read_libconfig_item_reform_info_behinfo, HP_itemdb_read_libconfig_item_reform_info_behinfo) }, + { HP_POP(itemdb->read_libconfig_item_reform_list, HP_itemdb_read_libconfig_item_reform_list) }, + { HP_POP(itemdb->read_libconfig_item_reform_list_sub, HP_itemdb_read_libconfig_item_reform_list_sub) }, + { HP_POP(itemdb->item_reform, HP_itemdb_item_reform) }, + { HP_POP(itemdb->search_reform_baseitem, HP_itemdb_search_reform_baseitem) }, /* libconfig_interface */ { HP_POP(libconfig->set_db_path, HP_libconfig_set_db_path) }, { HP_POP(libconfig->format_db_path, HP_libconfig_format_db_path) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 3c4ad99aad..bb16626a19 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -32206,6 +32206,110 @@ unsigned short HP_clif_parse_cmd_optional(int fd, struct map_session_data *sd) { } return retVal___; } +void HP_clif_item_reform_open(struct map_session_data *sd, int itemId) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_item_reform_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *itemId); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_reform_open_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_item_reform_open_pre[hIndex].func; + preHookFunc(&sd, &itemId); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_reform_open(sd, itemId); + } + if (HPMHooks.count.HP_clif_item_reform_open_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int itemId); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_reform_open_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_item_reform_open_post[hIndex].func; + postHookFunc(sd, itemId); + } + } + return; +} +void HP_clif_pItemReformClose(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pItemReformClose_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemReformClose_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pItemReformClose_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pItemReformClose(fd, sd); + } + if (HPMHooks.count.HP_clif_pItemReformClose_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemReformClose_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pItemReformClose_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pItemReformAck(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pItemReformAck_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemReformAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pItemReformAck_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pItemReformAck(fd, sd); + } + if (HPMHooks.count.HP_clif_pItemReformAck_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemReformAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pItemReformAck_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_item_reform_result(struct map_session_data *sd, int index, enum item_reform_status result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_item_reform_result_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *index, enum item_reform_status *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_reform_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_item_reform_result_pre[hIndex].func; + preHookFunc(&sd, &index, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_reform_result(sd, index, result); + } + if (HPMHooks.count.HP_clif_item_reform_result_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int index, enum item_reform_status result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_reform_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_item_reform_result_post[hIndex].func; + postHookFunc(sd, index, result); + } + } + return; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; @@ -44241,6 +44345,33 @@ struct itemdb_option* HP_itemdb_option_exists(int idx) { } return retVal___; } +struct item_reform* HP_itemdb_reform_exists(int idx) { + int hIndex = 0; + struct item_reform* retVal___ = NULL; + if (HPMHooks.count.HP_itemdb_reform_exists_pre > 0) { + struct item_reform* (*preHookFunc) (int *idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reform_exists_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_reform_exists_pre[hIndex].func; + retVal___ = preHookFunc(&idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.reform_exists(idx); + } + if (HPMHooks.count.HP_itemdb_reform_exists_post > 0) { + struct item_reform* (*postHookFunc) (struct item_reform* retVal___, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reform_exists_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_reform_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, idx); + } + } + return retVal___; +} bool HP_itemdb_in_group(struct item_group *group, int nameid) { int hIndex = 0; bool retVal___ = false; @@ -45390,6 +45521,39 @@ int HP_itemdb_options_final_sub(union DBKey key, struct DBData *data, va_list ap } return retVal___; } +int HP_itemdb_reform_final_sub(union DBKey key, struct DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_itemdb_reform_final_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reform_final_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_itemdb_reform_final_sub_pre[hIndex].func; + retVal___ = preHookFunc(&key, &data, ap___copy); + va_end(ap___copy); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list ap___copy; va_copy(ap___copy, ap); + retVal___ = HPMHooks.source.itemdb.reform_final_sub(key, data, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_itemdb_reform_final_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reform_final_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_itemdb_reform_final_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} void HP_itemdb_clear(bool total) { int hIndex = 0; if (HPMHooks.count.HP_itemdb_clear_pre > 0) { @@ -45719,6 +45883,248 @@ bool HP_itemdb_read_libconfig_lapineupgrade_sub_targets(struct config_setting_t } return retVal___; } +bool HP_itemdb_read_libconfig_item_reform_info(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_info_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_item_reform_info(); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_itemdb_read_libconfig_item_reform_info_sub(struct config_setting_t *it, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_info_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_item_reform_info_sub(it, source); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_info_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, source); + } + } + return retVal___; +} +bool HP_itemdb_read_libconfig_item_reform_info_materials(struct config_setting_t *it, struct item_reform *ir) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_materials_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, struct item_reform **ir); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_materials_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_info_materials_pre[hIndex].func; + retVal___ = preHookFunc(&it, &ir); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_item_reform_info_materials(it, ir); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_materials_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, struct item_reform *ir); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_materials_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_info_materials_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, ir); + } + } + return retVal___; +} +bool HP_itemdb_read_libconfig_item_reform_info_reqinfo(struct config_setting_t *it, struct item_reform *ir) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_reqinfo_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, struct item_reform **ir); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_reqinfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_info_reqinfo_pre[hIndex].func; + retVal___ = preHookFunc(&it, &ir); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_item_reform_info_reqinfo(it, ir); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_reqinfo_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, struct item_reform *ir); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_reqinfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_info_reqinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, ir); + } + } + return retVal___; +} +bool HP_itemdb_read_libconfig_item_reform_info_behinfo(struct config_setting_t *it, struct item_reform *ir) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_behinfo_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, struct item_reform **ir); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_behinfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_info_behinfo_pre[hIndex].func; + retVal___ = preHookFunc(&it, &ir); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_item_reform_info_behinfo(it, ir); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_behinfo_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, struct item_reform *ir); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_info_behinfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_info_behinfo_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, ir); + } + } + return retVal___; +} +bool HP_itemdb_read_libconfig_item_reform_list(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_list_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_list_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_list_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_item_reform_list(); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_list_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_list_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_itemdb_read_libconfig_item_reform_list_sub(struct config_setting_t *it, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_list_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_list_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_list_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_item_reform_list_sub(it, source); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_item_reform_list_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_item_reform_list_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_item_reform_list_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, source); + } + } + return retVal___; +} +void HP_itemdb_item_reform(struct map_session_data *sd, const struct item_reform *ir, int idx) { + int hIndex = 0; + if (HPMHooks.count.HP_itemdb_item_reform_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const struct item_reform **ir, int *idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_item_reform_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_item_reform_pre[hIndex].func; + preHookFunc(&sd, &ir, &idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.item_reform(sd, ir, idx); + } + if (HPMHooks.count.HP_itemdb_item_reform_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const struct item_reform *ir, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_item_reform_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_item_reform_post[hIndex].func; + postHookFunc(sd, ir, idx); + } + } + return; +} +const struct item_reform* HP_itemdb_search_reform_baseitem(const struct item_data *itd, int nameid) { + int hIndex = 0; + const struct item_reform* retVal___ = NULL; + if (HPMHooks.count.HP_itemdb_search_reform_baseitem_pre > 0) { + const struct item_reform* (*preHookFunc) (const struct item_data **itd, int *nameid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_reform_baseitem_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_search_reform_baseitem_pre[hIndex].func; + retVal___ = preHookFunc(&itd, &nameid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.search_reform_baseitem(itd, nameid); + } + if (HPMHooks.count.HP_itemdb_search_reform_baseitem_post > 0) { + const struct item_reform* (*postHookFunc) (const struct item_reform* retVal___, const struct item_data *itd, int nameid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_reform_baseitem_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_search_reform_baseitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, itd, nameid); + } + } + return retVal___; +} /* libconfig_interface */ void HP_libconfig_set_db_path(const char *db_path) { int hIndex = 0;