summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking.c2
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc60
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc98
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc26
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc665
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.sources.inc2
6 files changed, 735 insertions, 118 deletions
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c
index f95a3a92d..8e7ed4823 100644
--- a/src/plugins/HPMHooking.c
+++ b/src/plugins/HPMHooking.c
@@ -106,6 +106,8 @@ PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers")
#include "map/pet.h"
#include "map/quest.h"
#include "map/rodex.h"
+#include "map/refine.h"
+#include "map/refine.p.h"
#include "map/script.h"
#include "map/skill.h"
#include "map/status.h"
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 715e19a48..f6fa6a5e8 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -2702,6 +2702,18 @@ typedef void (*HPMHOOK_pre_clif_loadConfirm) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_loadConfirm) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_send_selforarea) (int *fd, struct block_list **bl, const void **buf, int *len);
typedef void (*HPMHOOK_post_clif_send_selforarea) (int fd, struct block_list *bl, const void *buf, int len);
+typedef void (*HPMHOOK_pre_clif_OpenRefineryUI) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_OpenRefineryUI) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pAddItemRefineryUI) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pAddItemRefineryUI) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_AddItemRefineryUIAck) (struct map_session_data **sd, int *item_index, struct s_refine_requirement **req);
+typedef void (*HPMHOOK_post_clif_AddItemRefineryUIAck) (struct map_session_data *sd, int item_index, struct s_refine_requirement *req);
+typedef void (*HPMHOOK_pre_clif_pRefineryUIClose) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pRefineryUIClose) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pRefineryUIRefine) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pRefineryUIRefine) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_announce_refine_status) (struct map_session_data **sd, int *item_id, int *refine_level, bool *success, enum send_target *target);
+typedef void (*HPMHOOK_post_clif_announce_refine_status) (struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target);
#endif // MAP_CLIF_H
#ifdef COMMON_CORE_H /* cmdline */
typedef void (*HPMHOOK_pre_cmdline_init) (void);
@@ -4342,8 +4354,8 @@ typedef char (*HPMHOOK_pre_logs_picktype2char) (e_log_pick_type *type);
typedef char (*HPMHOOK_post_logs_picktype2char) (char retVal___, e_log_pick_type type);
typedef char (*HPMHOOK_pre_logs_chattype2char) (e_log_chat_type *type);
typedef char (*HPMHOOK_post_logs_chattype2char) (char retVal___, e_log_chat_type type);
-typedef bool (*HPMHOOK_pre_logs_should_log_item) (int *nameid, int *amount, int *refine, struct item_data **id);
-typedef bool (*HPMHOOK_post_logs_should_log_item) (bool retVal___, int nameid, int amount, int refine, struct item_data *id);
+typedef bool (*HPMHOOK_pre_logs_should_log_item) (int *nameid, int *amount, int *refine_level, struct item_data **id);
+typedef bool (*HPMHOOK_post_logs_should_log_item) (bool retVal___, int nameid, int amount, int refine_level, struct item_data *id);
#endif // MAP_LOG_H
#ifdef LOGIN_LOGIN_H /* login */
typedef int (*HPMHOOK_pre_login_mmo_auth) (struct login_session_data **sd, bool *isServer);
@@ -6617,6 +6629,40 @@ typedef bool (*HPMHOOK_post_quest_questinfo_validate_mercenary_class) (bool retV
typedef void (*HPMHOOK_pre_quest_questinfo_vector_clear) (int *m);
typedef void (*HPMHOOK_post_quest_questinfo_vector_clear) (int m);
#endif // MAP_QUEST_H
+#ifdef MAP_REFINE_H /* refine */
+typedef int (*HPMHOOK_pre_refine_init) (bool *minimal);
+typedef int (*HPMHOOK_post_refine_init) (int retVal___, bool minimal);
+typedef void (*HPMHOOK_pre_refine_final) (void);
+typedef void (*HPMHOOK_post_refine_final) (void);
+typedef int (*HPMHOOK_pre_refine_get_refine_chance) (enum refine_type *wlv, int *refine_level, enum refine_chance_type *type);
+typedef int (*HPMHOOK_post_refine_get_refine_chance) (int retVal___, enum refine_type wlv, int refine_level, enum refine_chance_type type);
+typedef int (*HPMHOOK_pre_refine_get_bonus) (enum refine_type *equipment_type, int *refine_level);
+typedef int (*HPMHOOK_post_refine_get_bonus) (int retVal___, enum refine_type equipment_type, int refine_level);
+typedef int (*HPMHOOK_pre_refine_get_randombonus_max) (enum refine_type *equipment_type, int *refine_level);
+typedef int (*HPMHOOK_post_refine_get_randombonus_max) (int retVal___, enum refine_type equipment_type, int refine_level);
+typedef void (*HPMHOOK_pre_refine_refinery_add_item) (struct map_session_data **sd, int *item_index);
+typedef void (*HPMHOOK_post_refine_refinery_add_item) (struct map_session_data *sd, int item_index);
+typedef void (*HPMHOOK_pre_refine_refinery_refine_request) (struct map_session_data **sd, int *item_index, int *material_id, bool *use_blacksmith_blessing);
+typedef void (*HPMHOOK_post_refine_refinery_refine_request) (struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing);
+#endif // MAP_REFINE_H
+#ifdef MAP_REFINE_P_H /* PRIV__refine */
+typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refine_libconfig_sub) (struct config_setting_t **r, const char **name, const char **source);
+typedef int (*HPMHOOK_post_PRIV__refine_readdb_refine_libconfig_sub) (int retVal___, struct config_setting_t *r, const char *name, const char *source);
+typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refine_libconfig) (const char **filename);
+typedef int (*HPMHOOK_post_PRIV__refine_readdb_refine_libconfig) (int retVal___, const char *filename);
+typedef bool (*HPMHOOK_pre_PRIV__refine_announce_behavior_string2enum) (const char **str, unsigned int **result);
+typedef bool (*HPMHOOK_post_PRIV__refine_announce_behavior_string2enum) (bool retVal___, const char *str, unsigned int *result);
+typedef bool (*HPMHOOK_pre_PRIV__refine_failure_behavior_string2enum) (const char **str, enum refine_ui_failure_behavior **result);
+typedef bool (*HPMHOOK_post_PRIV__refine_failure_behavior_string2enum) (bool retVal___, const char *str, enum refine_ui_failure_behavior *result);
+typedef bool (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings_items) (const struct config_setting_t **elem, struct s_refine_requirement **req, const char **name, const char **source);
+typedef bool (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings_items) (bool retVal___, const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source);
+typedef bool (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings_sub) (const struct config_setting_t **elem, int *type, const char **name, const char **source);
+typedef bool (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings_sub) (bool retVal___, const struct config_setting_t *elem, int type, const char *name, const char *source);
+typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings) (const struct config_setting_t **r, int *type, const char **name, const char **source);
+typedef int (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings) (int retVal___, const struct config_setting_t *r, int type, const char *name, const char *source);
+typedef bool (*HPMHOOK_pre_PRIV__refine_is_refinable) (struct map_session_data **sd, int *item_index);
+typedef bool (*HPMHOOK_post_PRIV__refine_is_refinable) (bool retVal___, struct map_session_data *sd, int item_index);
+#endif // MAP_REFINE_P_H
#ifdef COMMON_RANDOM_H /* rnd */
typedef void (*HPMHOOK_pre_rnd_init) (void);
typedef void (*HPMHOOK_post_rnd_init) (void);
@@ -7064,8 +7110,8 @@ typedef bool (*HPMHOOK_pre_searchstore_queryremote) (struct map_session_data **s
typedef bool (*HPMHOOK_post_searchstore_queryremote) (bool retVal___, struct map_session_data *sd, int account_id);
typedef void (*HPMHOOK_pre_searchstore_clearremote) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_searchstore_clearremote) (struct map_session_data *sd);
-typedef bool (*HPMHOOK_pre_searchstore_result) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine, const struct item_option **option);
-typedef bool (*HPMHOOK_post_searchstore_result) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option);
+typedef bool (*HPMHOOK_pre_searchstore_result) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine_level, const struct item_option **option);
+typedef bool (*HPMHOOK_post_searchstore_result) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option);
#endif // MAP_SEARCHSTORE_H
#ifdef COMMON_SHOWMSG_H /* showmsg */
typedef void (*HPMHOOK_pre_showmsg_init) (void);
@@ -7702,8 +7748,6 @@ typedef int (*HPMHOOK_pre_status_init) (bool *minimal);
typedef int (*HPMHOOK_post_status_init) (int retVal___, bool minimal);
typedef void (*HPMHOOK_pre_status_final) (void);
typedef void (*HPMHOOK_post_status_final) (void);
-typedef int (*HPMHOOK_pre_status_get_refine_chance) (enum refine_type *wlv, int *refine, enum refine_chance_type *type);
-typedef int (*HPMHOOK_post_status_get_refine_chance) (int retVal___, enum refine_type wlv, int refine, enum refine_chance_type type);
typedef sc_type (*HPMHOOK_pre_status_skill2sc) (int *skill_id);
typedef sc_type (*HPMHOOK_post_status_skill2sc) (sc_type retVal___, int skill_id);
typedef int (*HPMHOOK_pre_status_sc2skill) (sc_type *sc);
@@ -7934,10 +7978,6 @@ typedef bool (*HPMHOOK_pre_status_readdb_job2) (char **fields[], int *columns, i
typedef bool (*HPMHOOK_post_status_readdb_job2) (bool retVal___, char *fields[], int columns, int current);
typedef bool (*HPMHOOK_pre_status_readdb_sizefix) (char **fields[], int *columns, int *current);
typedef bool (*HPMHOOK_post_status_readdb_sizefix) (bool retVal___, char *fields[], int columns, int current);
-typedef int (*HPMHOOK_pre_status_readdb_refine_libconfig) (const char **filename);
-typedef int (*HPMHOOK_post_status_readdb_refine_libconfig) (int retVal___, const char *filename);
-typedef int (*HPMHOOK_pre_status_readdb_refine_libconfig_sub) (struct config_setting_t **r, const char **name, const char **source);
-typedef int (*HPMHOOK_post_status_readdb_refine_libconfig_sub) (int retVal___, struct config_setting_t *r, const char *name, const char *source);
typedef bool (*HPMHOOK_pre_status_readdb_scconfig) (char **fields[], int *columns, int *current);
typedef bool (*HPMHOOK_post_status_readdb_scconfig) (bool retVal___, char *fields[], int columns, int current);
typedef void (*HPMHOOK_pre_status_read_job_db) (void);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 671d8ad8a..9c0b1905e 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -2292,6 +2292,18 @@ struct {
struct HPMHookPoint *HP_clif_loadConfirm_post;
struct HPMHookPoint *HP_clif_send_selforarea_pre;
struct HPMHookPoint *HP_clif_send_selforarea_post;
+ struct HPMHookPoint *HP_clif_OpenRefineryUI_pre;
+ struct HPMHookPoint *HP_clif_OpenRefineryUI_post;
+ struct HPMHookPoint *HP_clif_pAddItemRefineryUI_pre;
+ struct HPMHookPoint *HP_clif_pAddItemRefineryUI_post;
+ struct HPMHookPoint *HP_clif_AddItemRefineryUIAck_pre;
+ struct HPMHookPoint *HP_clif_AddItemRefineryUIAck_post;
+ struct HPMHookPoint *HP_clif_pRefineryUIClose_pre;
+ struct HPMHookPoint *HP_clif_pRefineryUIClose_post;
+ struct HPMHookPoint *HP_clif_pRefineryUIRefine_pre;
+ struct HPMHookPoint *HP_clif_pRefineryUIRefine_post;
+ struct HPMHookPoint *HP_clif_announce_refine_status_pre;
+ struct HPMHookPoint *HP_clif_announce_refine_status_post;
struct HPMHookPoint *HP_cmdline_init_pre;
struct HPMHookPoint *HP_cmdline_init_post;
struct HPMHookPoint *HP_cmdline_final_pre;
@@ -5126,6 +5138,36 @@ struct {
struct HPMHookPoint *HP_quest_questinfo_validate_mercenary_class_post;
struct HPMHookPoint *HP_quest_questinfo_vector_clear_pre;
struct HPMHookPoint *HP_quest_questinfo_vector_clear_post;
+ struct HPMHookPoint *HP_refine_init_pre;
+ struct HPMHookPoint *HP_refine_init_post;
+ struct HPMHookPoint *HP_refine_final_pre;
+ struct HPMHookPoint *HP_refine_final_post;
+ struct HPMHookPoint *HP_refine_get_refine_chance_pre;
+ struct HPMHookPoint *HP_refine_get_refine_chance_post;
+ struct HPMHookPoint *HP_refine_get_bonus_pre;
+ struct HPMHookPoint *HP_refine_get_bonus_post;
+ struct HPMHookPoint *HP_refine_get_randombonus_max_pre;
+ struct HPMHookPoint *HP_refine_get_randombonus_max_post;
+ struct HPMHookPoint *HP_refine_refinery_add_item_pre;
+ struct HPMHookPoint *HP_refine_refinery_add_item_post;
+ struct HPMHookPoint *HP_refine_refinery_refine_request_pre;
+ struct HPMHookPoint *HP_refine_refinery_refine_request_post;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_sub_pre;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_sub_post;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_pre;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_post;
+ struct HPMHookPoint *HP_PRIV__refine_announce_behavior_string2enum_pre;
+ struct HPMHookPoint *HP_PRIV__refine_announce_behavior_string2enum_post;
+ struct HPMHookPoint *HP_PRIV__refine_failure_behavior_string2enum_pre;
+ struct HPMHookPoint *HP_PRIV__refine_failure_behavior_string2enum_post;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_items_pre;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_items_post;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_sub_post;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_pre;
+ struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_post;
+ struct HPMHookPoint *HP_PRIV__refine_is_refinable_pre;
+ struct HPMHookPoint *HP_PRIV__refine_is_refinable_post;
struct HPMHookPoint *HP_rnd_init_pre;
struct HPMHookPoint *HP_rnd_init_post;
struct HPMHookPoint *HP_rnd_final_pre;
@@ -6194,8 +6236,6 @@ struct {
struct HPMHookPoint *HP_status_init_post;
struct HPMHookPoint *HP_status_final_pre;
struct HPMHookPoint *HP_status_final_post;
- struct HPMHookPoint *HP_status_get_refine_chance_pre;
- struct HPMHookPoint *HP_status_get_refine_chance_post;
struct HPMHookPoint *HP_status_skill2sc_pre;
struct HPMHookPoint *HP_status_skill2sc_post;
struct HPMHookPoint *HP_status_sc2skill_pre;
@@ -6426,10 +6466,6 @@ struct {
struct HPMHookPoint *HP_status_readdb_job2_post;
struct HPMHookPoint *HP_status_readdb_sizefix_pre;
struct HPMHookPoint *HP_status_readdb_sizefix_post;
- struct HPMHookPoint *HP_status_readdb_refine_libconfig_pre;
- struct HPMHookPoint *HP_status_readdb_refine_libconfig_post;
- struct HPMHookPoint *HP_status_readdb_refine_libconfig_sub_pre;
- struct HPMHookPoint *HP_status_readdb_refine_libconfig_sub_post;
struct HPMHookPoint *HP_status_readdb_scconfig_pre;
struct HPMHookPoint *HP_status_readdb_scconfig_post;
struct HPMHookPoint *HP_status_read_job_db_pre;
@@ -9037,6 +9073,18 @@ struct {
int HP_clif_loadConfirm_post;
int HP_clif_send_selforarea_pre;
int HP_clif_send_selforarea_post;
+ int HP_clif_OpenRefineryUI_pre;
+ int HP_clif_OpenRefineryUI_post;
+ int HP_clif_pAddItemRefineryUI_pre;
+ int HP_clif_pAddItemRefineryUI_post;
+ int HP_clif_AddItemRefineryUIAck_pre;
+ int HP_clif_AddItemRefineryUIAck_post;
+ int HP_clif_pRefineryUIClose_pre;
+ int HP_clif_pRefineryUIClose_post;
+ int HP_clif_pRefineryUIRefine_pre;
+ int HP_clif_pRefineryUIRefine_post;
+ int HP_clif_announce_refine_status_pre;
+ int HP_clif_announce_refine_status_post;
int HP_cmdline_init_pre;
int HP_cmdline_init_post;
int HP_cmdline_final_pre;
@@ -11871,6 +11919,36 @@ struct {
int HP_quest_questinfo_validate_mercenary_class_post;
int HP_quest_questinfo_vector_clear_pre;
int HP_quest_questinfo_vector_clear_post;
+ int HP_refine_init_pre;
+ int HP_refine_init_post;
+ int HP_refine_final_pre;
+ int HP_refine_final_post;
+ int HP_refine_get_refine_chance_pre;
+ int HP_refine_get_refine_chance_post;
+ int HP_refine_get_bonus_pre;
+ int HP_refine_get_bonus_post;
+ int HP_refine_get_randombonus_max_pre;
+ int HP_refine_get_randombonus_max_post;
+ int HP_refine_refinery_add_item_pre;
+ int HP_refine_refinery_add_item_post;
+ int HP_refine_refinery_refine_request_pre;
+ int HP_refine_refinery_refine_request_post;
+ int HP_PRIV__refine_readdb_refine_libconfig_sub_pre;
+ int HP_PRIV__refine_readdb_refine_libconfig_sub_post;
+ int HP_PRIV__refine_readdb_refine_libconfig_pre;
+ int HP_PRIV__refine_readdb_refine_libconfig_post;
+ int HP_PRIV__refine_announce_behavior_string2enum_pre;
+ int HP_PRIV__refine_announce_behavior_string2enum_post;
+ int HP_PRIV__refine_failure_behavior_string2enum_pre;
+ int HP_PRIV__refine_failure_behavior_string2enum_post;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_items_pre;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_items_post;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_sub_post;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_pre;
+ int HP_PRIV__refine_readdb_refinery_ui_settings_post;
+ int HP_PRIV__refine_is_refinable_pre;
+ int HP_PRIV__refine_is_refinable_post;
int HP_rnd_init_pre;
int HP_rnd_init_post;
int HP_rnd_final_pre;
@@ -12939,8 +13017,6 @@ struct {
int HP_status_init_post;
int HP_status_final_pre;
int HP_status_final_post;
- int HP_status_get_refine_chance_pre;
- int HP_status_get_refine_chance_post;
int HP_status_skill2sc_pre;
int HP_status_skill2sc_post;
int HP_status_sc2skill_pre;
@@ -13171,10 +13247,6 @@ struct {
int HP_status_readdb_job2_post;
int HP_status_readdb_sizefix_pre;
int HP_status_readdb_sizefix_post;
- int HP_status_readdb_refine_libconfig_pre;
- int HP_status_readdb_refine_libconfig_post;
- int HP_status_readdb_refine_libconfig_sub_pre;
- int HP_status_readdb_refine_libconfig_sub_post;
int HP_status_readdb_scconfig_pre;
int HP_status_readdb_scconfig_post;
int HP_status_read_job_db_pre;
@@ -13564,6 +13636,8 @@ struct {
struct pcre_interface libpcre;
struct pet_interface pet;
struct quest_interface quest;
+ struct refine_interface refine;
+ struct refine_interface_private PRIV__refine;
struct rnd_interface rnd;
struct rodex_interface rodex;
struct script_interface script;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index b33cc6f4e..6c0b6db36 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1170,6 +1170,12 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pResetCooldown, HP_clif_pResetCooldown) },
{ HP_POP(clif->loadConfirm, HP_clif_loadConfirm) },
{ HP_POP(clif->send_selforarea, HP_clif_send_selforarea) },
+ { HP_POP(clif->OpenRefineryUI, HP_clif_OpenRefineryUI) },
+ { HP_POP(clif->pAddItemRefineryUI, HP_clif_pAddItemRefineryUI) },
+ { HP_POP(clif->AddItemRefineryUIAck, HP_clif_AddItemRefineryUIAck) },
+ { HP_POP(clif->pRefineryUIClose, HP_clif_pRefineryUIClose) },
+ { HP_POP(clif->pRefineryUIRefine, HP_clif_pRefineryUIRefine) },
+ { HP_POP(clif->announce_refine_status, HP_clif_announce_refine_status) },
/* cmdline_interface */
{ HP_POP(cmdline->init, HP_cmdline_init) },
{ HP_POP(cmdline->final, HP_cmdline_final) },
@@ -2624,6 +2630,23 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(quest->questinfo_validate_quests, HP_quest_questinfo_validate_quests) },
{ HP_POP(quest->questinfo_validate_mercenary_class, HP_quest_questinfo_validate_mercenary_class) },
{ HP_POP(quest->questinfo_vector_clear, HP_quest_questinfo_vector_clear) },
+/* refine_interface */
+ { HP_POP(refine->init, HP_refine_init) },
+ { HP_POP(refine->final, HP_refine_final) },
+ { HP_POP(refine->get_refine_chance, HP_refine_get_refine_chance) },
+ { HP_POP(refine->get_bonus, HP_refine_get_bonus) },
+ { HP_POP(refine->get_randombonus_max, HP_refine_get_randombonus_max) },
+ { HP_POP(refine->refinery_add_item, HP_refine_refinery_add_item) },
+ { HP_POP(refine->refinery_refine_request, HP_refine_refinery_refine_request) },
+/* refine_interface_private */
+ { HP_POP(refine->p->readdb_refine_libconfig_sub, HP_PRIV__refine_readdb_refine_libconfig_sub) },
+ { HP_POP(refine->p->readdb_refine_libconfig, HP_PRIV__refine_readdb_refine_libconfig) },
+ { HP_POP(refine->p->announce_behavior_string2enum, HP_PRIV__refine_announce_behavior_string2enum) },
+ { HP_POP(refine->p->failure_behavior_string2enum, HP_PRIV__refine_failure_behavior_string2enum) },
+ { HP_POP(refine->p->readdb_refinery_ui_settings_items, HP_PRIV__refine_readdb_refinery_ui_settings_items) },
+ { HP_POP(refine->p->readdb_refinery_ui_settings_sub, HP_PRIV__refine_readdb_refinery_ui_settings_sub) },
+ { HP_POP(refine->p->readdb_refinery_ui_settings, HP_PRIV__refine_readdb_refinery_ui_settings) },
+ { HP_POP(refine->p->is_refinable, HP_PRIV__refine_is_refinable) },
/* rnd_interface */
{ HP_POP(rnd->init, HP_rnd_init) },
{ HP_POP(rnd->final, HP_rnd_final) },
@@ -3167,7 +3190,6 @@ struct HookingPointData HookingPoints[] = {
/* status_interface */
{ HP_POP(status->init, HP_status_init) },
{ HP_POP(status->final, HP_status_final) },
- { HP_POP(status->get_refine_chance, HP_status_get_refine_chance) },
{ HP_POP(status->skill2sc, HP_status_skill2sc) },
{ HP_POP(status->sc2skill, HP_status_sc2skill) },
{ HP_POP(status->sc2scb_flag, HP_status_sc2scb_flag) },
@@ -3283,8 +3305,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(status->natural_heal_timer, HP_status_natural_heal_timer) },
{ HP_POP(status->readdb_job2, HP_status_readdb_job2) },
{ HP_POP(status->readdb_sizefix, HP_status_readdb_sizefix) },
- { HP_POP(status->readdb_refine_libconfig, HP_status_readdb_refine_libconfig) },
- { HP_POP(status->readdb_refine_libconfig_sub, HP_status_readdb_refine_libconfig_sub) },
{ HP_POP(status->readdb_scconfig, HP_status_readdb_scconfig) },
{ HP_POP(status->read_job_db, HP_status_read_job_db) },
{ HP_POP(status->read_job_db_sub, HP_status_read_job_db_sub) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 4bfa46abe..44fb02b62 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -29881,6 +29881,162 @@ void HP_clif_send_selforarea(int fd, struct block_list *bl, const void *buf, int
}
return;
}
+void HP_clif_OpenRefineryUI(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_OpenRefineryUI_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_OpenRefineryUI_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_OpenRefineryUI_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.OpenRefineryUI(sd);
+ }
+ if (HPMHooks.count.HP_clif_OpenRefineryUI_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_OpenRefineryUI_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_OpenRefineryUI_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAddItemRefineryUI(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pAddItemRefineryUI_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAddItemRefineryUI_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pAddItemRefineryUI_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAddItemRefineryUI(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pAddItemRefineryUI_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAddItemRefineryUI_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pAddItemRefineryUI_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_AddItemRefineryUIAck(struct map_session_data *sd, int item_index, struct s_refine_requirement *req) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_AddItemRefineryUIAck_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *item_index, struct s_refine_requirement **req);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_AddItemRefineryUIAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_AddItemRefineryUIAck_pre[hIndex].func;
+ preHookFunc(&sd, &item_index, &req);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.AddItemRefineryUIAck(sd, item_index, req);
+ }
+ if (HPMHooks.count.HP_clif_AddItemRefineryUIAck_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int item_index, struct s_refine_requirement *req);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_AddItemRefineryUIAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_AddItemRefineryUIAck_post[hIndex].func;
+ postHookFunc(sd, item_index, req);
+ }
+ }
+ return;
+}
+void HP_clif_pRefineryUIClose(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pRefineryUIClose_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIClose_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pRefineryUIClose_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pRefineryUIClose(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pRefineryUIClose_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIClose_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pRefineryUIClose_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pRefineryUIRefine(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pRefineryUIRefine_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIRefine_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pRefineryUIRefine_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pRefineryUIRefine(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pRefineryUIRefine_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIRefine_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pRefineryUIRefine_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_announce_refine_status(struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_announce_refine_status_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *item_id, int *refine_level, bool *success, enum send_target *target);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_announce_refine_status_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_announce_refine_status_pre[hIndex].func;
+ preHookFunc(&sd, &item_id, &refine_level, &success, &target);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.announce_refine_status(sd, item_id, refine_level, success, target);
+ }
+ if (HPMHooks.count.HP_clif_announce_refine_status_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_announce_refine_status_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_announce_refine_status_post[hIndex].func;
+ postHookFunc(sd, item_id, refine_level, success, target);
+ }
+ }
+ return;
+}
/* cmdline_interface */
void HP_cmdline_init(void) {
int hIndex = 0;
@@ -45278,15 +45434,15 @@ char HP_logs_chattype2char(e_log_chat_type type) {
}
return retVal___;
}
-bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_data *id) {
+bool HP_logs_should_log_item(int nameid, int amount, int refine_level, struct item_data *id) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_logs_should_log_item_pre > 0) {
- bool (*preHookFunc) (int *nameid, int *amount, int *refine, struct item_data **id);
+ bool (*preHookFunc) (int *nameid, int *amount, int *refine_level, struct item_data **id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_logs_should_log_item_pre[hIndex].func;
- retVal___ = preHookFunc(&nameid, &amount, &refine, &id);
+ retVal___ = preHookFunc(&nameid, &amount, &refine_level, &id);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -45294,13 +45450,13 @@ bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_dat
}
}
{
- retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine, id);
+ retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine_level, id);
}
if (HPMHooks.count.HP_logs_should_log_item_post > 0) {
- bool (*postHookFunc) (bool retVal___, int nameid, int amount, int refine, struct item_data *id);
+ bool (*postHookFunc) (bool retVal___, int nameid, int amount, int refine_level, struct item_data *id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_logs_should_log_item_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, nameid, amount, refine, id);
+ retVal___ = postHookFunc(retVal___, nameid, amount, refine_level, id);
}
}
return retVal___;
@@ -68265,6 +68421,410 @@ void HP_quest_questinfo_vector_clear(int m) {
}
return;
}
+/* refine_interface */
+int HP_refine_init(bool minimal) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_refine_init_pre > 0) {
+ int (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_init_pre[hIndex].func;
+ retVal___ = preHookFunc(&minimal);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.refine.init(minimal);
+ }
+ if (HPMHooks.count.HP_refine_init_post > 0) {
+ int (*postHookFunc) (int retVal___, bool minimal);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, minimal);
+ }
+ }
+ return retVal___;
+}
+void HP_refine_final(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_refine_final_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_final_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.refine.final();
+ }
+ if (HPMHooks.count.HP_refine_final_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_final_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_refine_get_refine_chance(enum refine_type wlv, int refine_level, enum refine_chance_type type) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_refine_get_refine_chance_pre > 0) {
+ int (*preHookFunc) (enum refine_type *wlv, int *refine_level, enum refine_chance_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_refine_chance_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_get_refine_chance_pre[hIndex].func;
+ retVal___ = preHookFunc(&wlv, &refine_level, &type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.refine.get_refine_chance(wlv, refine_level, type);
+ }
+ if (HPMHooks.count.HP_refine_get_refine_chance_post > 0) {
+ int (*postHookFunc) (int retVal___, enum refine_type wlv, int refine_level, enum refine_chance_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_refine_chance_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_get_refine_chance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, wlv, refine_level, type);
+ }
+ }
+ return retVal___;
+}
+int HP_refine_get_bonus(enum refine_type equipment_type, int refine_level) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_refine_get_bonus_pre > 0) {
+ int (*preHookFunc) (enum refine_type *equipment_type, int *refine_level);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_bonus_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_get_bonus_pre[hIndex].func;
+ retVal___ = preHookFunc(&equipment_type, &refine_level);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.refine.get_bonus(equipment_type, refine_level);
+ }
+ if (HPMHooks.count.HP_refine_get_bonus_post > 0) {
+ int (*postHookFunc) (int retVal___, enum refine_type equipment_type, int refine_level);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_bonus_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_get_bonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, equipment_type, refine_level);
+ }
+ }
+ return retVal___;
+}
+int HP_refine_get_randombonus_max(enum refine_type equipment_type, int refine_level) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_refine_get_randombonus_max_pre > 0) {
+ int (*preHookFunc) (enum refine_type *equipment_type, int *refine_level);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_randombonus_max_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_get_randombonus_max_pre[hIndex].func;
+ retVal___ = preHookFunc(&equipment_type, &refine_level);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.refine.get_randombonus_max(equipment_type, refine_level);
+ }
+ if (HPMHooks.count.HP_refine_get_randombonus_max_post > 0) {
+ int (*postHookFunc) (int retVal___, enum refine_type equipment_type, int refine_level);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_randombonus_max_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_get_randombonus_max_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, equipment_type, refine_level);
+ }
+ }
+ return retVal___;
+}
+void HP_refine_refinery_add_item(struct map_session_data *sd, int item_index) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_refine_refinery_add_item_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *item_index);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_add_item_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_refinery_add_item_pre[hIndex].func;
+ preHookFunc(&sd, &item_index);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.refine.refinery_add_item(sd, item_index);
+ }
+ if (HPMHooks.count.HP_refine_refinery_add_item_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int item_index);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_add_item_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_refinery_add_item_post[hIndex].func;
+ postHookFunc(sd, item_index);
+ }
+ }
+ return;
+}
+void HP_refine_refinery_refine_request(struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_refine_refinery_refine_request_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *item_index, int *material_id, bool *use_blacksmith_blessing);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_refine_request_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_refine_refinery_refine_request_pre[hIndex].func;
+ preHookFunc(&sd, &item_index, &material_id, &use_blacksmith_blessing);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.refine.refinery_refine_request(sd, item_index, material_id, use_blacksmith_blessing);
+ }
+ if (HPMHooks.count.HP_refine_refinery_refine_request_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_refine_request_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_refine_refinery_refine_request_post[hIndex].func;
+ postHookFunc(sd, item_index, material_id, use_blacksmith_blessing);
+ }
+ }
+ return;
+}
+/* refine_interface_private */
+int HP_PRIV__refine_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_pre > 0) {
+ int (*preHookFunc) (struct config_setting_t **r, const char **name, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&r, &name, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.readdb_refine_libconfig_sub(r, name, source);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_post > 0) {
+ int (*postHookFunc) (int retVal___, struct config_setting_t *r, const char *name, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, r, name, source);
+ }
+ }
+ return retVal___;
+}
+int HP_PRIV__refine_readdb_refine_libconfig(const char *filename) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_pre > 0) {
+ int (*preHookFunc) (const char **filename);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.readdb_refine_libconfig(filename);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_post > 0) {
+ int (*postHookFunc) (int retVal___, const char *filename);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename);
+ }
+ }
+ return retVal___;
+}
+bool HP_PRIV__refine_announce_behavior_string2enum(const char *str, unsigned int *result) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_pre > 0) {
+ bool (*preHookFunc) (const char **str, unsigned int **result);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_announce_behavior_string2enum_pre[hIndex].func;
+ retVal___ = preHookFunc(&str, &result);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.announce_behavior_string2enum(str, result);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *str, unsigned int *result);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_announce_behavior_string2enum_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, result);
+ }
+ }
+ return retVal___;
+}
+bool HP_PRIV__refine_failure_behavior_string2enum(const char *str, enum refine_ui_failure_behavior *result) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_pre > 0) {
+ bool (*preHookFunc) (const char **str, enum refine_ui_failure_behavior **result);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_failure_behavior_string2enum_pre[hIndex].func;
+ retVal___ = preHookFunc(&str, &result);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.failure_behavior_string2enum(str, result);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *str, enum refine_ui_failure_behavior *result);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_failure_behavior_string2enum_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, result);
+ }
+ }
+ return retVal___;
+}
+bool HP_PRIV__refine_readdb_refinery_ui_settings_items(const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **elem, struct s_refine_requirement **req, const char **name, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre[hIndex].func;
+ retVal___ = preHookFunc(&elem, &req, &name, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings_items(elem, req, name, source);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_items_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, elem, req, name, source);
+ }
+ }
+ return retVal___;
+}
+bool HP_PRIV__refine_readdb_refinery_ui_settings_sub(const struct config_setting_t *elem, int type, const char *name, const char *source) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre > 0) {
+ bool (*preHookFunc) (const struct config_setting_t **elem, int *type, const char **name, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&elem, &type, &name, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings_sub(elem, type, name, source);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const struct config_setting_t *elem, int type, const char *name, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, elem, type, name, source);
+ }
+ }
+ return retVal___;
+}
+int HP_PRIV__refine_readdb_refinery_ui_settings(const struct config_setting_t *r, int type, const char *name, const char *source) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_pre > 0) {
+ int (*preHookFunc) (const struct config_setting_t **r, int *type, const char **name, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_pre[hIndex].func;
+ retVal___ = preHookFunc(&r, &type, &name, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings(r, type, name, source);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_post > 0) {
+ int (*postHookFunc) (int retVal___, const struct config_setting_t *r, int type, const char *name, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, r, type, name, source);
+ }
+ }
+ return retVal___;
+}
+bool HP_PRIV__refine_is_refinable(struct map_session_data *sd, int item_index) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_PRIV__refine_is_refinable_pre > 0) {
+ bool (*preHookFunc) (struct map_session_data **sd, int *item_index);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_is_refinable_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__refine_is_refinable_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &item_index);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__refine.is_refinable(sd, item_index);
+ }
+ if (HPMHooks.count.HP_PRIV__refine_is_refinable_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int item_index);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_is_refinable_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__refine_is_refinable_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, item_index);
+ }
+ }
+ return retVal___;
+}
/* rnd_interface */
void HP_rnd_init(void) {
int hIndex = 0;
@@ -74267,15 +74827,15 @@ void HP_searchstore_clearremote(struct map_session_data *sd) {
}
return;
}
-bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option) {
+bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_searchstore_result_pre > 0) {
- bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine, const struct item_option **option);
+ bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine_level, const struct item_option **option);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_searchstore_result_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &store_id, &account_id, &store_name, &nameid, &amount, &price, &card, &refine, &option);
+ retVal___ = preHookFunc(&sd, &store_id, &account_id, &store_name, &nameid, &amount, &price, &card, &refine_level, &option);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -74283,13 +74843,13 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i
}
}
{
- retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option);
+ retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine_level, option);
}
if (HPMHooks.count.HP_searchstore_result_post > 0) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine, const struct item_option *option);
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option);
for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_searchstore_result_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine, option);
+ retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine_level, option);
}
}
return retVal___;
@@ -82853,33 +83413,6 @@ void HP_status_final(void) {
}
return;
}
-int HP_status_get_refine_chance(enum refine_type wlv, int refine, enum refine_chance_type type) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_status_get_refine_chance_pre > 0) {
- int (*preHookFunc) (enum refine_type *wlv, int *refine, enum refine_chance_type *type);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_status_get_refine_chance_pre[hIndex].func;
- retVal___ = preHookFunc(&wlv, &refine, &type);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.status.get_refine_chance(wlv, refine, type);
- }
- if (HPMHooks.count.HP_status_get_refine_chance_post > 0) {
- int (*postHookFunc) (int retVal___, enum refine_type wlv, int refine, enum refine_chance_type type);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_status_get_refine_chance_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, wlv, refine, type);
- }
- }
- return retVal___;
-}
sc_type HP_status_skill2sc(int skill_id) {
int hIndex = 0;
sc_type retVal___ = SC_NONE;
@@ -85981,60 +86514,6 @@ bool HP_status_readdb_sizefix(char *fields[], int columns, int current) {
}
return retVal___;
}
-int HP_status_readdb_refine_libconfig(const char *filename) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_status_readdb_refine_libconfig_pre > 0) {
- int (*preHookFunc) (const char **filename);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_pre[hIndex].func;
- retVal___ = preHookFunc(&filename);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.status.readdb_refine_libconfig(filename);
- }
- if (HPMHooks.count.HP_status_readdb_refine_libconfig_post > 0) {
- int (*postHookFunc) (int retVal___, const char *filename);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, filename);
- }
- }
- return retVal___;
-}
-int HP_status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre > 0) {
- int (*preHookFunc) (struct config_setting_t **r, const char **name, const char **source);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_sub_pre[hIndex].func;
- retVal___ = preHookFunc(&r, &name, &source);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.status.readdb_refine_libconfig_sub(r, name, source);
- }
- if (HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post > 0) {
- int (*postHookFunc) (int retVal___, struct config_setting_t *r, const char *name, const char *source);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_sub_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, r, name, source);
- }
- }
- return retVal___;
-}
bool HP_status_readdb_scconfig(char *fields[], int columns, int current) {
int hIndex = 0;
bool retVal___ = false;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
index 59ee43ab7..786b60288 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
@@ -73,6 +73,8 @@ HPMHooks.source.pc = *pc;
HPMHooks.source.libpcre = *libpcre;
HPMHooks.source.pet = *pet;
HPMHooks.source.quest = *quest;
+HPMHooks.source.refine = *refine;
+HPMHooks.source.PRIV__refine = *refine->p;
HPMHooks.source.rnd = *rnd;
HPMHooks.source.rodex = *rodex;
HPMHooks.source.script = *script;