diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking.c | 2 | ||||
-rw-r--r-- | src/plugins/HPMHooking.h | 10 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 186 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc | 16 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 118 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 214 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 55 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 1544 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.sources.inc | 2 | ||||
-rw-r--r-- | src/plugins/sample.c | 23 |
11 files changed, 1960 insertions, 214 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.h b/src/plugins/HPMHooking.h index 44970863c..f94dccac4 100644 --- a/src/plugins/HPMHooking.h +++ b/src/plugins/HPMHooking.h @@ -50,11 +50,21 @@ HPExport struct HPMHooking_interface HPMHooking_s; HPMi->hooking->AddHook(HOOK_TYPE_PRE, #ifname "->" #funcname, (hook), HPMi->pid) \ ) +#define addHookPrePriv(ifname, funcname, hook) ( \ + (void)((HPMHOOK_pre_PRIV__ ## ifname ## _ ## funcname)0 == (hook)), \ + HPMi->hooking->AddHook(HOOK_TYPE_PRE, #ifname "->p->" #funcname, (hook), HPMi->pid) \ + ) + #define addHookPost(ifname, funcname, hook) ( \ (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \ HPMi->hooking->AddHook(HOOK_TYPE_POST, #ifname "->" #funcname, (hook), HPMi->pid) \ ) +#define addHookPostPriv(ifname, funcname, hook) ( \ + (void)((HPMHOOK_post_PRIV__ ## ifname ## _ ## funcname)0 == (hook)), \ + HPMi->hooking->AddHook(HOOK_TYPE_POST, #ifname "->p->" #funcname, (hook), HPMi->pid) \ + ) + /* need better names ;/ */ /* will not run the original function after pre-hook processing is complete (other hooks will run) */ #define hookStop() (HPMi->hooking->HookStop(__func__,HPMi->pid)) diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index c1016d19b..920f81ca5 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -1380,6 +1380,30 @@ typedef void (*HPMHOOK_pre_clif_changed_dir) (struct block_list **bl, enum send_ typedef void (*HPMHOOK_post_clif_changed_dir) (struct block_list *bl, enum send_target target); typedef void (*HPMHOOK_pre_clif_blname_ack) (int *fd, struct block_list **bl); typedef void (*HPMHOOK_post_clif_blname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_pcname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_pcname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_homname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_homname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mername_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mername_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_petname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_petname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_npcname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_npcname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_guardian_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_guardian_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_additional_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_additional_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_normal_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_normal_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_chatname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_chatname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_elemname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_elemname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_unknownname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_unknownname_ack) (int fd, struct block_list *bl); typedef void (*HPMHOOK_pre_clif_monster_hp_bar) (struct mob_data **md, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_monster_hp_bar) (struct mob_data *md, struct map_session_data *sd); typedef int (*HPMHOOK_pre_clif_hpmeter) (struct map_session_data **sd); @@ -1566,6 +1590,8 @@ typedef void (*HPMHOOK_pre_clif_addchat) (struct chat_data **cd, struct map_sess typedef void (*HPMHOOK_post_clif_addchat) (struct chat_data *cd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_changechatowner) (struct chat_data **cd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_changechatowner) (struct chat_data *cd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_chatRoleChange) (struct chat_data **cd, struct map_session_data **sd, struct block_list **bl, int *isNotOwner); +typedef void (*HPMHOOK_post_clif_chatRoleChange) (struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner); typedef void (*HPMHOOK_pre_clif_clearchat) (struct chat_data **cd, int *fd); typedef void (*HPMHOOK_post_clif_clearchat) (struct chat_data *cd, int fd); typedef void (*HPMHOOK_pre_clif_leavechat) (struct chat_data **cd, struct map_session_data **sd, bool *flag); @@ -2024,6 +2050,8 @@ typedef bool (*HPMHOOK_pre_clif_parse_roulette_db) (void); typedef bool (*HPMHOOK_post_clif_parse_roulette_db) (bool retVal___); typedef void (*HPMHOOK_pre_clif_roulette_generate_ack) (struct map_session_data **sd, enum GENERATE_ROULETTE_ACK *result, short *stage, short *prizeIdx, int *bonusItemID); typedef void (*HPMHOOK_post_clif_roulette_generate_ack) (struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID); +typedef void (*HPMHOOK_pre_clif_roulette_close) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_roulette_close) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_openmergeitem) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_openmergeitem) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_cancelmergeitem) (int *fd, struct map_session_data **sd); @@ -2032,6 +2060,8 @@ typedef int (*HPMHOOK_pre_clif_comparemergeitem) (const void **a, const void **b typedef int (*HPMHOOK_post_clif_comparemergeitem) (int retVal___, const void *a, const void *b); typedef void (*HPMHOOK_pre_clif_ackmergeitems) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_ackmergeitems) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_mergeitems) (int *fd, struct map_session_data **sd, int *index, int *amount, enum mergeitem_reason *reason); +typedef void (*HPMHOOK_post_clif_mergeitems) (int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason); typedef bool (*HPMHOOK_pre_clif_isdisguised) (struct block_list **bl); typedef bool (*HPMHOOK_post_clif_isdisguised) (bool retVal___, struct block_list *bl); typedef void (*HPMHOOK_pre_clif_navigate_to) (struct map_session_data **sd, const char **mapname, uint16 *x, uint16 *y, uint8 *flag, bool *hideWindow, uint16 *mob_id); @@ -2476,6 +2506,8 @@ typedef void (*HPMHOOK_pre_clif_pPartyTick) (int *fd, struct map_session_data ** typedef void (*HPMHOOK_post_clif_pPartyTick) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pGuildInvite2) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pGuildInvite2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_cashShopBuyAck) (int *fd, struct map_session_data **sd, int *itemId, enum CASH_SHOP_BUY_RESULT *result); +typedef void (*HPMHOOK_post_clif_cashShopBuyAck) (int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result); typedef void (*HPMHOOK_pre_clif_pPartyBookingAddFilter) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pPartyBookingAddFilter) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pPartyBookingSubFilter) (int *fd, struct map_session_data **sd); @@ -2666,6 +2698,22 @@ typedef int (*HPMHOOK_pre_clif_pingTimerSub) (struct map_session_data **sd, va_l typedef int (*HPMHOOK_post_clif_pingTimerSub) (int retVal___, struct map_session_data *sd, va_list ap); typedef void (*HPMHOOK_pre_clif_pResetCooldown) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pResetCooldown) (int fd, struct map_session_data *sd); +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); @@ -3532,8 +3580,12 @@ typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **targ typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level); typedef int64 (*HPMHOOK_pre_inter_rodex_savemessage) (struct rodex_message **msg); typedef int64 (*HPMHOOK_post_inter_rodex_savemessage) (int64 retVal___, struct rodex_message *msg); -typedef bool (*HPMHOOK_pre_inter_rodex_updatemail) (int64 *mail_id, int8 *flag); -typedef bool (*HPMHOOK_post_inter_rodex_updatemail) (bool retVal___, int64 mail_id, int8 flag); +typedef bool (*HPMHOOK_pre_inter_rodex_updatemail) (int *fd, int *account_id, int *char_id, int64 *mail_id, uint8 *opentype, int8 *flag); +typedef bool (*HPMHOOK_post_inter_rodex_updatemail) (bool retVal___, int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag); +typedef int64 (*HPMHOOK_pre_inter_rodex_getzeny) (int64 *mail_id); +typedef int64 (*HPMHOOK_post_inter_rodex_getzeny) (int64 retVal___, int64 mail_id); +typedef int (*HPMHOOK_pre_inter_rodex_getitems) (int64 *mail_id, struct rodex_item **items); +typedef int (*HPMHOOK_post_inter_rodex_getitems) (int retVal___, int64 mail_id, struct rodex_item *items); #endif // CHAR_INT_RODEX_H #ifdef CHAR_INT_STORAGE_H /* inter_storage */ typedef int (*HPMHOOK_pre_inter_storage_tosql) (int *account_id, const struct storage_data **p); @@ -3700,12 +3752,16 @@ typedef int (*HPMHOOK_pre_intif_rodex_requestinbox) (int *char_id, int *account_ typedef int (*HPMHOOK_post_intif_rodex_requestinbox) (int retVal___, int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id); typedef int (*HPMHOOK_pre_intif_rodex_checkhasnew) (struct map_session_data **sd); typedef int (*HPMHOOK_post_intif_rodex_checkhasnew) (int retVal___, struct map_session_data *sd); -typedef int (*HPMHOOK_pre_intif_rodex_updatemail) (int64 *mail_id, int8 *flag); -typedef int (*HPMHOOK_post_intif_rodex_updatemail) (int retVal___, int64 mail_id, int8 flag); +typedef int (*HPMHOOK_pre_intif_rodex_updatemail) (struct map_session_data **sd, int64 *mail_id, uint8 *opentype, int8 *flag); +typedef int (*HPMHOOK_post_intif_rodex_updatemail) (int retVal___, struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag); typedef int (*HPMHOOK_pre_intif_rodex_sendmail) (struct rodex_message **msg); typedef int (*HPMHOOK_post_intif_rodex_sendmail) (int retVal___, struct rodex_message *msg); typedef int (*HPMHOOK_pre_intif_rodex_checkname) (struct map_session_data **sd, const char **name); typedef int (*HPMHOOK_post_intif_rodex_checkname) (int retVal___, struct map_session_data *sd, const char *name); +typedef void (*HPMHOOK_pre_intif_pGetZenyAck) (int *fd); +typedef void (*HPMHOOK_post_intif_pGetZenyAck) (int fd); +typedef void (*HPMHOOK_pre_intif_pGetItemsAck) (int *fd); +typedef void (*HPMHOOK_post_intif_pGetItemsAck) (int fd); typedef int (*HPMHOOK_pre_intif_clan_kickoffline) (int *clan_id, int *kick_interval); typedef int (*HPMHOOK_post_intif_clan_kickoffline) (int retVal___, int clan_id, int kick_interval); typedef int (*HPMHOOK_pre_intif_clan_membercount) (int *clan_id, int *kick_interval); @@ -4298,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); @@ -5048,6 +5104,10 @@ typedef void (*HPMHOOK_pre_mapif_parse_rodex_checkname) (int *fd); typedef void (*HPMHOOK_post_mapif_parse_rodex_checkname) (int fd); typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name); typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name); +typedef void (*HPMHOOK_pre_mapif_rodex_getzenyack) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int64 *zeny); +typedef void (*HPMHOOK_post_mapif_rodex_getzenyack) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny); +typedef void (*HPMHOOK_pre_mapif_rodex_getitemsack) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int *count, const struct rodex_item **items); +typedef void (*HPMHOOK_post_mapif_rodex_getitemsack) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items); typedef int (*HPMHOOK_pre_mapif_load_guild_storage) (int *fd, int *account_id, int *guild_id, char *flag); typedef int (*HPMHOOK_post_mapif_load_guild_storage) (int retVal___, int fd, int account_id, int guild_id, char flag); typedef int (*HPMHOOK_pre_mapif_save_guild_storage_ack) (int *fd, int *account_id, int *guild_id, int *fail); @@ -5324,8 +5384,10 @@ typedef int (*HPMHOOK_pre_mob_ai_lazy) (int *tid, int64 *tick, int *id, intptr_t typedef int (*HPMHOOK_post_mob_ai_lazy) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef int (*HPMHOOK_pre_mob_ai_hard) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_mob_ai_hard) (int retVal___, int tid, int64 tick, int id, intptr_t data); -typedef struct item_drop* (*HPMHOOK_pre_mob_setdropitem) (int *nameid, int *qty, struct item_data **data); -typedef struct item_drop* (*HPMHOOK_post_mob_setdropitem) (struct item_drop* retVal___, int nameid, int qty, struct item_data *data); +typedef void (*HPMHOOK_pre_mob_setdropitem_options) (struct item **item, struct optdrop_group **options); +typedef void (*HPMHOOK_post_mob_setdropitem_options) (struct item *item, struct optdrop_group *options); +typedef struct item_drop* (*HPMHOOK_pre_mob_setdropitem) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data); +typedef struct item_drop* (*HPMHOOK_post_mob_setdropitem) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, int qty, struct item_data *data); typedef struct item_drop* (*HPMHOOK_pre_mob_setlootitem) (struct item **item); typedef struct item_drop* (*HPMHOOK_post_mob_setlootitem) (struct item_drop* retVal___, struct item *item); typedef int (*HPMHOOK_pre_mob_delay_item_drop) (int *tid, int64 *tick, int *id, intptr_t *data); @@ -5390,6 +5452,14 @@ typedef unsigned int (*HPMHOOK_pre_mob_drop_adjust) (int *baserate, int *rate_ad typedef unsigned int (*HPMHOOK_post_mob_drop_adjust) (unsigned int retVal___, int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max); typedef void (*HPMHOOK_pre_mob_item_dropratio_adjust) (int *nameid, int *mob_id, int **rate_adjust); typedef void (*HPMHOOK_post_mob_item_dropratio_adjust) (int nameid, int mob_id, int *rate_adjust); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_option) (struct config_setting_t **option, struct optdrop_group_optslot **entry, int **idx, bool **calc_rate, int *slot, const char **group); +typedef bool (*HPMHOOK_post_mob_read_optdrops_option) (bool retVal___, struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_optslot) (struct config_setting_t **optslot, int *n, int *group_id, const char **group); +typedef bool (*HPMHOOK_post_mob_read_optdrops_optslot) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_group) (struct config_setting_t **group, int *n); +typedef bool (*HPMHOOK_post_mob_read_optdrops_group) (bool retVal___, struct config_setting_t *group, int n); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_db) (void); +typedef bool (*HPMHOOK_post_mob_read_optdrops_db) (bool retVal___); typedef void (*HPMHOOK_pre_mob_readdb) (void); typedef void (*HPMHOOK_post_mob_readdb) (void); typedef bool (*HPMHOOK_pre_mob_lookup_const) (const struct config_setting_t **it, const char **name, int **value); @@ -5410,6 +5480,8 @@ typedef void (*HPMHOOK_pre_mob_read_db_mvpdrops_sub) (struct mob_db **entry, str typedef void (*HPMHOOK_post_mob_read_db_mvpdrops_sub) (struct mob_db *entry, struct config_setting_t *t); typedef uint32 (*HPMHOOK_pre_mob_read_db_mode_sub) (struct mob_db **entry, struct config_setting_t **t); typedef uint32 (*HPMHOOK_post_mob_read_db_mode_sub) (uint32 retVal___, struct mob_db *entry, struct config_setting_t *t); +typedef struct optdrop_group* (*HPMHOOK_pre_mob_read_db_drops_option) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate); +typedef struct optdrop_group* (*HPMHOOK_post_mob_read_db_drops_option) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate); typedef void (*HPMHOOK_pre_mob_read_db_stats_sub) (struct mob_db **entry, struct config_setting_t **t); typedef void (*HPMHOOK_post_mob_read_db_stats_sub) (struct mob_db *entry, struct config_setting_t *t); typedef void (*HPMHOOK_pre_mob_name_constants) (void); @@ -5440,6 +5512,8 @@ typedef int (*HPMHOOK_pre_mob_final_ratio_sub) (union DBKey *key, struct DBData typedef int (*HPMHOOK_post_mob_final_ratio_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef void (*HPMHOOK_pre_mob_destroy_mob_db) (int *index); typedef void (*HPMHOOK_post_mob_destroy_mob_db) (int index); +typedef void (*HPMHOOK_pre_mob_destroy_drop_groups) (void); +typedef void (*HPMHOOK_post_mob_destroy_drop_groups) (void); typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig) (const char **filename, bool *ignore_missing); typedef bool (*HPMHOOK_post_mob_skill_db_libconfig) (bool retVal___, const char *filename, bool ignore_missing); typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig_sub) (struct config_setting_t **it, int *n); @@ -6555,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); @@ -6608,6 +6716,10 @@ typedef void (*HPMHOOK_pre_rodex_delete_mail) (struct map_session_data **sd, int typedef void (*HPMHOOK_post_rodex_delete_mail) (struct map_session_data *sd, int64 mail_id); typedef void (*HPMHOOK_pre_rodex_clean) (struct map_session_data **sd, int8 *flag); typedef void (*HPMHOOK_post_rodex_clean) (struct map_session_data *sd, int8 flag); +typedef void (*HPMHOOK_pre_rodex_getZenyAck) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int64 *zeny); +typedef void (*HPMHOOK_post_rodex_getZenyAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny); +typedef void (*HPMHOOK_pre_rodex_getItemsAck) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int *count, const struct rodex_item **items); +typedef void (*HPMHOOK_post_rodex_getItemsAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items); #endif // MAP_RODEX_H #ifdef MAP_SCRIPT_H /* script */ typedef void (*HPMHOOK_pre_script_init) (bool *minimal); @@ -6998,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); @@ -7636,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); @@ -7774,10 +7884,10 @@ typedef defType (*HPMHOOK_pre_status_calc_mdef) (struct block_list **bl, struct typedef defType (*HPMHOOK_post_status_calc_mdef) (defType retVal___, struct block_list *bl, struct status_change *sc, int mdef, bool viewable); typedef short (*HPMHOOK_pre_status_calc_mdef2) (struct block_list **bl, struct status_change **sc, int *mdef2, bool *viewable); typedef short (*HPMHOOK_post_status_calc_mdef2) (short retVal___, struct block_list *bl, struct status_change *sc, int mdef2, bool viewable); -typedef unsigned short (*HPMHOOK_pre_status_calc_batk) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); -typedef unsigned short (*HPMHOOK_post_status_calc_batk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable); -typedef unsigned short (*HPMHOOK_pre_status_base_matk) (struct block_list **bl, const struct status_data **st, int *level); -typedef unsigned short (*HPMHOOK_post_status_base_matk) (unsigned short retVal___, struct block_list *bl, const struct status_data *st, int level); +typedef int (*HPMHOOK_pre_status_calc_batk) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); +typedef int (*HPMHOOK_post_status_calc_batk) (int retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable); +typedef int (*HPMHOOK_pre_status_base_matk) (struct block_list **bl, const struct status_data **st, int *level); +typedef int (*HPMHOOK_post_status_base_matk) (int retVal___, struct block_list *bl, const struct status_data *st, int level); typedef int (*HPMHOOK_pre_status_get_weapon_atk) (struct block_list **src, struct weapon_atk **watk, int *flag); typedef int (*HPMHOOK_post_status_get_weapon_atk) (int retVal___, struct block_list *src, struct weapon_atk *watk, int flag); typedef int (*HPMHOOK_pre_status_get_total_mdef) (struct block_list **src); @@ -7796,8 +7906,8 @@ typedef void (*HPMHOOK_pre_status_initDummyData) (void); typedef void (*HPMHOOK_post_status_initDummyData) (void); typedef int (*HPMHOOK_pre_status_base_amotion_pc) (struct map_session_data **sd, struct status_data **st); typedef int (*HPMHOOK_post_status_base_amotion_pc) (int retVal___, struct map_session_data *sd, struct status_data *st); -typedef unsigned short (*HPMHOOK_pre_status_base_atk) (const struct block_list **bl, const struct status_data **st); -typedef unsigned short (*HPMHOOK_post_status_base_atk) (unsigned short retVal___, const struct block_list *bl, const struct status_data *st); +typedef int (*HPMHOOK_pre_status_base_atk) (const struct block_list **bl, const struct status_data **st); +typedef int (*HPMHOOK_post_status_base_atk) (int retVal___, const struct block_list *bl, const struct status_data *st); typedef unsigned int (*HPMHOOK_pre_status_get_base_maxhp) (const struct map_session_data **sd, const struct status_data **st); typedef unsigned int (*HPMHOOK_post_status_get_base_maxhp) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); typedef unsigned int (*HPMHOOK_pre_status_get_base_maxsp) (const struct map_session_data **sd, const struct status_data **st); @@ -7820,18 +7930,18 @@ typedef unsigned short (*HPMHOOK_pre_status_calc_dex) (struct block_list **bl, s typedef unsigned short (*HPMHOOK_post_status_calc_dex) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int dex); typedef unsigned short (*HPMHOOK_pre_status_calc_luk) (struct block_list **bl, struct status_change **sc, int *luk); typedef unsigned short (*HPMHOOK_post_status_calc_luk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int luk); -typedef unsigned short (*HPMHOOK_pre_status_calc_watk) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable); -typedef unsigned short (*HPMHOOK_post_status_calc_watk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable); -typedef unsigned short (*HPMHOOK_pre_status_calc_matk) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable); -typedef unsigned short (*HPMHOOK_post_status_calc_matk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable); -typedef signed short (*HPMHOOK_pre_status_calc_hit) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable); -typedef signed short (*HPMHOOK_post_status_calc_hit) (signed short retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable); -typedef signed short (*HPMHOOK_pre_status_calc_critical) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable); -typedef signed short (*HPMHOOK_post_status_calc_critical) (signed short retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable); -typedef signed short (*HPMHOOK_pre_status_calc_flee) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable); -typedef signed short (*HPMHOOK_post_status_calc_flee) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable); -typedef signed short (*HPMHOOK_pre_status_calc_flee2) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable); -typedef signed short (*HPMHOOK_post_status_calc_flee2) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable); +typedef int (*HPMHOOK_pre_status_calc_watk) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable); +typedef int (*HPMHOOK_post_status_calc_watk) (int retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable); +typedef int (*HPMHOOK_pre_status_calc_matk) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable); +typedef int (*HPMHOOK_post_status_calc_matk) (int retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_hit) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_hit) (signed int retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_critical) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_critical) (signed int retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_flee) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_flee) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_flee2) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_flee2) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable); typedef unsigned short (*HPMHOOK_pre_status_calc_speed) (struct block_list **bl, struct status_change **sc, int *speed); typedef unsigned short (*HPMHOOK_post_status_calc_speed) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int speed); typedef short (*HPMHOOK_pre_status_calc_aspd_rate) (struct block_list **bl, struct status_change **sc, int *aspd_rate); @@ -7852,8 +7962,8 @@ typedef unsigned char (*HPMHOOK_pre_status_calc_element_lv) (struct block_list * typedef unsigned char (*HPMHOOK_post_status_calc_element_lv) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int lv); typedef uint32 (*HPMHOOK_pre_status_calc_mode) (const struct block_list **bl, const struct status_change **sc, uint32 *mode); typedef uint32 (*HPMHOOK_post_status_calc_mode) (uint32 retVal___, const struct block_list *bl, const struct status_change *sc, uint32 mode); -typedef unsigned short (*HPMHOOK_pre_status_calc_ematk) (struct block_list **bl, struct status_change **sc, int *matk); -typedef unsigned short (*HPMHOOK_post_status_calc_ematk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk); +typedef int (*HPMHOOK_pre_status_calc_ematk) (struct block_list **bl, struct status_change **sc, int *matk); +typedef int (*HPMHOOK_post_status_calc_ematk) (int retVal___, struct block_list *bl, struct status_change *sc, int matk); typedef void (*HPMHOOK_pre_status_calc_bl_main) (struct block_list **bl, int *flag); typedef void (*HPMHOOK_post_status_calc_bl_main) (struct block_list *bl, int flag); typedef void (*HPMHOOK_pre_status_display_add) (struct map_session_data **sd, enum sc_type *type, int *dval1, int *dval2, int *dval3); @@ -7868,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); @@ -7882,10 +7988,10 @@ typedef void (*HPMHOOK_pre_status_set_sc) (uint16 *skill_id, sc_type *sc, int *i typedef void (*HPMHOOK_post_status_set_sc) (uint16 skill_id, sc_type sc, int icon, unsigned int flag); typedef void (*HPMHOOK_pre_status_copy) (struct status_data **a, const struct status_data **b); typedef void (*HPMHOOK_post_status_copy) (struct status_data *a, const struct status_data *b); -typedef unsigned short (*HPMHOOK_pre_status_base_matk_min) (const struct status_data **st); -typedef unsigned short (*HPMHOOK_post_status_base_matk_min) (unsigned short retVal___, const struct status_data *st); -typedef unsigned short (*HPMHOOK_pre_status_base_matk_max) (const struct status_data **st); -typedef unsigned short (*HPMHOOK_post_status_base_matk_max) (unsigned short retVal___, const struct status_data *st); +typedef int (*HPMHOOK_pre_status_base_matk_min) (const struct status_data **st); +typedef int (*HPMHOOK_post_status_base_matk_min) (int retVal___, const struct status_data *st); +typedef int (*HPMHOOK_pre_status_base_matk_max) (const struct status_data **st); +typedef int (*HPMHOOK_post_status_base_matk_max) (int retVal___, const struct status_data *st); #endif // MAP_STATUS_H #ifdef MAP_STORAGE_H /* storage */ typedef void (*HPMHOOK_pre_storage_reconnect) (void); diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index dbabf8ed4..9302a8d19 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -764,6 +764,10 @@ struct { struct HPMHookPoint *HP_inter_rodex_savemessage_post; struct HPMHookPoint *HP_inter_rodex_updatemail_pre; struct HPMHookPoint *HP_inter_rodex_updatemail_post; + struct HPMHookPoint *HP_inter_rodex_getzeny_pre; + struct HPMHookPoint *HP_inter_rodex_getzeny_post; + struct HPMHookPoint *HP_inter_rodex_getitems_pre; + struct HPMHookPoint *HP_inter_rodex_getitems_post; struct HPMHookPoint *HP_inter_storage_tosql_pre; struct HPMHookPoint *HP_inter_storage_tosql_post; struct HPMHookPoint *HP_inter_storage_fromsql_pre; @@ -1224,6 +1228,10 @@ struct { struct HPMHookPoint *HP_mapif_parse_rodex_checkname_post; struct HPMHookPoint *HP_mapif_rodex_checkname_pre; struct HPMHookPoint *HP_mapif_rodex_checkname_post; + struct HPMHookPoint *HP_mapif_rodex_getzenyack_pre; + struct HPMHookPoint *HP_mapif_rodex_getzenyack_post; + struct HPMHookPoint *HP_mapif_rodex_getitemsack_pre; + struct HPMHookPoint *HP_mapif_rodex_getitemsack_post; struct HPMHookPoint *HP_mapif_load_guild_storage_pre; struct HPMHookPoint *HP_mapif_load_guild_storage_post; struct HPMHookPoint *HP_mapif_save_guild_storage_ack_pre; @@ -2403,6 +2411,10 @@ struct { int HP_inter_rodex_savemessage_post; int HP_inter_rodex_updatemail_pre; int HP_inter_rodex_updatemail_post; + int HP_inter_rodex_getzeny_pre; + int HP_inter_rodex_getzeny_post; + int HP_inter_rodex_getitems_pre; + int HP_inter_rodex_getitems_post; int HP_inter_storage_tosql_pre; int HP_inter_storage_tosql_post; int HP_inter_storage_fromsql_pre; @@ -2863,6 +2875,10 @@ struct { int HP_mapif_parse_rodex_checkname_post; int HP_mapif_rodex_checkname_pre; int HP_mapif_rodex_checkname_post; + int HP_mapif_rodex_getzenyack_pre; + int HP_mapif_rodex_getzenyack_post; + int HP_mapif_rodex_getitemsack_pre; + int HP_mapif_rodex_getitemsack_post; int HP_mapif_load_guild_storage_pre; int HP_mapif_load_guild_storage_post; int HP_mapif_save_guild_storage_ack_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index f666ad1fd..60162c1a8 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -416,6 +416,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_rodex->checkname, HP_inter_rodex_checkname) }, { HP_POP(inter_rodex->savemessage, HP_inter_rodex_savemessage) }, { HP_POP(inter_rodex->updatemail, HP_inter_rodex_updatemail) }, + { HP_POP(inter_rodex->getzeny, HP_inter_rodex_getzeny) }, + { HP_POP(inter_rodex->getitems, HP_inter_rodex_getitems) }, /* inter_storage_interface */ { HP_POP(inter_storage->tosql, HP_inter_storage_tosql) }, { HP_POP(inter_storage->fromsql, HP_inter_storage_fromsql) }, @@ -650,6 +652,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->rodex_send, HP_mapif_rodex_send) }, { HP_POP(mapif->parse_rodex_checkname, HP_mapif_parse_rodex_checkname) }, { HP_POP(mapif->rodex_checkname, HP_mapif_rodex_checkname) }, + { HP_POP(mapif->rodex_getzenyack, HP_mapif_rodex_getzenyack) }, + { HP_POP(mapif->rodex_getitemsack, HP_mapif_rodex_getitemsack) }, { HP_POP(mapif->load_guild_storage, HP_mapif_load_guild_storage) }, { HP_POP(mapif->save_guild_storage_ack, HP_mapif_save_guild_storage_ack) }, { HP_POP(mapif->parse_LoadGuildStorage, HP_mapif_parse_LoadGuildStorage) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index edffe7c11..2b7e25e5d 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -9904,15 +9904,15 @@ int64 HP_inter_rodex_savemessage(struct rodex_message *msg) { } return retVal___; } -bool HP_inter_rodex_updatemail(int64 mail_id, int8 flag) { +bool HP_inter_rodex_updatemail(int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_inter_rodex_updatemail_pre > 0) { - bool (*preHookFunc) (int64 *mail_id, int8 *flag); + bool (*preHookFunc) (int *fd, int *account_id, int *char_id, int64 *mail_id, uint8 *opentype, int8 *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_updatemail_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_rodex_updatemail_pre[hIndex].func; - retVal___ = preHookFunc(&mail_id, &flag); + retVal___ = preHookFunc(&fd, &account_id, &char_id, &mail_id, &opentype, &flag); } if (*HPMforce_return) { *HPMforce_return = false; @@ -9920,13 +9920,67 @@ bool HP_inter_rodex_updatemail(int64 mail_id, int8 flag) { } } { - retVal___ = HPMHooks.source.inter_rodex.updatemail(mail_id, flag); + retVal___ = HPMHooks.source.inter_rodex.updatemail(fd, account_id, char_id, mail_id, opentype, flag); } if (HPMHooks.count.HP_inter_rodex_updatemail_post > 0) { - bool (*postHookFunc) (bool retVal___, int64 mail_id, int8 flag); + bool (*postHookFunc) (bool retVal___, int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_updatemail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_rodex_updatemail_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mail_id, flag); + retVal___ = postHookFunc(retVal___, fd, account_id, char_id, mail_id, opentype, flag); + } + } + return retVal___; +} +int64 HP_inter_rodex_getzeny(int64 mail_id) { + int hIndex = 0; + int64 retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_getzeny_pre > 0) { + int64 (*preHookFunc) (int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getzeny_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_getzeny_pre[hIndex].func; + retVal___ = preHookFunc(&mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.getzeny(mail_id); + } + if (HPMHooks.count.HP_inter_rodex_getzeny_post > 0) { + int64 (*postHookFunc) (int64 retVal___, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getzeny_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_getzeny_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mail_id); + } + } + return retVal___; +} +int HP_inter_rodex_getitems(int64 mail_id, struct rodex_item *items) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_getitems_pre > 0) { + int (*preHookFunc) (int64 *mail_id, struct rodex_item **items); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getitems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_getitems_pre[hIndex].func; + retVal___ = preHookFunc(&mail_id, &items); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.getitems(mail_id, items); + } + if (HPMHooks.count.HP_inter_rodex_getitems_post > 0) { + int (*postHookFunc) (int retVal___, int64 mail_id, struct rodex_item *items); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getitems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_getitems_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mail_id, items); } } return retVal___; @@ -16047,6 +16101,58 @@ void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, int ta } return; } +void HP_mapif_rodex_getzenyack(int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_getzenyack_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int64 *zeny); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getzenyack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_getzenyack_pre[hIndex].func; + preHookFunc(&fd, &char_id, &mail_id, &opentype, &zeny); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_getzenyack(fd, char_id, mail_id, opentype, zeny); + } + if (HPMHooks.count.HP_mapif_rodex_getzenyack_post > 0) { + void (*postHookFunc) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getzenyack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_getzenyack_post[hIndex].func; + postHookFunc(fd, char_id, mail_id, opentype, zeny); + } + } + return; +} +void HP_mapif_rodex_getitemsack(int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_getitemsack_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int *count, const struct rodex_item **items); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getitemsack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_getitemsack_pre[hIndex].func; + preHookFunc(&fd, &char_id, &mail_id, &opentype, &count, &items); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_getitemsack(fd, char_id, mail_id, opentype, count, items); + } + if (HPMHooks.count.HP_mapif_rodex_getitemsack_post > 0) { + void (*postHookFunc) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getitemsack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_getitemsack_post[hIndex].func; + postHookFunc(fd, char_id, mail_id, opentype, count, items); + } + } + return; +} int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) { int hIndex = 0; int retVal___ = 0; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 5648dd267..9c0b1905e 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -970,6 +970,30 @@ struct { struct HPMHookPoint *HP_clif_changed_dir_post; struct HPMHookPoint *HP_clif_blname_ack_pre; struct HPMHookPoint *HP_clif_blname_ack_post; + struct HPMHookPoint *HP_clif_pcname_ack_pre; + struct HPMHookPoint *HP_clif_pcname_ack_post; + struct HPMHookPoint *HP_clif_homname_ack_pre; + struct HPMHookPoint *HP_clif_homname_ack_post; + struct HPMHookPoint *HP_clif_mername_ack_pre; + struct HPMHookPoint *HP_clif_mername_ack_post; + struct HPMHookPoint *HP_clif_petname_ack_pre; + struct HPMHookPoint *HP_clif_petname_ack_post; + struct HPMHookPoint *HP_clif_npcname_ack_pre; + struct HPMHookPoint *HP_clif_npcname_ack_post; + struct HPMHookPoint *HP_clif_mobname_ack_pre; + struct HPMHookPoint *HP_clif_mobname_ack_post; + struct HPMHookPoint *HP_clif_mobname_guardian_ack_pre; + struct HPMHookPoint *HP_clif_mobname_guardian_ack_post; + struct HPMHookPoint *HP_clif_mobname_additional_ack_pre; + struct HPMHookPoint *HP_clif_mobname_additional_ack_post; + struct HPMHookPoint *HP_clif_mobname_normal_ack_pre; + struct HPMHookPoint *HP_clif_mobname_normal_ack_post; + struct HPMHookPoint *HP_clif_chatname_ack_pre; + struct HPMHookPoint *HP_clif_chatname_ack_post; + struct HPMHookPoint *HP_clif_elemname_ack_pre; + struct HPMHookPoint *HP_clif_elemname_ack_post; + struct HPMHookPoint *HP_clif_unknownname_ack_pre; + struct HPMHookPoint *HP_clif_unknownname_ack_post; struct HPMHookPoint *HP_clif_monster_hp_bar_pre; struct HPMHookPoint *HP_clif_monster_hp_bar_post; struct HPMHookPoint *HP_clif_hpmeter_pre; @@ -1156,6 +1180,8 @@ struct { struct HPMHookPoint *HP_clif_addchat_post; struct HPMHookPoint *HP_clif_changechatowner_pre; struct HPMHookPoint *HP_clif_changechatowner_post; + struct HPMHookPoint *HP_clif_chatRoleChange_pre; + struct HPMHookPoint *HP_clif_chatRoleChange_post; struct HPMHookPoint *HP_clif_clearchat_pre; struct HPMHookPoint *HP_clif_clearchat_post; struct HPMHookPoint *HP_clif_leavechat_pre; @@ -1614,6 +1640,8 @@ struct { struct HPMHookPoint *HP_clif_parse_roulette_db_post; struct HPMHookPoint *HP_clif_roulette_generate_ack_pre; struct HPMHookPoint *HP_clif_roulette_generate_ack_post; + struct HPMHookPoint *HP_clif_roulette_close_pre; + struct HPMHookPoint *HP_clif_roulette_close_post; struct HPMHookPoint *HP_clif_openmergeitem_pre; struct HPMHookPoint *HP_clif_openmergeitem_post; struct HPMHookPoint *HP_clif_cancelmergeitem_pre; @@ -1622,6 +1650,8 @@ struct { struct HPMHookPoint *HP_clif_comparemergeitem_post; struct HPMHookPoint *HP_clif_ackmergeitems_pre; struct HPMHookPoint *HP_clif_ackmergeitems_post; + struct HPMHookPoint *HP_clif_mergeitems_pre; + struct HPMHookPoint *HP_clif_mergeitems_post; struct HPMHookPoint *HP_clif_isdisguised_pre; struct HPMHookPoint *HP_clif_isdisguised_post; struct HPMHookPoint *HP_clif_navigate_to_pre; @@ -2066,6 +2096,8 @@ struct { struct HPMHookPoint *HP_clif_pPartyTick_post; struct HPMHookPoint *HP_clif_pGuildInvite2_pre; struct HPMHookPoint *HP_clif_pGuildInvite2_post; + struct HPMHookPoint *HP_clif_cashShopBuyAck_pre; + struct HPMHookPoint *HP_clif_cashShopBuyAck_post; struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_pre; struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_post; struct HPMHookPoint *HP_clif_pPartyBookingSubFilter_pre; @@ -2256,6 +2288,22 @@ struct { struct HPMHookPoint *HP_clif_pingTimerSub_post; struct HPMHookPoint *HP_clif_pResetCooldown_pre; struct HPMHookPoint *HP_clif_pResetCooldown_post; + struct HPMHookPoint *HP_clif_loadConfirm_pre; + 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; @@ -2900,6 +2948,10 @@ struct { struct HPMHookPoint *HP_intif_rodex_sendmail_post; struct HPMHookPoint *HP_intif_rodex_checkname_pre; struct HPMHookPoint *HP_intif_rodex_checkname_post; + struct HPMHookPoint *HP_intif_pGetZenyAck_pre; + struct HPMHookPoint *HP_intif_pGetZenyAck_post; + struct HPMHookPoint *HP_intif_pGetItemsAck_pre; + struct HPMHookPoint *HP_intif_pGetItemsAck_post; struct HPMHookPoint *HP_intif_clan_kickoffline_pre; struct HPMHookPoint *HP_intif_clan_kickoffline_post; struct HPMHookPoint *HP_intif_clan_membercount_pre; @@ -3900,6 +3952,8 @@ struct { struct HPMHookPoint *HP_mob_ai_lazy_post; struct HPMHookPoint *HP_mob_ai_hard_pre; struct HPMHookPoint *HP_mob_ai_hard_post; + struct HPMHookPoint *HP_mob_setdropitem_options_pre; + struct HPMHookPoint *HP_mob_setdropitem_options_post; struct HPMHookPoint *HP_mob_setdropitem_pre; struct HPMHookPoint *HP_mob_setdropitem_post; struct HPMHookPoint *HP_mob_setlootitem_pre; @@ -3966,6 +4020,14 @@ struct { struct HPMHookPoint *HP_mob_drop_adjust_post; struct HPMHookPoint *HP_mob_item_dropratio_adjust_pre; struct HPMHookPoint *HP_mob_item_dropratio_adjust_post; + struct HPMHookPoint *HP_mob_read_optdrops_option_pre; + struct HPMHookPoint *HP_mob_read_optdrops_option_post; + struct HPMHookPoint *HP_mob_read_optdrops_optslot_pre; + struct HPMHookPoint *HP_mob_read_optdrops_optslot_post; + struct HPMHookPoint *HP_mob_read_optdrops_group_pre; + struct HPMHookPoint *HP_mob_read_optdrops_group_post; + struct HPMHookPoint *HP_mob_read_optdrops_db_pre; + struct HPMHookPoint *HP_mob_read_optdrops_db_post; struct HPMHookPoint *HP_mob_readdb_pre; struct HPMHookPoint *HP_mob_readdb_post; struct HPMHookPoint *HP_mob_lookup_const_pre; @@ -3986,6 +4048,8 @@ struct { struct HPMHookPoint *HP_mob_read_db_mvpdrops_sub_post; struct HPMHookPoint *HP_mob_read_db_mode_sub_pre; struct HPMHookPoint *HP_mob_read_db_mode_sub_post; + struct HPMHookPoint *HP_mob_read_db_drops_option_pre; + struct HPMHookPoint *HP_mob_read_db_drops_option_post; struct HPMHookPoint *HP_mob_read_db_stats_sub_pre; struct HPMHookPoint *HP_mob_read_db_stats_sub_post; struct HPMHookPoint *HP_mob_name_constants_pre; @@ -4016,6 +4080,8 @@ struct { struct HPMHookPoint *HP_mob_final_ratio_sub_post; struct HPMHookPoint *HP_mob_destroy_mob_db_pre; struct HPMHookPoint *HP_mob_destroy_mob_db_post; + struct HPMHookPoint *HP_mob_destroy_drop_groups_pre; + struct HPMHookPoint *HP_mob_destroy_drop_groups_post; struct HPMHookPoint *HP_mob_skill_db_libconfig_pre; struct HPMHookPoint *HP_mob_skill_db_libconfig_post; struct HPMHookPoint *HP_mob_skill_db_libconfig_sub_pre; @@ -5072,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; @@ -5122,6 +5218,10 @@ struct { struct HPMHookPoint *HP_rodex_delete_mail_post; struct HPMHookPoint *HP_rodex_clean_pre; struct HPMHookPoint *HP_rodex_clean_post; + struct HPMHookPoint *HP_rodex_getZenyAck_pre; + struct HPMHookPoint *HP_rodex_getZenyAck_post; + struct HPMHookPoint *HP_rodex_getItemsAck_pre; + struct HPMHookPoint *HP_rodex_getItemsAck_post; struct HPMHookPoint *HP_script_init_pre; struct HPMHookPoint *HP_script_init_post; struct HPMHookPoint *HP_script_final_pre; @@ -6136,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; @@ -6368,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; @@ -7657,6 +7751,30 @@ struct { int HP_clif_changed_dir_post; int HP_clif_blname_ack_pre; int HP_clif_blname_ack_post; + int HP_clif_pcname_ack_pre; + int HP_clif_pcname_ack_post; + int HP_clif_homname_ack_pre; + int HP_clif_homname_ack_post; + int HP_clif_mername_ack_pre; + int HP_clif_mername_ack_post; + int HP_clif_petname_ack_pre; + int HP_clif_petname_ack_post; + int HP_clif_npcname_ack_pre; + int HP_clif_npcname_ack_post; + int HP_clif_mobname_ack_pre; + int HP_clif_mobname_ack_post; + int HP_clif_mobname_guardian_ack_pre; + int HP_clif_mobname_guardian_ack_post; + int HP_clif_mobname_additional_ack_pre; + int HP_clif_mobname_additional_ack_post; + int HP_clif_mobname_normal_ack_pre; + int HP_clif_mobname_normal_ack_post; + int HP_clif_chatname_ack_pre; + int HP_clif_chatname_ack_post; + int HP_clif_elemname_ack_pre; + int HP_clif_elemname_ack_post; + int HP_clif_unknownname_ack_pre; + int HP_clif_unknownname_ack_post; int HP_clif_monster_hp_bar_pre; int HP_clif_monster_hp_bar_post; int HP_clif_hpmeter_pre; @@ -7843,6 +7961,8 @@ struct { int HP_clif_addchat_post; int HP_clif_changechatowner_pre; int HP_clif_changechatowner_post; + int HP_clif_chatRoleChange_pre; + int HP_clif_chatRoleChange_post; int HP_clif_clearchat_pre; int HP_clif_clearchat_post; int HP_clif_leavechat_pre; @@ -8301,6 +8421,8 @@ struct { int HP_clif_parse_roulette_db_post; int HP_clif_roulette_generate_ack_pre; int HP_clif_roulette_generate_ack_post; + int HP_clif_roulette_close_pre; + int HP_clif_roulette_close_post; int HP_clif_openmergeitem_pre; int HP_clif_openmergeitem_post; int HP_clif_cancelmergeitem_pre; @@ -8309,6 +8431,8 @@ struct { int HP_clif_comparemergeitem_post; int HP_clif_ackmergeitems_pre; int HP_clif_ackmergeitems_post; + int HP_clif_mergeitems_pre; + int HP_clif_mergeitems_post; int HP_clif_isdisguised_pre; int HP_clif_isdisguised_post; int HP_clif_navigate_to_pre; @@ -8753,6 +8877,8 @@ struct { int HP_clif_pPartyTick_post; int HP_clif_pGuildInvite2_pre; int HP_clif_pGuildInvite2_post; + int HP_clif_cashShopBuyAck_pre; + int HP_clif_cashShopBuyAck_post; int HP_clif_pPartyBookingAddFilter_pre; int HP_clif_pPartyBookingAddFilter_post; int HP_clif_pPartyBookingSubFilter_pre; @@ -8943,6 +9069,22 @@ struct { int HP_clif_pingTimerSub_post; int HP_clif_pResetCooldown_pre; int HP_clif_pResetCooldown_post; + int HP_clif_loadConfirm_pre; + 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; @@ -9587,6 +9729,10 @@ struct { int HP_intif_rodex_sendmail_post; int HP_intif_rodex_checkname_pre; int HP_intif_rodex_checkname_post; + int HP_intif_pGetZenyAck_pre; + int HP_intif_pGetZenyAck_post; + int HP_intif_pGetItemsAck_pre; + int HP_intif_pGetItemsAck_post; int HP_intif_clan_kickoffline_pre; int HP_intif_clan_kickoffline_post; int HP_intif_clan_membercount_pre; @@ -10587,6 +10733,8 @@ struct { int HP_mob_ai_lazy_post; int HP_mob_ai_hard_pre; int HP_mob_ai_hard_post; + int HP_mob_setdropitem_options_pre; + int HP_mob_setdropitem_options_post; int HP_mob_setdropitem_pre; int HP_mob_setdropitem_post; int HP_mob_setlootitem_pre; @@ -10653,6 +10801,14 @@ struct { int HP_mob_drop_adjust_post; int HP_mob_item_dropratio_adjust_pre; int HP_mob_item_dropratio_adjust_post; + int HP_mob_read_optdrops_option_pre; + int HP_mob_read_optdrops_option_post; + int HP_mob_read_optdrops_optslot_pre; + int HP_mob_read_optdrops_optslot_post; + int HP_mob_read_optdrops_group_pre; + int HP_mob_read_optdrops_group_post; + int HP_mob_read_optdrops_db_pre; + int HP_mob_read_optdrops_db_post; int HP_mob_readdb_pre; int HP_mob_readdb_post; int HP_mob_lookup_const_pre; @@ -10673,6 +10829,8 @@ struct { int HP_mob_read_db_mvpdrops_sub_post; int HP_mob_read_db_mode_sub_pre; int HP_mob_read_db_mode_sub_post; + int HP_mob_read_db_drops_option_pre; + int HP_mob_read_db_drops_option_post; int HP_mob_read_db_stats_sub_pre; int HP_mob_read_db_stats_sub_post; int HP_mob_name_constants_pre; @@ -10703,6 +10861,8 @@ struct { int HP_mob_final_ratio_sub_post; int HP_mob_destroy_mob_db_pre; int HP_mob_destroy_mob_db_post; + int HP_mob_destroy_drop_groups_pre; + int HP_mob_destroy_drop_groups_post; int HP_mob_skill_db_libconfig_pre; int HP_mob_skill_db_libconfig_post; int HP_mob_skill_db_libconfig_sub_pre; @@ -11759,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; @@ -11809,6 +11999,10 @@ struct { int HP_rodex_delete_mail_post; int HP_rodex_clean_pre; int HP_rodex_clean_post; + int HP_rodex_getZenyAck_pre; + int HP_rodex_getZenyAck_post; + int HP_rodex_getItemsAck_pre; + int HP_rodex_getItemsAck_post; int HP_script_init_pre; int HP_script_init_post; int HP_script_final_pre; @@ -12823,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; @@ -13055,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; @@ -13448,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 6ab056dfd..6c0b6db36 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -509,6 +509,18 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->mvp_noitem, HP_clif_mvp_noitem) }, { HP_POP(clif->changed_dir, HP_clif_changed_dir) }, { HP_POP(clif->blname_ack, HP_clif_blname_ack) }, + { HP_POP(clif->pcname_ack, HP_clif_pcname_ack) }, + { HP_POP(clif->homname_ack, HP_clif_homname_ack) }, + { HP_POP(clif->mername_ack, HP_clif_mername_ack) }, + { HP_POP(clif->petname_ack, HP_clif_petname_ack) }, + { HP_POP(clif->npcname_ack, HP_clif_npcname_ack) }, + { HP_POP(clif->mobname_ack, HP_clif_mobname_ack) }, + { HP_POP(clif->mobname_guardian_ack, HP_clif_mobname_guardian_ack) }, + { HP_POP(clif->mobname_additional_ack, HP_clif_mobname_additional_ack) }, + { HP_POP(clif->mobname_normal_ack, HP_clif_mobname_normal_ack) }, + { HP_POP(clif->chatname_ack, HP_clif_chatname_ack) }, + { HP_POP(clif->elemname_ack, HP_clif_elemname_ack) }, + { HP_POP(clif->unknownname_ack, HP_clif_unknownname_ack) }, { HP_POP(clif->monster_hp_bar, HP_clif_monster_hp_bar) }, { HP_POP(clif->hpmeter, HP_clif_hpmeter) }, { HP_POP(clif->hpmeter_single, HP_clif_hpmeter_single) }, @@ -602,6 +614,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->joinchatok, HP_clif_joinchatok) }, { HP_POP(clif->addchat, HP_clif_addchat) }, { HP_POP(clif->changechatowner, HP_clif_changechatowner) }, + { HP_POP(clif->chatRoleChange, HP_clif_chatRoleChange) }, { HP_POP(clif->clearchat, HP_clif_clearchat) }, { HP_POP(clif->leavechat, HP_clif_leavechat) }, { HP_POP(clif->changechatstatus, HP_clif_changechatstatus) }, @@ -831,10 +844,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->npc_market_purchase_ack, HP_clif_npc_market_purchase_ack) }, { HP_POP(clif->parse_roulette_db, HP_clif_parse_roulette_db) }, { HP_POP(clif->roulette_generate_ack, HP_clif_roulette_generate_ack) }, + { HP_POP(clif->roulette_close, HP_clif_roulette_close) }, { HP_POP(clif->openmergeitem, HP_clif_openmergeitem) }, { HP_POP(clif->cancelmergeitem, HP_clif_cancelmergeitem) }, { HP_POP(clif->comparemergeitem, HP_clif_comparemergeitem) }, { HP_POP(clif->ackmergeitems, HP_clif_ackmergeitems) }, + { HP_POP(clif->mergeitems, HP_clif_mergeitems) }, { HP_POP(clif->isdisguised, HP_clif_isdisguised) }, { HP_POP(clif->navigate_to, HP_clif_navigate_to) }, { HP_POP(clif->bl_type, HP_clif_bl_type) }, @@ -1057,6 +1072,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pCashShopBuy, HP_clif_pCashShopBuy) }, { HP_POP(clif->pPartyTick, HP_clif_pPartyTick) }, { HP_POP(clif->pGuildInvite2, HP_clif_pGuildInvite2) }, + { HP_POP(clif->cashShopBuyAck, HP_clif_cashShopBuyAck) }, { HP_POP(clif->pPartyBookingAddFilter, HP_clif_pPartyBookingAddFilter) }, { HP_POP(clif->pPartyBookingSubFilter, HP_clif_pPartyBookingSubFilter) }, { HP_POP(clif->pPartyBookingReqVolunteer, HP_clif_pPartyBookingReqVolunteer) }, @@ -1152,6 +1168,14 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pingTimer, HP_clif_pingTimer) }, { HP_POP(clif->pingTimerSub, HP_clif_pingTimerSub) }, { 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) }, @@ -1487,6 +1511,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->rodex_updatemail, HP_intif_rodex_updatemail) }, { HP_POP(intif->rodex_sendmail, HP_intif_rodex_sendmail) }, { HP_POP(intif->rodex_checkname, HP_intif_rodex_checkname) }, + { HP_POP(intif->pGetZenyAck, HP_intif_pGetZenyAck) }, + { HP_POP(intif->pGetItemsAck, HP_intif_pGetItemsAck) }, { HP_POP(intif->clan_kickoffline, HP_intif_clan_kickoffline) }, { HP_POP(intif->clan_membercount, HP_intif_clan_membercount) }, { HP_POP(intif->request_accinfo, HP_intif_request_accinfo) }, @@ -1999,6 +2025,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->ai_sub_lazy, HP_mob_ai_sub_lazy) }, { HP_POP(mob->ai_lazy, HP_mob_ai_lazy) }, { HP_POP(mob->ai_hard, HP_mob_ai_hard) }, + { HP_POP(mob->setdropitem_options, HP_mob_setdropitem_options) }, { HP_POP(mob->setdropitem, HP_mob_setdropitem) }, { HP_POP(mob->setlootitem, HP_mob_setlootitem) }, { HP_POP(mob->delay_item_drop, HP_mob_delay_item_drop) }, @@ -2032,6 +2059,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->clone_delete, HP_mob_clone_delete) }, { HP_POP(mob->drop_adjust, HP_mob_drop_adjust) }, { HP_POP(mob->item_dropratio_adjust, HP_mob_item_dropratio_adjust) }, + { HP_POP(mob->read_optdrops_option, HP_mob_read_optdrops_option) }, + { HP_POP(mob->read_optdrops_optslot, HP_mob_read_optdrops_optslot) }, + { HP_POP(mob->read_optdrops_group, HP_mob_read_optdrops_group) }, + { HP_POP(mob->read_optdrops_db, HP_mob_read_optdrops_db) }, { HP_POP(mob->readdb, HP_mob_readdb) }, { HP_POP(mob->lookup_const, HP_mob_lookup_const) }, { HP_POP(mob->get_const, HP_mob_get_const) }, @@ -2042,6 +2073,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->read_db_drops_sub, HP_mob_read_db_drops_sub) }, { HP_POP(mob->read_db_mvpdrops_sub, HP_mob_read_db_mvpdrops_sub) }, { HP_POP(mob->read_db_mode_sub, HP_mob_read_db_mode_sub) }, + { HP_POP(mob->read_db_drops_option, HP_mob_read_db_drops_option) }, { HP_POP(mob->read_db_stats_sub, HP_mob_read_db_stats_sub) }, { HP_POP(mob->name_constants, HP_mob_name_constants) }, { HP_POP(mob->readdb_mobavail, HP_mob_readdb_mobavail) }, @@ -2057,6 +2089,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->set_item_drop_ratio, HP_mob_set_item_drop_ratio) }, { HP_POP(mob->final_ratio_sub, HP_mob_final_ratio_sub) }, { HP_POP(mob->destroy_mob_db, HP_mob_destroy_mob_db) }, + { HP_POP(mob->destroy_drop_groups, HP_mob_destroy_drop_groups) }, { HP_POP(mob->skill_db_libconfig, HP_mob_skill_db_libconfig) }, { HP_POP(mob->skill_db_libconfig_sub, HP_mob_skill_db_libconfig_sub) }, { HP_POP(mob->skill_db_libconfig_sub_skill, HP_mob_skill_db_libconfig_sub_skill) }, @@ -2597,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) }, @@ -2624,6 +2674,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(rodex->get_items, HP_rodex_get_items) }, { HP_POP(rodex->delete_mail, HP_rodex_delete_mail) }, { HP_POP(rodex->clean, HP_rodex_clean) }, + { HP_POP(rodex->getZenyAck, HP_rodex_getZenyAck) }, + { HP_POP(rodex->getItemsAck, HP_rodex_getItemsAck) }, /* script_interface */ { HP_POP(script->init, HP_script_init) }, { HP_POP(script->final, HP_script_final) }, @@ -3138,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) }, @@ -3254,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 26cf8ef00..9cc986922 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -12645,6 +12645,318 @@ void HP_clif_blname_ack(int fd, struct block_list *bl) { } return; } +void HP_clif_pcname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pcname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pcname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pcname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_pcname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pcname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_homname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_homname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_homname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.homname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_homname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_homname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mername_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mername_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mername_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mername_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mername_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mername_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mername_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mername_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_petname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_petname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_petname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.petname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_petname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_petname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_npcname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_npcname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_npcname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.npcname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_npcname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_npcname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_guardian_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_guardian_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_guardian_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_guardian_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_guardian_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_guardian_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_guardian_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_guardian_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_additional_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_additional_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_additional_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_additional_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_additional_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_additional_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_additional_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_additional_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_normal_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_normal_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_normal_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_normal_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_normal_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_normal_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_normal_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_normal_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_chatname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_chatname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_chatname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chatname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_chatname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_chatname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_elemname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_elemname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_elemname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.elemname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_elemname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_elemname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_unknownname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_unknownname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unknownname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_unknownname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.unknownname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_unknownname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unknownname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_unknownname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} void HP_clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_monster_hp_bar_pre > 0) { @@ -15080,6 +15392,32 @@ void HP_clif_changechatowner(struct chat_data *cd, struct map_session_data *sd) } return; } +void HP_clif_chatRoleChange(struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_chatRoleChange_pre > 0) { + void (*preHookFunc) (struct chat_data **cd, struct map_session_data **sd, struct block_list **bl, int *isNotOwner); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatRoleChange_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_chatRoleChange_pre[hIndex].func; + preHookFunc(&cd, &sd, &bl, &isNotOwner); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chatRoleChange(cd, sd, bl, isNotOwner); + } + if (HPMHooks.count.HP_clif_chatRoleChange_post > 0) { + void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatRoleChange_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_chatRoleChange_post[hIndex].func; + postHookFunc(cd, sd, bl, isNotOwner); + } + } + return; +} void HP_clif_clearchat(struct chat_data *cd, int fd) { int hIndex = 0; if (HPMHooks.count.HP_clif_clearchat_pre > 0) { @@ -21049,6 +21387,32 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, enum GENERATE_RO } return; } +void HP_clif_roulette_close(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_roulette_close_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_close_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_roulette_close_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.roulette_close(sd); + } + if (HPMHooks.count.HP_clif_roulette_close_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_close_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_roulette_close_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} void HP_clif_openmergeitem(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_openmergeitem_pre > 0) { @@ -21154,6 +21518,32 @@ void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) { } return; } +void HP_clif_mergeitems(int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mergeitems_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *index, int *amount, enum mergeitem_reason *reason); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mergeitems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mergeitems_pre[hIndex].func; + preHookFunc(&fd, &sd, &index, &amount, &reason); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mergeitems(fd, sd, index, amount, reason); + } + if (HPMHooks.count.HP_clif_mergeitems_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mergeitems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mergeitems_post[hIndex].func; + postHookFunc(fd, sd, index, amount, reason); + } + } + return; +} bool HP_clif_isdisguised(struct block_list *bl) { int hIndex = 0; bool retVal___ = false; @@ -26928,6 +27318,32 @@ void HP_clif_pGuildInvite2(int fd, struct map_session_data *sd) { } return; } +void HP_clif_cashShopBuyAck(int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cashShopBuyAck_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *itemId, enum CASH_SHOP_BUY_RESULT *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopBuyAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cashShopBuyAck_pre[hIndex].func; + preHookFunc(&fd, &sd, &itemId, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cashShopBuyAck(fd, sd, itemId, result); + } + if (HPMHooks.count.HP_clif_cashShopBuyAck_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopBuyAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cashShopBuyAck_post[hIndex].func; + postHookFunc(fd, sd, itemId, result); + } + } + return; +} void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre > 0) { @@ -29413,6 +29829,214 @@ void HP_clif_pResetCooldown(int fd, struct map_session_data *sd) { } return; } +void HP_clif_loadConfirm(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_loadConfirm_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_loadConfirm_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_loadConfirm_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.loadConfirm(sd); + } + if (HPMHooks.count.HP_clif_loadConfirm_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_loadConfirm_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_loadConfirm_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_send_selforarea(int fd, struct block_list *bl, const void *buf, int len) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_send_selforarea_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl, const void **buf, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_selforarea_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_send_selforarea_pre[hIndex].func; + preHookFunc(&fd, &bl, &buf, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.send_selforarea(fd, bl, buf, len); + } + if (HPMHooks.count.HP_clif_send_selforarea_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl, const void *buf, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_selforarea_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_send_selforarea_post[hIndex].func; + postHookFunc(fd, bl, buf, len); + } + } + 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; @@ -38047,15 +38671,15 @@ int HP_intif_rodex_checkhasnew(struct map_session_data *sd) { } return retVal___; } -int HP_intif_rodex_updatemail(int64 mail_id, int8 flag) { +int HP_intif_rodex_updatemail(struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_intif_rodex_updatemail_pre > 0) { - int (*preHookFunc) (int64 *mail_id, int8 *flag); + int (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, uint8 *opentype, int8 *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_pre[hIndex].func; - retVal___ = preHookFunc(&mail_id, &flag); + retVal___ = preHookFunc(&sd, &mail_id, &opentype, &flag); } if (*HPMforce_return) { *HPMforce_return = false; @@ -38063,13 +38687,13 @@ int HP_intif_rodex_updatemail(int64 mail_id, int8 flag) { } } { - retVal___ = HPMHooks.source.intif.rodex_updatemail(mail_id, flag); + retVal___ = HPMHooks.source.intif.rodex_updatemail(sd, mail_id, opentype, flag); } if (HPMHooks.count.HP_intif_rodex_updatemail_post > 0) { - int (*postHookFunc) (int retVal___, int64 mail_id, int8 flag); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mail_id, flag); + retVal___ = postHookFunc(retVal___, sd, mail_id, opentype, flag); } } return retVal___; @@ -38128,6 +38752,58 @@ int HP_intif_rodex_checkname(struct map_session_data *sd, const char *name) { } return retVal___; } +void HP_intif_pGetZenyAck(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pGetZenyAck_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetZenyAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pGetZenyAck_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGetZenyAck(fd); + } + if (HPMHooks.count.HP_intif_pGetZenyAck_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetZenyAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pGetZenyAck_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_intif_pGetItemsAck(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pGetItemsAck_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetItemsAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pGetItemsAck_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pGetItemsAck(fd); + } + if (HPMHooks.count.HP_intif_pGetItemsAck_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetItemsAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pGetItemsAck_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} int HP_intif_clan_kickoffline(int clan_id, int kick_interval) { int hIndex = 0; int retVal___ = 0; @@ -44758,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; @@ -44774,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___; @@ -51698,15 +52374,41 @@ int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } -struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data) { +void HP_mob_setdropitem_options(struct item *item, struct optdrop_group *options) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_setdropitem_options_pre > 0) { + void (*preHookFunc) (struct item **item, struct optdrop_group **options); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_setdropitem_options_pre[hIndex].func; + preHookFunc(&item, &options); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.setdropitem_options(item, options); + } + if (HPMHooks.count.HP_mob_setdropitem_options_post > 0) { + void (*postHookFunc) (struct item *item, struct optdrop_group *options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_setdropitem_options_post[hIndex].func; + postHookFunc(item, options); + } + } + return; +} +struct item_drop* HP_mob_setdropitem(int nameid, struct optdrop_group *options, int qty, struct item_data *data) { int hIndex = 0; struct item_drop* retVal___ = NULL; if (HPMHooks.count.HP_mob_setdropitem_pre > 0) { - struct item_drop* (*preHookFunc) (int *nameid, int *qty, struct item_data **data); + struct item_drop* (*preHookFunc) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_setdropitem_pre[hIndex].func; - retVal___ = preHookFunc(&nameid, &qty, &data); + retVal___ = preHookFunc(&nameid, &options, &qty, &data); } if (*HPMforce_return) { *HPMforce_return = false; @@ -51714,13 +52416,13 @@ struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data } } { - retVal___ = HPMHooks.source.mob.setdropitem(nameid, qty, data); + retVal___ = HPMHooks.source.mob.setdropitem(nameid, options, qty, data); } if (HPMHooks.count.HP_mob_setdropitem_post > 0) { - struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int nameid, int qty, struct item_data *data); + struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, int qty, struct item_data *data); for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_setdropitem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nameid, qty, data); + retVal___ = postHookFunc(retVal___, nameid, options, qty, data); } } return retVal___; @@ -52613,6 +53315,114 @@ void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) { } return; } +bool HP_mob_read_optdrops_option(struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_option_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **option, struct optdrop_group_optslot **entry, int **idx, bool **calc_rate, int *slot, const char **group); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_option_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_option_pre[hIndex].func; + retVal___ = preHookFunc(&option, &entry, &idx, &calc_rate, &slot, &group); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_option(option, entry, idx, calc_rate, slot, group); + } + if (HPMHooks.count.HP_mob_read_optdrops_option_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_option_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_option_post[hIndex].func; + retVal___ = postHookFunc(retVal___, option, entry, idx, calc_rate, slot, group); + } + } + return retVal___; +} +bool HP_mob_read_optdrops_optslot(struct config_setting_t *optslot, int n, int group_id, const char *group) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_optslot_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **optslot, int *n, int *group_id, const char **group); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_pre[hIndex].func; + retVal___ = preHookFunc(&optslot, &n, &group_id, &group); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_optslot(optslot, n, group_id, group); + } + if (HPMHooks.count.HP_mob_read_optdrops_optslot_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_post[hIndex].func; + retVal___ = postHookFunc(retVal___, optslot, n, group_id, group); + } + } + return retVal___; +} +bool HP_mob_read_optdrops_group(struct config_setting_t *group, int n) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_group_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **group, int *n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_pre[hIndex].func; + retVal___ = preHookFunc(&group, &n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_group(group, n); + } + if (HPMHooks.count.HP_mob_read_optdrops_group_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *group, int n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group, n); + } + } + return retVal___; +} +bool HP_mob_read_optdrops_db(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_db_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_db(); + } + if (HPMHooks.count.HP_mob_read_optdrops_db_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} void HP_mob_readdb(void) { int hIndex = 0; if (HPMHooks.count.HP_mob_readdb_pre > 0) { @@ -52879,6 +53689,33 @@ uint32 HP_mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t *t) } return retVal___; } +struct optdrop_group* HP_mob_read_db_drops_option(struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate) { + int hIndex = 0; + struct optdrop_group* retVal___ = NULL; + if (HPMHooks.count.HP_mob_read_db_drops_option_pre > 0) { + struct optdrop_group* (*preHookFunc) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_pre[hIndex].func; + retVal___ = preHookFunc(&entry, &item_name, &drop, &drop_rate); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_db_drops_option(entry, item_name, drop, drop_rate); + } + if (HPMHooks.count.HP_mob_read_db_drops_option_post > 0) { + struct optdrop_group* (*postHookFunc) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry, item_name, drop, drop_rate); + } + } + return retVal___; +} void HP_mob_read_db_stats_sub(struct mob_db *entry, struct config_setting_t *t) { int hIndex = 0; if (HPMHooks.count.HP_mob_read_db_stats_sub_pre > 0) { @@ -53282,6 +54119,32 @@ void HP_mob_destroy_mob_db(int index) { } return; } +void HP_mob_destroy_drop_groups(void) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_destroy_drop_groups_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.destroy_drop_groups(); + } + if (HPMHooks.count.HP_mob_destroy_drop_groups_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_post[hIndex].func; + postHookFunc(); + } + } + return; +} bool HP_mob_skill_db_libconfig(const char *filename, bool ignore_missing) { int hIndex = 0; bool retVal___ = false; @@ -67558,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; @@ -68218,6 +69485,58 @@ void HP_rodex_clean(struct map_session_data *sd, int8 flag) { } return; } +void HP_rodex_getZenyAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_getZenyAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int64 *zeny); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getZenyAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_getZenyAck_pre[hIndex].func; + preHookFunc(&sd, &mail_id, &opentype, &zeny); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.getZenyAck(sd, mail_id, opentype, zeny); + } + if (HPMHooks.count.HP_rodex_getZenyAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getZenyAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_getZenyAck_post[hIndex].func; + postHookFunc(sd, mail_id, opentype, zeny); + } + } + return; +} +void HP_rodex_getItemsAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_getItemsAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int *count, const struct rodex_item **items); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getItemsAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_getItemsAck_pre[hIndex].func; + preHookFunc(&sd, &mail_id, &opentype, &count, &items); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.getItemsAck(sd, mail_id, opentype, count, items); + } + if (HPMHooks.count.HP_rodex_getItemsAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getItemsAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_getItemsAck_post[hIndex].func; + postHookFunc(sd, mail_id, opentype, count, items); + } + } + return; +} /* script_interface */ void HP_script_init(bool minimal) { int hIndex = 0; @@ -73508,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; @@ -73524,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___; @@ -82094,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; @@ -83953,11 +85245,11 @@ short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int } return retVal___; } -unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) { +int HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_calc_batk_pre > 0) { - unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_batk_pre[hIndex].func; @@ -83972,7 +85264,7 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change * retVal___ = HPMHooks.source.status.calc_batk(bl, sc, batk, viewable); } if (HPMHooks.count.HP_status_calc_batk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable); + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_batk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, batk, viewable); @@ -83980,11 +85272,11 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change * } return retVal___; } -unsigned short HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) { +int HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_base_matk_pre > 0) { - unsigned short (*preHookFunc) (struct block_list **bl, const struct status_data **st, int *level); + int (*preHookFunc) (struct block_list **bl, const struct status_data **st, int *level); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_matk_pre[hIndex].func; @@ -83999,7 +85291,7 @@ unsigned short HP_status_base_matk(struct block_list *bl, const struct status_da retVal___ = HPMHooks.source.status.base_matk(bl, st, level); } if (HPMHooks.count.HP_status_base_matk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, const struct status_data *st, int level); + int (*postHookFunc) (int retVal___, struct block_list *bl, const struct status_data *st, int level); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_base_matk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, st, level); @@ -84247,11 +85539,11 @@ int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *s } return retVal___; } -unsigned short HP_status_base_atk(const struct block_list *bl, const struct status_data *st) { +int HP_status_base_atk(const struct block_list *bl, const struct status_data *st) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_base_atk_pre > 0) { - unsigned short (*preHookFunc) (const struct block_list **bl, const struct status_data **st); + int (*preHookFunc) (const struct block_list **bl, const struct status_data **st); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_atk_pre[hIndex].func; @@ -84266,7 +85558,7 @@ unsigned short HP_status_base_atk(const struct block_list *bl, const struct stat retVal___ = HPMHooks.source.status.base_atk(bl, st); } if (HPMHooks.count.HP_status_base_atk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, const struct block_list *bl, const struct status_data *st); + int (*postHookFunc) (int retVal___, const struct block_list *bl, const struct status_data *st); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_base_atk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, st); @@ -84571,11 +85863,11 @@ unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *s } return retVal___; } -unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) { +int HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_calc_watk_pre > 0) { - unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable); + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_watk_pre[hIndex].func; @@ -84590,7 +85882,7 @@ unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change * retVal___ = HPMHooks.source.status.calc_watk(bl, sc, watk, viewable); } if (HPMHooks.count.HP_status_calc_watk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable); + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_watk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, watk, viewable); @@ -84598,11 +85890,11 @@ unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change * } return retVal___; } -unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) { +int HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_calc_matk_pre > 0) { - unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable); + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_matk_pre[hIndex].func; @@ -84617,7 +85909,7 @@ unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change * retVal___ = HPMHooks.source.status.calc_matk(bl, sc, matk, viewable); } if (HPMHooks.count.HP_status_calc_matk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable); + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_matk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, matk, viewable); @@ -84625,11 +85917,11 @@ unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change * } return retVal___; } -signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) { +signed int HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; + signed int retVal___ = 0; if (HPMHooks.count.HP_status_calc_hit_pre > 0) { - signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable); + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_hit_pre[hIndex].func; @@ -84644,7 +85936,7 @@ signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, retVal___ = HPMHooks.source.status.calc_hit(bl, sc, hit, viewable); } if (HPMHooks.count.HP_status_calc_hit_post > 0) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable); + signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_hit_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, hit, viewable); @@ -84652,11 +85944,11 @@ signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, } return retVal___; } -signed short HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) { +signed int HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; + signed int retVal___ = 0; if (HPMHooks.count.HP_status_calc_critical_pre > 0) { - signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable); + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_critical_pre[hIndex].func; @@ -84671,7 +85963,7 @@ signed short HP_status_calc_critical(struct block_list *bl, struct status_change retVal___ = HPMHooks.source.status.calc_critical(bl, sc, critical, viewable); } if (HPMHooks.count.HP_status_calc_critical_post > 0) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable); + signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_critical_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, critical, viewable); @@ -84679,11 +85971,11 @@ signed short HP_status_calc_critical(struct block_list *bl, struct status_change } return retVal___; } -signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) { +signed int HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; + signed int retVal___ = 0; if (HPMHooks.count.HP_status_calc_flee_pre > 0) { - signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable); + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_flee_pre[hIndex].func; @@ -84698,7 +85990,7 @@ signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc retVal___ = HPMHooks.source.status.calc_flee(bl, sc, flee, viewable); } if (HPMHooks.count.HP_status_calc_flee_post > 0) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable); + signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_flee_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, flee, viewable); @@ -84706,11 +85998,11 @@ signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc } return retVal___; } -signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) { +signed int HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; + signed int retVal___ = 0; if (HPMHooks.count.HP_status_calc_flee2_pre > 0) { - signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable); + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_flee2_pre[hIndex].func; @@ -84725,7 +86017,7 @@ signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *s retVal___ = HPMHooks.source.status.calc_flee2(bl, sc, flee2, viewable); } if (HPMHooks.count.HP_status_calc_flee2_post > 0) { - signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable); + signed int (*postHookFunc) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_flee2_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, flee2, viewable); @@ -85003,11 +86295,11 @@ uint32 HP_status_calc_mode(const struct block_list *bl, const struct status_chan } return retVal___; } -unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) { +int HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_calc_ematk_pre > 0) { - unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk); + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_ematk_pre[hIndex].func; @@ -85022,7 +86314,7 @@ unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change retVal___ = HPMHooks.source.status.calc_ematk(bl, sc, matk); } if (HPMHooks.count.HP_status_calc_ematk_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int matk); + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int matk); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_ematk_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sc, matk); @@ -85222,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; @@ -85407,11 +86645,11 @@ void HP_status_copy(struct status_data *a, const struct status_data *b) { } return; } -unsigned short HP_status_base_matk_min(const struct status_data *st) { +int HP_status_base_matk_min(const struct status_data *st) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_base_matk_min_pre > 0) { - unsigned short (*preHookFunc) (const struct status_data **st); + int (*preHookFunc) (const struct status_data **st); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_matk_min_pre[hIndex].func; @@ -85426,7 +86664,7 @@ unsigned short HP_status_base_matk_min(const struct status_data *st) { retVal___ = HPMHooks.source.status.base_matk_min(st); } if (HPMHooks.count.HP_status_base_matk_min_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st); + int (*postHookFunc) (int retVal___, const struct status_data *st); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_base_matk_min_post[hIndex].func; retVal___ = postHookFunc(retVal___, st); @@ -85434,11 +86672,11 @@ unsigned short HP_status_base_matk_min(const struct status_data *st) { } return retVal___; } -unsigned short HP_status_base_matk_max(const struct status_data *st) { +int HP_status_base_matk_max(const struct status_data *st) { int hIndex = 0; - unsigned short retVal___ = 0; + int retVal___ = 0; if (HPMHooks.count.HP_status_base_matk_max_pre > 0) { - unsigned short (*preHookFunc) (const struct status_data **st); + int (*preHookFunc) (const struct status_data **st); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_matk_max_pre[hIndex].func; @@ -85453,7 +86691,7 @@ unsigned short HP_status_base_matk_max(const struct status_data *st) { retVal___ = HPMHooks.source.status.base_matk_max(st); } if (HPMHooks.count.HP_status_base_matk_max_post > 0) { - unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st); + int (*postHookFunc) (int retVal___, const struct status_data *st); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_base_matk_max_post[hIndex].func; retVal___ = postHookFunc(retVal___, st); 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; diff --git a/src/plugins/sample.c b/src/plugins/sample.c index 7ad6794b3..da29bd837 100644 --- a/src/plugins/sample.c +++ b/src/plugins/sample.c @@ -26,6 +26,8 @@ #include "common/random.h" #include "common/socket.h" #include "common/strlib.h" +#include "login/login.h" +#include "login/lclif.p.h" #include "map/clif.h" #include "map/pc.h" #include "map/script.h" @@ -136,6 +138,19 @@ int my_pc_dropitem_post(int retVal, struct map_session_data *sd, int n, int amou } return 1; } + + /** + * pre-hook for lclif->p->parse_CA_CONNECT_INFO_CHANGED this is a private interface function and while in source it cannot be used + * outside of lclif.c since it's private, plugin can use it and hook to private interface functions if needed + * the pre-hook takes this currently unused packet and show a notice whenver a player sends it + **/ +enum parsefunc_rcode my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre(int *fd, struct login_session_data **sd) __attribute__((nonnull(2))); +enum parsefunc_rcode my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre(int *fd, struct login_session_data **sd) +{ + ShowNotice("Player (AID: %d) has sent CA_CONNECT_INFO_CHANGED packet\n", (*sd)->account_id); + return PACKET_VALID; +} + /* * Key is the setting name in our example it's 'my_setting' while val is the value of it. * this way you can manage more than one setting in one function instead of define multiable ones @@ -212,6 +227,14 @@ HPExport void plugin_init (void) { /* - by checking whether it was successful (retVal value) it allows for the originals conditions to take place */ addHookPost(pc, dropitem, my_pc_dropitem_post); } + + if (SERVER_TYPE == SERVER_TYPE_LOGIN) { + /** + * In this example we add a pre-hook to lclif->p->parse_CA_CONNECT_INFO_CHANGED + * It's similar to nomral hooks except it have it own hooking macros which ends with Priv + **/ + addHookPrePriv(lclif, parse_CA_CONNECT_INFO_CHANGED, my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre); + } } /* triggered when server starts loading, before any server-specific data is set */ HPExport void server_preinit(void) |