From 47f133c410d0004bf0cb05a4de5af2ee1944bcc3 Mon Sep 17 00:00:00 2001 From: "Hercules.ws" Date: Mon, 26 Aug 2019 00:39:32 +0200 Subject: HPM Hooks Update Signed-off-by: HerculesWSAPI --- src/plugins/HPMHooking/HPMHooking.Defs.inc | 4 ++-- src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 68179d499..e8c7705a0 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -5784,8 +5784,8 @@ typedef bool (*HPMHOOK_pre_npc_trader_pay) (struct npc_data **nd, struct map_ses typedef bool (*HPMHOOK_post_npc_trader_pay) (bool retVal___, struct npc_data *nd, struct map_session_data *sd, int price, int points); typedef void (*HPMHOOK_pre_npc_trader_update) (int *master); typedef void (*HPMHOOK_post_npc_trader_update) (int master); -typedef int (*HPMHOOK_pre_npc_market_buylist) (struct map_session_data **sd, struct itemlist **item_list); -typedef int (*HPMHOOK_post_npc_market_buylist) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); +typedef enum market_buy_result (*HPMHOOK_pre_npc_market_buylist) (struct map_session_data **sd, struct itemlist **item_list); +typedef enum market_buy_result (*HPMHOOK_post_npc_market_buylist) (enum market_buy_result retVal___, struct map_session_data *sd, struct itemlist *item_list); typedef int (*HPMHOOK_pre_npc_barter_buylist) (struct map_session_data **sd, struct barteritemlist **item_list); typedef int (*HPMHOOK_post_npc_barter_buylist) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list); typedef bool (*HPMHOOK_pre_npc_trader_open) (struct map_session_data **sd, struct npc_data **nd); diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 7215e081d..5820ab92f 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -57747,11 +57747,12 @@ void HP_npc_trader_update(int master) { } return; } -int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) { +enum market_buy_result HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) { +/* Unknown return type 'enum market_buy_result'. Initializing to '0'. */ int hIndex = 0; - int retVal___ = 0; + enum market_buy_result retVal___ = 0; if (HPMHooks.count.HP_npc_market_buylist_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list); + enum market_buy_result (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_buylist_pre[hIndex].func; @@ -57766,7 +57767,7 @@ int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_lis retVal___ = HPMHooks.source.npc.market_buylist(sd, item_list); } if (HPMHooks.count.HP_npc_market_buylist_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); + enum market_buy_result (*postHookFunc) (enum market_buy_result retVal___, struct map_session_data *sd, struct itemlist *item_list); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_buylist_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, item_list); -- cgit v1.2.3-60-g2f50