diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 12 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 35 |
2 files changed, 24 insertions, 23 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 8f4f181fb..9ae123779 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -2422,8 +2422,8 @@ typedef time_t (*HPMHOOK_pre_clif_attendance_getendtime) (void); typedef time_t (*HPMHOOK_post_clif_attendance_getendtime) (time_t retVal___); typedef void (*HPMHOOK_pre_clif_pOpenUIRequest) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pOpenUIRequest) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_open_ui) (struct map_session_data **sd, int8 *UIType); -typedef void (*HPMHOOK_post_clif_open_ui) (struct map_session_data *sd, int8 UIType); +typedef void (*HPMHOOK_pre_clif_open_ui) (struct map_session_data **sd, enum cz_ui_types *uiType); +typedef void (*HPMHOOK_post_clif_open_ui) (struct map_session_data *sd, enum cz_ui_types uiType); typedef void (*HPMHOOK_pre_clif_pAttendanceRewardRequest) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pAttendanceRewardRequest) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_ui_action) (struct map_session_data **sd, int32 *UIType, int32 *data); @@ -2448,8 +2448,8 @@ typedef void (*HPMHOOK_pre_clif_pReqStyleChange) (int *fd, struct map_session_da typedef void (*HPMHOOK_post_clif_pReqStyleChange) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_cz_req_style_change_sub) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem); typedef void (*HPMHOOK_post_clif_cz_req_style_change_sub) (struct map_session_data *sd, int type, int16 idx, bool isitem); -typedef void (*HPMHOOK_pre_clif_style_change_response) (struct map_session_data **sd, int8 *flag); -typedef void (*HPMHOOK_post_clif_style_change_response) (struct map_session_data *sd, int8 flag); +typedef void (*HPMHOOK_pre_clif_style_change_response) (struct map_session_data **sd, enum stylist_shop *flag); +typedef void (*HPMHOOK_post_clif_style_change_response) (struct map_session_data *sd, enum stylist_shop flag); #endif // MAP_CLIF_H #ifdef COMMON_CORE_H /* cmdline */ typedef void (*HPMHOOK_pre_cmdline_init) (void); @@ -7102,8 +7102,8 @@ typedef int (*HPMHOOK_pre_skill_check_condition_castbegin_madogear_unknown) (str typedef int (*HPMHOOK_post_skill_check_condition_castbegin_madogear_unknown) (int retVal___, struct status_change *sc, uint16 *skill_id); typedef int (*HPMHOOK_pre_skill_check_condition_castbegin_unknown) (struct status_change **sc, uint16 **skill_id); typedef int (*HPMHOOK_post_skill_check_condition_castbegin_unknown) (int retVal___, struct status_change *sc, uint16 *skill_id); -typedef void (*HPMHOOK_pre_skill_check_condition_castend_unknown) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv); -typedef void (*HPMHOOK_post_skill_check_condition_castend_unknown) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); +typedef bool (*HPMHOOK_pre_skill_check_condition_castend_unknown) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv); +typedef bool (*HPMHOOK_post_skill_check_condition_castend_unknown) (bool retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); typedef bool (*HPMHOOK_pre_skill_get_requirement_off_unknown) (struct status_change **sc, uint16 **skill_id); typedef bool (*HPMHOOK_post_skill_get_requirement_off_unknown) (bool retVal___, struct status_change *sc, uint16 *skill_id); typedef bool (*HPMHOOK_pre_skill_get_requirement_item_unknown) (struct status_change **sc, struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv, uint16 **idx, int **i); diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index d81042493..a74fc4edb 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -26282,14 +26282,14 @@ void HP_clif_pOpenUIRequest(int fd, struct map_session_data *sd) { } return; } -void HP_clif_open_ui(struct map_session_data *sd, int8 UIType) { +void HP_clif_open_ui(struct map_session_data *sd, enum cz_ui_types uiType) { int hIndex = 0; if (HPMHooks.count.HP_clif_open_ui_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int8 *UIType); + void (*preHookFunc) (struct map_session_data **sd, enum cz_ui_types *uiType); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_ui_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_open_ui_pre[hIndex].func; - preHookFunc(&sd, &UIType); + preHookFunc(&sd, &uiType); } if (*HPMforce_return) { *HPMforce_return = false; @@ -26297,13 +26297,13 @@ void HP_clif_open_ui(struct map_session_data *sd, int8 UIType) { } } { - HPMHooks.source.clif.open_ui(sd, UIType); + HPMHooks.source.clif.open_ui(sd, uiType); } if (HPMHooks.count.HP_clif_open_ui_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int8 UIType); + void (*postHookFunc) (struct map_session_data *sd, enum cz_ui_types uiType); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_ui_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_open_ui_post[hIndex].func; - postHookFunc(sd, UIType); + postHookFunc(sd, uiType); } } return; @@ -26623,10 +26623,10 @@ void HP_clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int1 } return; } -void HP_clif_style_change_response(struct map_session_data *sd, int8 flag) { +void HP_clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag) { int hIndex = 0; if (HPMHooks.count.HP_clif_style_change_response_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int8 *flag); + void (*preHookFunc) (struct map_session_data **sd, enum stylist_shop *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_style_change_response_pre[hIndex].func; @@ -26641,7 +26641,7 @@ void HP_clif_style_change_response(struct map_session_data *sd, int8 flag) { HPMHooks.source.clif.style_change_response(sd, flag); } if (HPMHooks.count.HP_clif_style_change_response_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int8 flag); + void (*postHookFunc) (struct map_session_data *sd, enum stylist_shop flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_style_change_response_post[hIndex].func; postHookFunc(sd, flag); @@ -76386,31 +76386,32 @@ int HP_skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 } return retVal___; } -void HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv) { +bool HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv) { int hIndex = 0; + bool retVal___ = false; if (HPMHooks.count.HP_skill_check_condition_castend_unknown_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv); + bool (*preHookFunc) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_pre[hIndex].func; - preHookFunc(&sd, &skill_id, &skill_lv); + retVal___ = preHookFunc(&sd, &skill_id, &skill_lv); } if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.check_condition_castend_unknown(sd, skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.check_condition_castend_unknown(sd, skill_id, skill_lv); } if (HPMHooks.count.HP_skill_check_condition_castend_unknown_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_post[hIndex].func; - postHookFunc(sd, skill_id, skill_lv); + retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv); } } - return; + return retVal___; } bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; |