summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-05 07:07:56 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-15 20:36:28 +0300
commitef155244596854db06d9123948aa602e266845ae (patch)
tree6a1c21f17b5821f3bed5212abbcf8cf9b40e1051 /src
parentfa105239a60de50ab56bd6f18a483c41b976c38c (diff)
downloadhercules-ef155244596854db06d9123948aa602e266845ae.tar.gz
hercules-ef155244596854db06d9123948aa602e266845ae.tar.bz2
hercules-ef155244596854db06d9123948aa602e266845ae.tar.xz
hercules-ef155244596854db06d9123948aa602e266845ae.zip
Update hpm hooks.
Diffstat (limited to 'src')
-rw-r--r--src/common/HPMDataCheck.h58
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc38
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc3
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc132
5 files changed, 167 insertions, 76 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index c004c534e..7d865c908 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -590,45 +590,103 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_CZ_ADD_ITEM_TO_MAIL", sizeof(struct PACKET_CZ_ADD_ITEM_TO_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_CHECKNAME", sizeof(struct PACKET_CZ_CHECKNAME), SERVER_TYPE_MAP },
{ "PACKET_CZ_OPEN_UI", sizeof(struct PACKET_CZ_OPEN_UI), SERVER_TYPE_MAP },
+ { "PACKET_CZ_PC_BUY_CASH_POINT_ITEM", sizeof(struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM), SERVER_TYPE_MAP },
+ { "PACKET_CZ_PC_BUY_CASH_POINT_ITEM_sub", sizeof(struct PACKET_CZ_PC_BUY_CASH_POINT_ITEM_sub), SERVER_TYPE_MAP },
+ { "PACKET_CZ_PC_PURCHASE_ITEMLIST", sizeof(struct PACKET_CZ_PC_PURCHASE_ITEMLIST), SERVER_TYPE_MAP },
+ { "PACKET_CZ_PC_PURCHASE_ITEMLIST_sub", sizeof(struct PACKET_CZ_PC_PURCHASE_ITEMLIST_sub), SERVER_TYPE_MAP },
{ "PACKET_CZ_PET_EVOLUTION", sizeof(struct PACKET_CZ_PET_EVOLUTION), SERVER_TYPE_MAP },
{ "PACKET_CZ_PRIVATE_AIRSHIP_REQUEST", sizeof(struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_DELETE_MAIL", sizeof(struct PACKET_CZ_REQ_DELETE_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_ITEM_FROM_MAIL", sizeof(struct PACKET_CZ_REQ_ITEM_FROM_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_CZ_REQ_ITEMREPAIR", sizeof(struct PACKET_CZ_REQ_ITEMREPAIR), SERVER_TYPE_MAP },
+ { "PACKET_CZ_REQ_MAKINGITEM", sizeof(struct PACKET_CZ_REQ_MAKINGITEM), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_NEXT_MAIL_LIST", sizeof(struct PACKET_CZ_REQ_NEXT_MAIL_LIST), SERVER_TYPE_MAP },
+ { "PACKET_CZ_REQ_OPEN_BUYING_STORE", sizeof(struct PACKET_CZ_REQ_OPEN_BUYING_STORE), SERVER_TYPE_MAP },
+ { "PACKET_CZ_REQ_OPEN_BUYING_STORE_sub", sizeof(struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_OPEN_MAIL", sizeof(struct PACKET_CZ_REQ_OPEN_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_OPEN_WRITE_MAIL", sizeof(struct PACKET_CZ_REQ_OPEN_WRITE_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_READ_MAIL", sizeof(struct PACKET_CZ_REQ_READ_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_REFRESH_MAIL_LIST", sizeof(struct PACKET_CZ_REQ_REFRESH_MAIL_LIST), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_REMOVE_ITEM_MAIL", sizeof(struct PACKET_CZ_REQ_REMOVE_ITEM_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_STYLE_CHANGE", sizeof(struct PACKET_CZ_REQ_STYLE_CHANGE), SERVER_TYPE_MAP },
+ { "PACKET_CZ_REQ_TRADE_BUYING_STORE", sizeof(struct PACKET_CZ_REQ_TRADE_BUYING_STORE), SERVER_TYPE_MAP },
+ { "PACKET_CZ_REQ_TRADE_BUYING_STORE_sub", sizeof(struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_ZENY_FROM_MAIL", sizeof(struct PACKET_CZ_REQ_ZENY_FROM_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_CZ_REQMAKINGITEM", sizeof(struct PACKET_CZ_REQMAKINGITEM), SERVER_TYPE_MAP },
+ { "PACKET_CZ_SEARCH_STORE_INFO", sizeof(struct PACKET_CZ_SEARCH_STORE_INFO), SERVER_TYPE_MAP },
+ { "PACKET_CZ_SEARCH_STORE_INFO_item", sizeof(struct PACKET_CZ_SEARCH_STORE_INFO_item), SERVER_TYPE_MAP },
{ "PACKET_CZ_SEND_MAIL", sizeof(struct PACKET_CZ_SEND_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_CZ_SSILIST_ITEM_CLICK", sizeof(struct PACKET_CZ_SSILIST_ITEM_CLICK), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_CLAN_LEAVE", sizeof(struct PACKET_ZC_ACK_CLAN_LEAVE), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_DELETE_MAIL", sizeof(struct PACKET_ZC_ACK_DELETE_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_ITEM_FROM_MAIL", sizeof(struct PACKET_ZC_ACK_ITEM_FROM_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ACK_ITEMLIST_BUYING_STORE", sizeof(struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ACK_ITEMLIST_BUYING_STORE_sub", sizeof(struct PACKET_ZC_ACK_ITEMLIST_BUYING_STORE_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_OPEN_WRITE_MAIL", sizeof(struct PACKET_ZC_ACK_OPEN_WRITE_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REMOVE_ITEM_MAIL", sizeof(struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ACK_REQMAKINGITEM", sizeof(struct PACKET_ZC_ACK_REQMAKINGITEM), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ACK_SCHEDULER_CASHITEM", sizeof(struct PACKET_ZC_ACK_SCHEDULER_CASHITEM), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub", sizeof(struct PACKET_ZC_ACK_SCHEDULER_CASHITEM_sub), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ACK_TOUSESKILL", sizeof(struct PACKET_ZC_ACK_TOUSESKILL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ACK_WEAPONREFINE", sizeof(struct PACKET_ZC_ACK_WEAPONREFINE), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_ZENY_FROM_MAIL", sizeof(struct PACKET_ZC_ACK_ZENY_FROM_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ADD_EXCHANGE_ITEM", sizeof(struct PACKET_ZC_ADD_EXCHANGE_ITEM), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ADD_ITEM_TO_CART", sizeof(struct PACKET_ZC_ADD_ITEM_TO_CART), SERVER_TYPE_MAP },
{ "PACKET_ZC_ADD_ITEM_TO_MAIL", sizeof(struct PACKET_ZC_ADD_ITEM_TO_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ADD_ITEM_TO_STORE", sizeof(struct PACKET_ZC_ADD_ITEM_TO_STORE), SERVER_TYPE_MAP },
{ "PACKET_ZC_ADD_MEMBER_TO_GROUP", sizeof(struct PACKET_ZC_ADD_MEMBER_TO_GROUP), SERVER_TYPE_MAP },
+ { "PACKET_ZC_CASH_ITEM_DELETE", sizeof(struct PACKET_ZC_CASH_ITEM_DELETE), SERVER_TYPE_MAP },
+ { "PACKET_ZC_CASH_TIME_COUNTER", sizeof(struct PACKET_ZC_CASH_TIME_COUNTER), SERVER_TYPE_MAP },
{ "PACKET_ZC_CHECKNAME", sizeof(struct PACKET_ZC_CHECKNAME), SERVER_TYPE_MAP },
{ "PACKET_ZC_CLANINFO", sizeof(struct PACKET_ZC_CLANINFO), SERVER_TYPE_MAP },
+ { "PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER", sizeof(struct PACKET_ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER), SERVER_TYPE_MAP },
+ { "PACKET_ZC_FEED_MER", sizeof(struct PACKET_ZC_FEED_MER), SERVER_TYPE_MAP },
+ { "PACKET_ZC_FEED_PET", sizeof(struct PACKET_ZC_FEED_PET), SERVER_TYPE_MAP },
{ "PACKET_ZC_FORMATSTRING_MSG", sizeof(struct PACKET_ZC_FORMATSTRING_MSG), SERVER_TYPE_MAP },
{ "PACKET_ZC_GROUP_LIST", sizeof(struct PACKET_ZC_GROUP_LIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_GROUP_LIST_SUB", sizeof(struct PACKET_ZC_GROUP_LIST_SUB), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ITEM_ENTRY", sizeof(struct PACKET_ZC_ITEM_ENTRY), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ITEM_PICKUP_PARTY", sizeof(struct PACKET_ZC_ITEM_PICKUP_PARTY), SERVER_TYPE_MAP },
{ "PACKET_ZC_MAIL_LIST", sizeof(struct PACKET_ZC_MAIL_LIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_MAKABLEITEMLIST", sizeof(struct PACKET_ZC_MAKABLEITEMLIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_MAKABLEITEMLIST_sub", sizeof(struct PACKET_ZC_MAKABLEITEMLIST_sub), SERVER_TYPE_MAP },
+ { "PACKET_ZC_MAKINGARROW_LIST", sizeof(struct PACKET_ZC_MAKINGARROW_LIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_MAKINGARROW_LIST_sub", sizeof(struct PACKET_ZC_MAKINGARROW_LIST_sub), SERVER_TYPE_MAP },
+ { "PACKET_ZC_MAKINGITEM_LIST", sizeof(struct PACKET_ZC_MAKINGITEM_LIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_MAKINGITEM_LIST_sub", sizeof(struct PACKET_ZC_MAKINGITEM_LIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_MSG_COLOR", sizeof(struct PACKET_ZC_MSG_COLOR), SERVER_TYPE_MAP },
+ { "PACKET_ZC_MVP_GETTING_ITEM", sizeof(struct PACKET_ZC_MVP_GETTING_ITEM), SERVER_TYPE_MAP },
+ { "PACKET_ZC_MYITEMLIST_BUYING_STORE", sizeof(struct PACKET_ZC_MYITEMLIST_BUYING_STORE), SERVER_TYPE_MAP },
+ { "PACKET_ZC_MYITEMLIST_BUYING_STORE_sub", sizeof(struct PACKET_ZC_MYITEMLIST_BUYING_STORE_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_NOTIFY_CHAT", sizeof(struct PACKET_ZC_NOTIFY_CHAT), SERVER_TYPE_MAP },
{ "PACKET_ZC_NOTIFY_CLAN_CHAT", sizeof(struct PACKET_ZC_NOTIFY_CLAN_CHAT), SERVER_TYPE_MAP },
{ "PACKET_ZC_NOTIFY_CLAN_CONNECTINFO", sizeof(struct PACKET_ZC_NOTIFY_CLAN_CONNECTINFO), SERVER_TYPE_MAP },
{ "PACKET_ZC_NOTIFY_PLAYERCHAT", sizeof(struct PACKET_ZC_NOTIFY_PLAYERCHAT), SERVER_TYPE_MAP },
{ "PACKET_ZC_NOTIFY_UNREADMAIL", sizeof(struct PACKET_ZC_NOTIFY_UNREADMAIL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_NOTIFY_WEAPONITEMLIST", sizeof(struct PACKET_ZC_NOTIFY_WEAPONITEMLIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub", sizeof(struct PACKET_ZC_NOTIFY_WEAPONITEMLIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_OPEN_UI", sizeof(struct PACKET_ZC_OPEN_UI), SERVER_TYPE_MAP },
+ { "PACKET_ZC_PC_CASH_POINT_ITEMLIST", sizeof(struct PACKET_ZC_PC_CASH_POINT_ITEMLIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub", sizeof(struct PACKET_ZC_PC_CASH_POINT_ITEMLIST_sub), SERVER_TYPE_MAP },
+ { "PACKET_ZC_PC_PURCHASE_ITEMLIST", sizeof(struct PACKET_ZC_PC_PURCHASE_ITEMLIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC", sizeof(struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC), SERVER_TYPE_MAP },
+ { "PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub", sizeof(struct PACKET_ZC_PC_PURCHASE_ITEMLIST_FROMMC_sub), SERVER_TYPE_MAP },
+ { "PACKET_ZC_PC_PURCHASE_ITEMLIST_sub", sizeof(struct PACKET_ZC_PC_PURCHASE_ITEMLIST_sub), SERVER_TYPE_MAP },
+ { "PACKET_ZC_PC_PURCHASE_MYITEMLIST", sizeof(struct PACKET_ZC_PC_PURCHASE_MYITEMLIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub", sizeof(struct PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE", sizeof(struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE), SERVER_TYPE_MAP },
+ { "PACKET_ZC_PROPERTY_HOMUN", sizeof(struct PACKET_ZC_PROPERTY_HOMUN), SERVER_TYPE_MAP },
{ "PACKET_ZC_READ_MAIL", sizeof(struct PACKET_ZC_READ_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_REPAIRITEMLIST", sizeof(struct PACKET_ZC_REPAIRITEMLIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_REPAIRITEMLIST_sub", sizeof(struct PACKET_ZC_REPAIRITEMLIST_sub), SERVER_TYPE_MAP },
+ { "PACKET_ZC_SEARCH_STORE_INFO_ACK", sizeof(struct PACKET_ZC_SEARCH_STORE_INFO_ACK), SERVER_TYPE_MAP },
+ { "PACKET_ZC_SEARCH_STORE_INFO_ACK_sub", sizeof(struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_SKILL_SCALE", sizeof(struct PACKET_ZC_SKILL_SCALE), SERVER_TYPE_MAP },
+ { "PACKET_ZC_SPRITE_CHANGE", sizeof(struct PACKET_ZC_SPRITE_CHANGE), SERVER_TYPE_MAP },
{ "PACKET_ZC_STYLE_CHANGE_RES", sizeof(struct PACKET_ZC_STYLE_CHANGE_RES), SERVER_TYPE_MAP },
{ "PACKET_ZC_UI_ACTION", sizeof(struct PACKET_ZC_UI_ACTION), SERVER_TYPE_MAP },
+ { "PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE", sizeof(struct PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE), SERVER_TYPE_MAP },
+ { "PACKET_ZC_USE_ITEM_ACK", sizeof(struct PACKET_ZC_USE_ITEM_ACK), SERVER_TYPE_MAP },
{ "PACKET_ZC_WRITE_MAIL_RESULT", sizeof(struct PACKET_ZC_WRITE_MAIL_RESULT), SERVER_TYPE_MAP },
{ "ZC_PROGRESS_ACTOR", sizeof(struct ZC_PROGRESS_ACTOR), SERVER_TYPE_MAP },
{ "mail_item", sizeof(struct mail_item), SERVER_TYPE_MAP },
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 691401277..f5499d390 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -330,14 +330,14 @@ typedef void (*HPMHOOK_post_bg_config_read) (void);
#ifdef MAP_BUYINGSTORE_H /* buyingstore */
typedef bool (*HPMHOOK_pre_buyingstore_setup) (struct map_session_data **sd, unsigned char *slots);
typedef bool (*HPMHOOK_post_buyingstore_setup) (bool retVal___, struct map_session_data *sd, unsigned char slots);
-typedef void (*HPMHOOK_pre_buyingstore_create) (struct map_session_data **sd, int *zenylimit, unsigned char *result, const char **storename, const uint8 **itemlist, unsigned int *count);
-typedef void (*HPMHOOK_post_buyingstore_create) (struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const uint8 *itemlist, unsigned int count);
+typedef void (*HPMHOOK_pre_buyingstore_create) (struct map_session_data **sd, int *zenylimit, unsigned char *result, const char **storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub **itemlist, unsigned int *count);
+typedef void (*HPMHOOK_post_buyingstore_create) (struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub *itemlist, unsigned int count);
typedef void (*HPMHOOK_pre_buyingstore_close) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_buyingstore_close) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_buyingstore_open) (struct map_session_data **sd, int *account_id);
typedef void (*HPMHOOK_post_buyingstore_open) (struct map_session_data *sd, int account_id);
-typedef void (*HPMHOOK_pre_buyingstore_trade) (struct map_session_data **sd, int *account_id, unsigned int *buyer_id, const uint8 **itemlist, unsigned int *count);
-typedef void (*HPMHOOK_post_buyingstore_trade) (struct map_session_data *sd, int account_id, unsigned int buyer_id, const uint8 *itemlist, unsigned int count);
+typedef void (*HPMHOOK_pre_buyingstore_trade) (struct map_session_data **sd, int *account_id, unsigned int *buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub **itemlist, unsigned int *count);
+typedef void (*HPMHOOK_post_buyingstore_trade) (struct map_session_data *sd, int account_id, unsigned int buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub *itemlist, unsigned int count);
typedef bool (*HPMHOOK_pre_buyingstore_search) (struct map_session_data **sd, unsigned short *nameid);
typedef bool (*HPMHOOK_post_buyingstore_search) (bool retVal___, struct map_session_data *sd, unsigned short nameid);
typedef bool (*HPMHOOK_pre_buyingstore_searchall) (struct map_session_data **sd, const struct s_search_store_search **s);
@@ -1030,10 +1030,8 @@ typedef void (*HPMHOOK_pre_clif_unequipitemack) (struct map_session_data **sd, i
typedef void (*HPMHOOK_post_clif_unequipitemack) (struct map_session_data *sd, int n, int pos, enum e_UNEQUIP_ITEM_ACK result);
typedef void (*HPMHOOK_pre_clif_useitemack) (struct map_session_data **sd, int *index, int *amount, bool *ok);
typedef void (*HPMHOOK_post_clif_useitemack) (struct map_session_data *sd, int index, int amount, bool ok);
-typedef void (*HPMHOOK_pre_clif_addcards) (unsigned char **buf, struct item **item);
-typedef void (*HPMHOOK_post_clif_addcards) (unsigned char *buf, struct item *item);
-typedef void (*HPMHOOK_pre_clif_addcards2) (unsigned short **cards, struct item **item);
-typedef void (*HPMHOOK_post_clif_addcards2) (unsigned short *cards, struct item *item);
+typedef void (*HPMHOOK_pre_clif_addcards) (struct EQUIPSLOTINFO **buf, struct item **item);
+typedef void (*HPMHOOK_post_clif_addcards) (struct EQUIPSLOTINFO *buf, struct item *item);
typedef void (*HPMHOOK_pre_clif_item_sub) (unsigned char **buf, int *n, struct item **i, struct item_data **id, int *equip);
typedef void (*HPMHOOK_post_clif_item_sub) (unsigned char *buf, int n, struct item *i, struct item_data *id, int equip);
typedef void (*HPMHOOK_pre_clif_getareachar_item) (struct map_session_data **sd, struct flooritem_data **fitem);
@@ -1042,6 +1040,8 @@ typedef void (*HPMHOOK_pre_clif_cart_additem_ack) (struct map_session_data **sd,
typedef void (*HPMHOOK_post_clif_cart_additem_ack) (struct map_session_data *sd, int flag);
typedef void (*HPMHOOK_pre_clif_cashshop_load) (void);
typedef void (*HPMHOOK_post_clif_cashshop_load) (void);
+typedef void (*HPMHOOK_pre_clif_cashShopSchedule) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_cashShopSchedule) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_package_announce) (struct map_session_data **sd, unsigned short *nameid, unsigned short *containerid);
typedef void (*HPMHOOK_post_clif_package_announce) (struct map_session_data *sd, unsigned short nameid, unsigned short containerid);
typedef void (*HPMHOOK_pre_clif_item_drop_announce) (struct map_session_data **sd, unsigned short *nameid, char **monsterName);
@@ -1192,8 +1192,8 @@ typedef int (*HPMHOOK_pre_clif_outsight) (struct block_list **bl, va_list ap);
typedef int (*HPMHOOK_post_clif_outsight) (int retVal___, struct block_list *bl, va_list ap);
typedef void (*HPMHOOK_pre_clif_skillcastcancel) (struct block_list **bl);
typedef void (*HPMHOOK_post_clif_skillcastcancel) (struct block_list *bl);
-typedef void (*HPMHOOK_pre_clif_skill_fail) (struct map_session_data **sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype);
-typedef void (*HPMHOOK_post_clif_skill_fail) (struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype);
+typedef void (*HPMHOOK_pre_clif_skill_fail) (struct map_session_data **sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype, uint32 *item_id);
+typedef void (*HPMHOOK_post_clif_skill_fail) (struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype, uint32 item_id);
typedef void (*HPMHOOK_pre_clif_skill_cooldown) (struct map_session_data **sd, uint16 *skill_id, unsigned int *duration);
typedef void (*HPMHOOK_post_clif_skill_cooldown) (struct map_session_data *sd, uint16 skill_id, unsigned int duration);
typedef void (*HPMHOOK_pre_clif_skill_memomessage) (struct map_session_data **sd, int *type);
@@ -1506,6 +1506,8 @@ typedef void (*HPMHOOK_pre_clif_buyvending) (struct map_session_data **sd, int *
typedef void (*HPMHOOK_post_clif_buyvending) (struct map_session_data *sd, int index, int amount, int fail);
typedef void (*HPMHOOK_pre_clif_openvending) (struct map_session_data **sd, int *id, struct s_vending **vending_list);
typedef void (*HPMHOOK_post_clif_openvending) (struct map_session_data *sd, int id, struct s_vending *vending_list);
+typedef void (*HPMHOOK_pre_clif_openvendingAck) (int *fd, int *result);
+typedef void (*HPMHOOK_post_clif_openvendingAck) (int fd, int result);
typedef void (*HPMHOOK_pre_clif_vendingreport) (struct map_session_data **sd, int *index, int *amount, uint32 *char_id, int *zeny);
typedef void (*HPMHOOK_post_clif_vendingreport) (struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny);
typedef void (*HPMHOOK_pre_clif_storagelist) (struct map_session_data **sd, struct item **items, int *items_length);
@@ -2358,8 +2360,8 @@ typedef void (*HPMHOOK_pre_clif_rodex_open_write_mail) (int *fd, const char **re
typedef void (*HPMHOOK_post_clif_rodex_open_write_mail) (int fd, const char *receiver_name, int8 result);
typedef void (*HPMHOOK_pre_clif_pRodexAddItem) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pRodexAddItem) (int fd, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_rodex_add_item_result) (struct map_session_data **sd, int16 *idx, int16 *amount, int8 *result);
-typedef void (*HPMHOOK_post_clif_rodex_add_item_result) (struct map_session_data *sd, int16 idx, int16 amount, int8 result);
+typedef void (*HPMHOOK_pre_clif_rodex_add_item_result) (struct map_session_data **sd, int16 *idx, int16 *amount, enum rodex_add_item *result);
+typedef void (*HPMHOOK_post_clif_rodex_add_item_result) (struct map_session_data *sd, int16 idx, int16 amount, enum rodex_add_item result);
typedef void (*HPMHOOK_pre_clif_pRodexRemoveItem) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pRodexRemoveItem) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_rodex_remove_item_result) (struct map_session_data **sd, int16 *idx, int16 *amount);
@@ -2398,12 +2400,12 @@ typedef void (*HPMHOOK_pre_clif_pRodexRefreshMaillist) (int *fd, struct map_sess
typedef void (*HPMHOOK_post_clif_pRodexRefreshMaillist) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pRodexRequestZeny) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pRodexRequestZeny) (int fd, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_rodex_request_zeny) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result);
-typedef void (*HPMHOOK_post_clif_rodex_request_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result);
+typedef void (*HPMHOOK_pre_clif_rodex_request_zeny) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_zeny *result);
+typedef void (*HPMHOOK_post_clif_rodex_request_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_zeny result);
typedef void (*HPMHOOK_pre_clif_pRodexRequestItems) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pRodexRequestItems) (int fd, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_rodex_request_items) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result);
-typedef void (*HPMHOOK_post_clif_rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result);
+typedef void (*HPMHOOK_pre_clif_rodex_request_items) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_items *result);
+typedef void (*HPMHOOK_post_clif_rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_items result);
typedef void (*HPMHOOK_pre_clif_rodex_icon) (int *fd, bool *show);
typedef void (*HPMHOOK_post_clif_rodex_icon) (int fd, bool show);
typedef void (*HPMHOOK_pre_clif_skill_scale) (struct block_list **bl, int *src_id, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *casttime);
@@ -6676,8 +6678,8 @@ typedef void (*HPMHOOK_post_script_run_item_unequip_script) (struct map_session_
#ifdef MAP_SEARCHSTORE_H /* searchstore */
typedef bool (*HPMHOOK_pre_searchstore_open) (struct map_session_data **sd, unsigned int *uses, unsigned short *effect);
typedef bool (*HPMHOOK_post_searchstore_open) (bool retVal___, struct map_session_data *sd, unsigned int uses, unsigned short effect);
-typedef void (*HPMHOOK_pre_searchstore_query) (struct map_session_data **sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short **itemlist, unsigned int *item_count, const unsigned short **cardlist, unsigned int *card_count);
-typedef void (*HPMHOOK_post_searchstore_query) (struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const unsigned short *itemlist, unsigned int item_count, const unsigned short *cardlist, unsigned int card_count);
+typedef void (*HPMHOOK_pre_searchstore_query) (struct map_session_data **sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const uint32 **itemlist, unsigned int *item_count, const uint32 **cardlist, unsigned int *card_count);
+typedef void (*HPMHOOK_post_searchstore_query) (struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const uint32 *itemlist, unsigned int item_count, const uint32 *cardlist, unsigned int card_count);
typedef bool (*HPMHOOK_pre_searchstore_querynext) (struct map_session_data **sd);
typedef bool (*HPMHOOK_post_searchstore_querynext) (bool retVal___, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_searchstore_next) (struct map_session_data **sd);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 94e86df4d..61779b200 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -626,8 +626,6 @@ struct {
struct HPMHookPoint *HP_clif_useitemack_post;
struct HPMHookPoint *HP_clif_addcards_pre;
struct HPMHookPoint *HP_clif_addcards_post;
- struct HPMHookPoint *HP_clif_addcards2_pre;
- struct HPMHookPoint *HP_clif_addcards2_post;
struct HPMHookPoint *HP_clif_item_sub_pre;
struct HPMHookPoint *HP_clif_item_sub_post;
struct HPMHookPoint *HP_clif_getareachar_item_pre;
@@ -636,6 +634,8 @@ struct {
struct HPMHookPoint *HP_clif_cart_additem_ack_post;
struct HPMHookPoint *HP_clif_cashshop_load_pre;
struct HPMHookPoint *HP_clif_cashshop_load_post;
+ struct HPMHookPoint *HP_clif_cashShopSchedule_pre;
+ struct HPMHookPoint *HP_clif_cashShopSchedule_post;
struct HPMHookPoint *HP_clif_package_announce_pre;
struct HPMHookPoint *HP_clif_package_announce_post;
struct HPMHookPoint *HP_clif_item_drop_announce_pre;
@@ -1100,6 +1100,8 @@ struct {
struct HPMHookPoint *HP_clif_buyvending_post;
struct HPMHookPoint *HP_clif_openvending_pre;
struct HPMHookPoint *HP_clif_openvending_post;
+ struct HPMHookPoint *HP_clif_openvendingAck_pre;
+ struct HPMHookPoint *HP_clif_openvendingAck_post;
struct HPMHookPoint *HP_clif_vendingreport_pre;
struct HPMHookPoint *HP_clif_vendingreport_post;
struct HPMHookPoint *HP_clif_storagelist_pre;
@@ -7015,8 +7017,6 @@ struct {
int HP_clif_useitemack_post;
int HP_clif_addcards_pre;
int HP_clif_addcards_post;
- int HP_clif_addcards2_pre;
- int HP_clif_addcards2_post;
int HP_clif_item_sub_pre;
int HP_clif_item_sub_post;
int HP_clif_getareachar_item_pre;
@@ -7025,6 +7025,8 @@ struct {
int HP_clif_cart_additem_ack_post;
int HP_clif_cashshop_load_pre;
int HP_clif_cashshop_load_post;
+ int HP_clif_cashShopSchedule_pre;
+ int HP_clif_cashShopSchedule_post;
int HP_clif_package_announce_pre;
int HP_clif_package_announce_post;
int HP_clif_item_drop_announce_pre;
@@ -7489,6 +7491,8 @@ struct {
int HP_clif_buyvending_post;
int HP_clif_openvending_pre;
int HP_clif_openvending_post;
+ int HP_clif_openvendingAck_pre;
+ int HP_clif_openvendingAck_post;
int HP_clif_vendingreport_pre;
int HP_clif_vendingreport_post;
int HP_clif_storagelist_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 9135ed08d..55ac7d531 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -336,11 +336,11 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->unequipitemack, HP_clif_unequipitemack) },
{ HP_POP(clif->useitemack, HP_clif_useitemack) },
{ HP_POP(clif->addcards, HP_clif_addcards) },
- { HP_POP(clif->addcards2, HP_clif_addcards2) },
{ HP_POP(clif->item_sub, HP_clif_item_sub) },
{ HP_POP(clif->getareachar_item, HP_clif_getareachar_item) },
{ HP_POP(clif->cart_additem_ack, HP_clif_cart_additem_ack) },
{ HP_POP(clif->cashshop_load, HP_clif_cashshop_load) },
+ { HP_POP(clif->cashShopSchedule, HP_clif_cashShopSchedule) },
{ HP_POP(clif->package_announce, HP_clif_package_announce) },
{ HP_POP(clif->item_drop_announce, HP_clif_item_drop_announce) },
{ HP_POP(clif->clearunit_single, HP_clif_clearunit_single) },
@@ -573,6 +573,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->vendinglist, HP_clif_vendinglist) },
{ HP_POP(clif->buyvending, HP_clif_buyvending) },
{ HP_POP(clif->openvending, HP_clif_openvending) },
+ { HP_POP(clif->openvendingAck, HP_clif_openvendingAck) },
{ HP_POP(clif->vendingreport, HP_clif_vendingreport) },
{ HP_POP(clif->storagelist, HP_clif_storagelist) },
{ HP_POP(clif->updatestorageamount, HP_clif_updatestorageamount) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index c055c6c09..2439f5342 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -3526,10 +3526,10 @@ bool HP_buyingstore_setup(struct map_session_data *sd, unsigned char slots) {
}
return retVal___;
}
-void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const uint8 *itemlist, unsigned int count) {
+void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub *itemlist, unsigned int count) {
int hIndex = 0;
if (HPMHooks.count.HP_buyingstore_create_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int *zenylimit, unsigned char *result, const char **storename, const uint8 **itemlist, unsigned int *count);
+ void (*preHookFunc) (struct map_session_data **sd, int *zenylimit, unsigned char *result, const char **storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub **itemlist, unsigned int *count);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_create_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_buyingstore_create_pre[hIndex].func;
@@ -3544,7 +3544,7 @@ void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned
HPMHooks.source.buyingstore.create(sd, zenylimit, result, storename, itemlist, count);
}
if (HPMHooks.count.HP_buyingstore_create_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const uint8 *itemlist, unsigned int count);
+ void (*postHookFunc) (struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub *itemlist, unsigned int count);
for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_create_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_buyingstore_create_post[hIndex].func;
postHookFunc(sd, zenylimit, result, storename, itemlist, count);
@@ -3604,10 +3604,10 @@ void HP_buyingstore_open(struct map_session_data *sd, int account_id) {
}
return;
}
-void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned int buyer_id, const uint8 *itemlist, unsigned int count) {
+void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned int buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub *itemlist, unsigned int count) {
int hIndex = 0;
if (HPMHooks.count.HP_buyingstore_trade_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int *account_id, unsigned int *buyer_id, const uint8 **itemlist, unsigned int *count);
+ void (*preHookFunc) (struct map_session_data **sd, int *account_id, unsigned int *buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub **itemlist, unsigned int *count);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_trade_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_buyingstore_trade_pre[hIndex].func;
@@ -3622,7 +3622,7 @@ void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned
HPMHooks.source.buyingstore.trade(sd, account_id, buyer_id, itemlist, count);
}
if (HPMHooks.count.HP_buyingstore_trade_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int account_id, unsigned int buyer_id, const uint8 *itemlist, unsigned int count);
+ void (*postHookFunc) (struct map_session_data *sd, int account_id, unsigned int buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub *itemlist, unsigned int count);
for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_trade_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_buyingstore_trade_post[hIndex].func;
postHookFunc(sd, account_id, buyer_id, itemlist, count);
@@ -8094,10 +8094,10 @@ void HP_clif_useitemack(struct map_session_data *sd, int index, int amount, bool
}
return;
}
-void HP_clif_addcards(unsigned char *buf, struct item *item) {
+void HP_clif_addcards(struct EQUIPSLOTINFO *buf, struct item *item) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_addcards_pre > 0) {
- void (*preHookFunc) (unsigned char **buf, struct item **item);
+ void (*preHookFunc) (struct EQUIPSLOTINFO **buf, struct item **item);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_addcards_pre[hIndex].func;
@@ -8112,7 +8112,7 @@ void HP_clif_addcards(unsigned char *buf, struct item *item) {
HPMHooks.source.clif.addcards(buf, item);
}
if (HPMHooks.count.HP_clif_addcards_post > 0) {
- void (*postHookFunc) (unsigned char *buf, struct item *item);
+ void (*postHookFunc) (struct EQUIPSLOTINFO *buf, struct item *item);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_addcards_post[hIndex].func;
postHookFunc(buf, item);
@@ -8120,32 +8120,6 @@ void HP_clif_addcards(unsigned char *buf, struct item *item) {
}
return;
}
-void HP_clif_addcards2(unsigned short *cards, struct item *item) {
- int hIndex = 0;
- if (HPMHooks.count.HP_clif_addcards2_pre > 0) {
- void (*preHookFunc) (unsigned short **cards, struct item **item);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_addcards2_pre[hIndex].func;
- preHookFunc(&cards, &item);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.addcards2(cards, item);
- }
- if (HPMHooks.count.HP_clif_addcards2_post > 0) {
- void (*postHookFunc) (unsigned short *cards, struct item *item);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_addcards2_post[hIndex].func;
- postHookFunc(cards, item);
- }
- }
- return;
-}
void HP_clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data *id, int equip) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_item_sub_pre > 0) {
@@ -8250,6 +8224,32 @@ void HP_clif_cashshop_load(void) {
}
return;
}
+void HP_clif_cashShopSchedule(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_cashShopSchedule_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopSchedule_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_cashShopSchedule_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cashShopSchedule(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_cashShopSchedule_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopSchedule_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_cashShopSchedule_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
void HP_clif_package_announce(struct map_session_data *sd, unsigned short nameid, unsigned short containerid) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_package_announce_pre > 0) {
@@ -10225,14 +10225,14 @@ void HP_clif_skillcastcancel(struct block_list *bl) {
}
return;
}
-void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype) {
+void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype, uint32 item_id) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_skill_fail_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype);
+ void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype, uint32 *item_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_fail_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_skill_fail_pre[hIndex].func;
- preHookFunc(&sd, &skill_id, &cause, &btype);
+ preHookFunc(&sd, &skill_id, &cause, &btype, &item_id);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -10240,13 +10240,13 @@ void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum usesk
}
}
{
- HPMHooks.source.clif.skill_fail(sd, skill_id, cause, btype);
+ HPMHooks.source.clif.skill_fail(sd, skill_id, cause, btype, item_id);
}
if (HPMHooks.count.HP_clif_skill_fail_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype);
+ void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype, uint32 item_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_fail_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_skill_fail_post[hIndex].func;
- postHookFunc(sd, skill_id, cause, btype);
+ postHookFunc(sd, skill_id, cause, btype, item_id);
}
}
return;
@@ -14326,6 +14326,32 @@ void HP_clif_openvending(struct map_session_data *sd, int id, struct s_vending *
}
return;
}
+void HP_clif_openvendingAck(int fd, int result) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_openvendingAck_pre > 0) {
+ void (*preHookFunc) (int *fd, int *result);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_openvendingAck_pre[hIndex].func;
+ preHookFunc(&fd, &result);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.openvendingAck(fd, result);
+ }
+ if (HPMHooks.count.HP_clif_openvendingAck_post > 0) {
+ void (*postHookFunc) (int fd, int result);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_openvendingAck_post[hIndex].func;
+ postHookFunc(fd, result);
+ }
+ }
+ return;
+}
void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_vendingreport_pre > 0) {
@@ -25420,10 +25446,10 @@ void HP_clif_pRodexAddItem(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 amount, int8 result) {
+void HP_clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 amount, enum rodex_add_item result) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_rodex_add_item_result_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount, int8 *result);
+ void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount, enum rodex_add_item *result);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_add_item_result_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_rodex_add_item_result_pre[hIndex].func;
@@ -25438,7 +25464,7 @@ void HP_clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16
HPMHooks.source.clif.rodex_add_item_result(sd, idx, amount, result);
}
if (HPMHooks.count.HP_clif_rodex_add_item_result_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount, int8 result);
+ void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount, enum rodex_add_item result);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_add_item_result_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_rodex_add_item_result_post[hIndex].func;
postHookFunc(sd, idx, amount, result);
@@ -25940,10 +25966,10 @@ void HP_clif_pRodexRequestZeny(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result) {
+void HP_clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_zeny result) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_rodex_request_zeny_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result);
+ void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_zeny *result);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_zeny_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_rodex_request_zeny_pre[hIndex].func;
@@ -25958,7 +25984,7 @@ void HP_clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int6
HPMHooks.source.clif.rodex_request_zeny(sd, opentype, mail_id, result);
}
if (HPMHooks.count.HP_clif_rodex_request_zeny_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result);
+ void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_zeny result);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_zeny_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_rodex_request_zeny_post[hIndex].func;
postHookFunc(sd, opentype, mail_id, result);
@@ -25992,10 +26018,10 @@ void HP_clif_pRodexRequestItems(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result) {
+void HP_clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_items result) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_rodex_request_items_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result);
+ void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_items *result);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_items_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_rodex_request_items_pre[hIndex].func;
@@ -26010,7 +26036,7 @@ void HP_clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int
HPMHooks.source.clif.rodex_request_items(sd, opentype, mail_id, result);
}
if (HPMHooks.count.HP_clif_rodex_request_items_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result);
+ void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_items result);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_items_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_rodex_request_items_post[hIndex].func;
postHookFunc(sd, opentype, mail_id, result);
@@ -69749,10 +69775,10 @@ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigne
}
return retVal___;
}
-void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const unsigned short *itemlist, unsigned int item_count, const unsigned short *cardlist, unsigned int card_count) {
+void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const uint32 *itemlist, unsigned int item_count, const uint32 *cardlist, unsigned int card_count) {
int hIndex = 0;
if (HPMHooks.count.HP_searchstore_query_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short **itemlist, unsigned int *item_count, const unsigned short **cardlist, unsigned int *card_count);
+ void (*preHookFunc) (struct map_session_data **sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const uint32 **itemlist, unsigned int *item_count, const uint32 **cardlist, unsigned int *card_count);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_searchstore_query_pre[hIndex].func;
@@ -69767,7 +69793,7 @@ void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsig
HPMHooks.source.searchstore.query(sd, type, min_price, max_price, itemlist, item_count, cardlist, card_count);
}
if (HPMHooks.count.HP_searchstore_query_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const unsigned short *itemlist, unsigned int item_count, const unsigned short *cardlist, unsigned int card_count);
+ void (*postHookFunc) (struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const uint32 *itemlist, unsigned int item_count, const uint32 *cardlist, unsigned int card_count);
for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_searchstore_query_post[hIndex].func;
postHookFunc(sd, type, min_price, max_price, itemlist, item_count, cardlist, card_count);