diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 30 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 36 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 9 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 257 |
4 files changed, 316 insertions, 16 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index b8aa5ae61..80ba50d73 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -1410,6 +1410,10 @@ 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_skillname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_skillname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_itemname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_itemname_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); @@ -2762,6 +2766,14 @@ typedef void (*HPMHOOK_pre_clif_plapineDdukDdak_ack) (int *fd, struct map_sessio typedef void (*HPMHOOK_post_clif_plapineDdukDdak_ack) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_plapineDdukDdak_close) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_plapineDdukDdak_close) (int fd, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_clif_lapineUpgrade_open) (struct map_session_data **sd, int *item_id); +typedef bool (*HPMHOOK_post_clif_lapineUpgrade_open) (bool retVal___, struct map_session_data *sd, int item_id); +typedef bool (*HPMHOOK_pre_clif_lapineUpgrade_result) (struct map_session_data **sd, enum lapineUpgrade_result *result); +typedef bool (*HPMHOOK_post_clif_lapineUpgrade_result) (bool retVal___, struct map_session_data *sd, enum lapineUpgrade_result result); +typedef void (*HPMHOOK_pre_clif_pLapineUpgrade_close) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pLapineUpgrade_close) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pLapineUpgrade_makeItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pLapineUpgrade_makeItem) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pReqGearOff) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pReqGearOff) (int fd, struct map_session_data *sd); #endif // MAP_CLIF_H @@ -5452,8 +5464,8 @@ typedef struct block_list* (*HPMHOOK_pre_mob_getmasterhpltmaxrate) (struct mob_d typedef struct block_list* (*HPMHOOK_post_mob_getmasterhpltmaxrate) (struct block_list* retVal___, struct mob_data *md, int rate); typedef int (*HPMHOOK_pre_mob_getfriendstatus_sub) (struct block_list **bl, va_list ap); typedef int (*HPMHOOK_post_mob_getfriendstatus_sub) (int retVal___, struct block_list *bl, va_list ap); -typedef struct mob_data* (*HPMHOOK_pre_mob_getfriendstatus) (struct mob_data **md, int *cond1, int *cond2); -typedef struct mob_data* (*HPMHOOK_post_mob_getfriendstatus) (struct mob_data* retVal___, struct mob_data *md, int cond1, int cond2); +typedef struct block_list* (*HPMHOOK_pre_mob_getfriendstatus) (struct mob_data **md, int *cond1, int *cond2); +typedef struct block_list* (*HPMHOOK_post_mob_getfriendstatus) (struct block_list* retVal___, struct mob_data *md, int cond1, int cond2); typedef int (*HPMHOOK_pre_mob_skill_use) (struct mob_data **md, int64 *tick, int *event); typedef int (*HPMHOOK_post_mob_skill_use) (int retVal___, struct mob_data *md, int64 tick, int event); typedef int (*HPMHOOK_pre_mob_skill_event) (struct mob_data **md, struct block_list **src, int64 *tick, int *flag); @@ -6210,6 +6222,10 @@ typedef int (*HPMHOOK_pre_pc_percentheal) (struct map_session_data **sd, int *hp typedef int (*HPMHOOK_post_pc_percentheal) (int retVal___, struct map_session_data *sd, int hp, int sp); typedef int (*HPMHOOK_pre_pc_jobchange) (struct map_session_data **sd, int *class, int *upper); typedef int (*HPMHOOK_post_pc_jobchange) (int retVal___, struct map_session_data *sd, int class, int upper); +typedef void (*HPMHOOK_pre_pc_hide) (struct map_session_data **sd, bool *show_msg); +typedef void (*HPMHOOK_post_pc_hide) (struct map_session_data *sd, bool show_msg); +typedef void (*HPMHOOK_pre_pc_unhide) (struct map_session_data **sd, bool *show_msg); +typedef void (*HPMHOOK_post_pc_unhide) (struct map_session_data *sd, bool show_msg); typedef int (*HPMHOOK_pre_pc_setoption) (struct map_session_data **sd, int *type); typedef int (*HPMHOOK_post_pc_setoption) (int retVal___, struct map_session_data *sd, int type); typedef int (*HPMHOOK_pre_pc_setcart) (struct map_session_data **sd, int *type); @@ -6340,10 +6356,10 @@ typedef void (*HPMHOOK_pre_pc_itemcd_do) (struct map_session_data **sd, bool *lo typedef void (*HPMHOOK_post_pc_itemcd_do) (struct map_session_data *sd, bool load); typedef int (*HPMHOOK_pre_pc_load_combo) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_load_combo) (int retVal___, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_pc_add_charm) (struct map_session_data **sd, int *interval, int *max, int *type); -typedef void (*HPMHOOK_post_pc_add_charm) (struct map_session_data *sd, int interval, int max, int type); -typedef void (*HPMHOOK_pre_pc_del_charm) (struct map_session_data **sd, int *count, int *type); -typedef void (*HPMHOOK_post_pc_del_charm) (struct map_session_data *sd, int count, int type); +typedef void (*HPMHOOK_pre_pc_add_charm) (struct map_session_data **sd, int *interval, int *max, enum spirit_charm_types *type); +typedef void (*HPMHOOK_post_pc_add_charm) (struct map_session_data *sd, int interval, int max, enum spirit_charm_types type); +typedef void (*HPMHOOK_pre_pc_del_charm) (struct map_session_data **sd, int *count, enum spirit_charm_types *type); +typedef void (*HPMHOOK_post_pc_del_charm) (struct map_session_data *sd, int count, enum spirit_charm_types type); typedef void (*HPMHOOK_pre_pc_baselevelchanged) (struct map_session_data **sd); typedef void (*HPMHOOK_post_pc_baselevelchanged) (struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_level_penalty_mod) (int *diff, unsigned char *race, uint32 *mode, int *type); @@ -7668,6 +7684,8 @@ typedef int (*HPMHOOK_pre_skill_check_npc_chaospanic) (struct block_list **bl, v typedef int (*HPMHOOK_post_skill_check_npc_chaospanic) (int retVal___, struct block_list *bl, va_list args); typedef int (*HPMHOOK_pre_skill_count_wos) (struct block_list **bl, va_list ap); typedef int (*HPMHOOK_post_skill_count_wos) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_get_linked_song_dance_id) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_linked_song_dance_id) (int retVal___, int skill_id); #endif // MAP_SKILL_H #ifdef COMMON_SOCKET_H /* sockt */ typedef void (*HPMHOOK_pre_sockt_init) (void); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 109c30885..70bc309f3 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1000,6 +1000,10 @@ struct { 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_skillname_ack_pre; + struct HPMHookPoint *HP_clif_skillname_ack_post; + struct HPMHookPoint *HP_clif_itemname_ack_pre; + struct HPMHookPoint *HP_clif_itemname_ack_post; struct HPMHookPoint *HP_clif_unknownname_ack_pre; struct HPMHookPoint *HP_clif_unknownname_ack_post; struct HPMHookPoint *HP_clif_monster_hp_bar_pre; @@ -2352,6 +2356,14 @@ struct { struct HPMHookPoint *HP_clif_plapineDdukDdak_ack_post; struct HPMHookPoint *HP_clif_plapineDdukDdak_close_pre; struct HPMHookPoint *HP_clif_plapineDdukDdak_close_post; + struct HPMHookPoint *HP_clif_lapineUpgrade_open_pre; + struct HPMHookPoint *HP_clif_lapineUpgrade_open_post; + struct HPMHookPoint *HP_clif_lapineUpgrade_result_pre; + struct HPMHookPoint *HP_clif_lapineUpgrade_result_post; + struct HPMHookPoint *HP_clif_pLapineUpgrade_close_pre; + struct HPMHookPoint *HP_clif_pLapineUpgrade_close_post; + struct HPMHookPoint *HP_clif_pLapineUpgrade_makeItem_pre; + struct HPMHookPoint *HP_clif_pLapineUpgrade_makeItem_post; struct HPMHookPoint *HP_clif_pReqGearOff_pre; struct HPMHookPoint *HP_clif_pReqGearOff_post; struct HPMHookPoint *HP_cmdline_init_pre; @@ -4790,6 +4802,10 @@ struct { struct HPMHookPoint *HP_pc_percentheal_post; struct HPMHookPoint *HP_pc_jobchange_pre; struct HPMHookPoint *HP_pc_jobchange_post; + struct HPMHookPoint *HP_pc_hide_pre; + struct HPMHookPoint *HP_pc_hide_post; + struct HPMHookPoint *HP_pc_unhide_pre; + struct HPMHookPoint *HP_pc_unhide_post; struct HPMHookPoint *HP_pc_setoption_pre; struct HPMHookPoint *HP_pc_setoption_post; struct HPMHookPoint *HP_pc_setcart_pre; @@ -6192,6 +6208,8 @@ struct { struct HPMHookPoint *HP_skill_check_npc_chaospanic_post; struct HPMHookPoint *HP_skill_count_wos_pre; struct HPMHookPoint *HP_skill_count_wos_post; + struct HPMHookPoint *HP_skill_get_linked_song_dance_id_pre; + struct HPMHookPoint *HP_skill_get_linked_song_dance_id_post; struct HPMHookPoint *HP_sockt_init_pre; struct HPMHookPoint *HP_sockt_init_post; struct HPMHookPoint *HP_sockt_final_pre; @@ -7881,6 +7899,10 @@ struct { int HP_clif_chatname_ack_post; int HP_clif_elemname_ack_pre; int HP_clif_elemname_ack_post; + int HP_clif_skillname_ack_pre; + int HP_clif_skillname_ack_post; + int HP_clif_itemname_ack_pre; + int HP_clif_itemname_ack_post; int HP_clif_unknownname_ack_pre; int HP_clif_unknownname_ack_post; int HP_clif_monster_hp_bar_pre; @@ -9233,6 +9255,14 @@ struct { int HP_clif_plapineDdukDdak_ack_post; int HP_clif_plapineDdukDdak_close_pre; int HP_clif_plapineDdukDdak_close_post; + int HP_clif_lapineUpgrade_open_pre; + int HP_clif_lapineUpgrade_open_post; + int HP_clif_lapineUpgrade_result_pre; + int HP_clif_lapineUpgrade_result_post; + int HP_clif_pLapineUpgrade_close_pre; + int HP_clif_pLapineUpgrade_close_post; + int HP_clif_pLapineUpgrade_makeItem_pre; + int HP_clif_pLapineUpgrade_makeItem_post; int HP_clif_pReqGearOff_pre; int HP_clif_pReqGearOff_post; int HP_cmdline_init_pre; @@ -11671,6 +11701,10 @@ struct { int HP_pc_percentheal_post; int HP_pc_jobchange_pre; int HP_pc_jobchange_post; + int HP_pc_hide_pre; + int HP_pc_hide_post; + int HP_pc_unhide_pre; + int HP_pc_unhide_post; int HP_pc_setoption_pre; int HP_pc_setoption_post; int HP_pc_setcart_pre; @@ -13073,6 +13107,8 @@ struct { int HP_skill_check_npc_chaospanic_post; int HP_skill_count_wos_pre; int HP_skill_count_wos_post; + int HP_skill_get_linked_song_dance_id_pre; + int HP_skill_get_linked_song_dance_id_post; int HP_sockt_init_pre; int HP_sockt_init_post; int HP_sockt_final_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index ac30b97d4..c9b673a1f 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -524,6 +524,8 @@ struct HookingPointData HookingPoints[] = { { 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->skillname_ack, HP_clif_skillname_ack) }, + { HP_POP(clif->itemname_ack, HP_clif_itemname_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) }, @@ -1200,6 +1202,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->lapineDdukDdak_result, HP_clif_lapineDdukDdak_result) }, { HP_POP(clif->plapineDdukDdak_ack, HP_clif_plapineDdukDdak_ack) }, { HP_POP(clif->plapineDdukDdak_close, HP_clif_plapineDdukDdak_close) }, + { HP_POP(clif->lapineUpgrade_open, HP_clif_lapineUpgrade_open) }, + { HP_POP(clif->lapineUpgrade_result, HP_clif_lapineUpgrade_result) }, + { HP_POP(clif->pLapineUpgrade_close, HP_clif_pLapineUpgrade_close) }, + { HP_POP(clif->pLapineUpgrade_makeItem, HP_clif_pLapineUpgrade_makeItem) }, { HP_POP(clif->pReqGearOff, HP_clif_pReqGearOff) }, /* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, @@ -2453,6 +2459,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->itemheal, HP_pc_itemheal) }, { HP_POP(pc->percentheal, HP_pc_percentheal) }, { HP_POP(pc->jobchange, HP_pc_jobchange) }, + { HP_POP(pc->hide, HP_pc_hide) }, + { HP_POP(pc->unhide, HP_pc_unhide) }, { HP_POP(pc->setoption, HP_pc_setoption) }, { HP_POP(pc->setcart, HP_pc_setcart) }, { HP_POP(pc->setfalcon, HP_pc_setfalcon) }, @@ -3165,6 +3173,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->splash_target, HP_skill_splash_target) }, { HP_POP(skill->check_npc_chaospanic, HP_skill_check_npc_chaospanic) }, { HP_POP(skill->count_wos, HP_skill_count_wos) }, + { HP_POP(skill->get_linked_song_dance_id, HP_skill_get_linked_song_dance_id) }, /* socket_interface */ { HP_POP(sockt->init, HP_sockt_init) }, { HP_POP(sockt->final, HP_sockt_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 940f96ca2..599cbfdfd 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -13035,6 +13035,58 @@ void HP_clif_elemname_ack(int fd, struct block_list *bl) { } return; } +void HP_clif_skillname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_skillname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_skillname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skillname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_skillname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_skillname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_itemname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_itemname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_itemname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_itemname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.itemname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_itemname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_itemname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_itemname_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) { @@ -30663,6 +30715,112 @@ void HP_clif_plapineDdukDdak_close(int fd, struct map_session_data *sd) { } return; } +bool HP_clif_lapineUpgrade_open(struct map_session_data *sd, int item_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_lapineUpgrade_open_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *item_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineUpgrade_open_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_lapineUpgrade_open_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &item_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.lapineUpgrade_open(sd, item_id); + } + if (HPMHooks.count.HP_clif_lapineUpgrade_open_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int item_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineUpgrade_open_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_lapineUpgrade_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_id); + } + } + return retVal___; +} +bool HP_clif_lapineUpgrade_result(struct map_session_data *sd, enum lapineUpgrade_result result) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_lapineUpgrade_result_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, enum lapineUpgrade_result *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineUpgrade_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_lapineUpgrade_result_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.lapineUpgrade_result(sd, result); + } + if (HPMHooks.count.HP_clif_lapineUpgrade_result_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum lapineUpgrade_result result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineUpgrade_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_lapineUpgrade_result_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, result); + } + } + return retVal___; +} +void HP_clif_pLapineUpgrade_close(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pLapineUpgrade_close_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLapineUpgrade_close_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pLapineUpgrade_close_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pLapineUpgrade_close(fd, sd); + } + if (HPMHooks.count.HP_clif_pLapineUpgrade_close_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLapineUpgrade_close_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pLapineUpgrade_close_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pLapineUpgrade_makeItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pLapineUpgrade_makeItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLapineUpgrade_makeItem_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pLapineUpgrade_makeItem_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pLapineUpgrade_makeItem(fd, sd); + } + if (HPMHooks.count.HP_clif_pLapineUpgrade_makeItem_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLapineUpgrade_makeItem_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pLapineUpgrade_makeItem_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} void HP_clif_pReqGearOff(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_pReqGearOff_pre > 0) { @@ -53703,11 +53861,11 @@ int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) { } return retVal___; } -struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond2) { +struct block_list* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond2) { int hIndex = 0; - struct mob_data* retVal___ = NULL; + struct block_list* retVal___ = NULL; if (HPMHooks.count.HP_mob_getfriendstatus_pre > 0) { - struct mob_data* (*preHookFunc) (struct mob_data **md, int *cond1, int *cond2); + struct block_list* (*preHookFunc) (struct mob_data **md, int *cond1, int *cond2); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_getfriendstatus_pre[hIndex].func; @@ -53722,7 +53880,7 @@ struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond retVal___ = HPMHooks.source.mob.getfriendstatus(md, cond1, cond2); } if (HPMHooks.count.HP_mob_getfriendstatus_post > 0) { - struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct mob_data *md, int cond1, int cond2); + struct block_list* (*postHookFunc) (struct block_list* retVal___, struct mob_data *md, int cond1, int cond2); for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_getfriendstatus_post[hIndex].func; retVal___ = postHookFunc(retVal___, md, cond1, cond2); @@ -63705,6 +63863,58 @@ int HP_pc_jobchange(struct map_session_data *sd, int class, int upper) { } return retVal___; } +void HP_pc_hide(struct map_session_data *sd, bool show_msg) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_hide_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *show_msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_hide_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_hide_pre[hIndex].func; + preHookFunc(&sd, &show_msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.hide(sd, show_msg); + } + if (HPMHooks.count.HP_pc_hide_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, bool show_msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_hide_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_hide_post[hIndex].func; + postHookFunc(sd, show_msg); + } + } + return; +} +void HP_pc_unhide(struct map_session_data *sd, bool show_msg) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_unhide_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *show_msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_unhide_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_unhide_pre[hIndex].func; + preHookFunc(&sd, &show_msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.unhide(sd, show_msg); + } + if (HPMHooks.count.HP_pc_unhide_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, bool show_msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_unhide_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_unhide_post[hIndex].func; + postHookFunc(sd, show_msg); + } + } + return; +} int HP_pc_setoption(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; @@ -65443,10 +65653,10 @@ int HP_pc_load_combo(struct map_session_data *sd) { } return retVal___; } -void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int type) { +void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, enum spirit_charm_types type) { int hIndex = 0; if (HPMHooks.count.HP_pc_add_charm_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int *interval, int *max, int *type); + void (*preHookFunc) (struct map_session_data **sd, int *interval, int *max, enum spirit_charm_types *type); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_add_charm_pre[hIndex].func; @@ -65461,7 +65671,7 @@ void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int typ HPMHooks.source.pc.add_charm(sd, interval, max, type); } if (HPMHooks.count.HP_pc_add_charm_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int interval, int max, int type); + void (*postHookFunc) (struct map_session_data *sd, int interval, int max, enum spirit_charm_types type); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_add_charm_post[hIndex].func; postHookFunc(sd, interval, max, type); @@ -65469,10 +65679,10 @@ void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int typ } return; } -void HP_pc_del_charm(struct map_session_data *sd, int count, int type) { +void HP_pc_del_charm(struct map_session_data *sd, int count, enum spirit_charm_types type) { int hIndex = 0; if (HPMHooks.count.HP_pc_del_charm_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int *count, int *type); + void (*preHookFunc) (struct map_session_data **sd, int *count, enum spirit_charm_types *type); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_del_charm_pre[hIndex].func; @@ -65487,7 +65697,7 @@ void HP_pc_del_charm(struct map_session_data *sd, int count, int type) { HPMHooks.source.pc.del_charm(sd, count, type); } if (HPMHooks.count.HP_pc_del_charm_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int count, int type); + void (*postHookFunc) (struct map_session_data *sd, int count, enum spirit_charm_types type); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_del_charm_post[hIndex].func; postHookFunc(sd, count, type); @@ -82804,6 +83014,33 @@ int HP_skill_count_wos(struct block_list *bl, va_list ap) { } return retVal___; } +int HP_skill_get_linked_song_dance_id(int skill_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_get_linked_song_dance_id_pre > 0) { + int (*preHookFunc) (int *skill_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_linked_song_dance_id_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_get_linked_song_dance_id_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_linked_song_dance_id(skill_id); + } + if (HPMHooks.count.HP_skill_get_linked_song_dance_id_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_linked_song_dance_id_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_get_linked_song_dance_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skill_id); + } + } + return retVal___; +} /* socket_interface */ void HP_sockt_init(void) { int hIndex = 0; |