From ce52b50c244e9223c398b70575616e88414446ce Mon Sep 17 00:00:00 2001 From: "Hercules.ws" Date: Mon, 25 Jun 2018 20:43:34 +0200 Subject: HPM Hooks Update Signed-off-by: HerculesWSAPI --- src/plugins/HPMHooking/HPMHooking.Defs.inc | 4 ++-- src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 7c609f0bf..9ae123779 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -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 bd2ef870f..a74fc4edb 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -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; -- cgit v1.2.3-70-g09d2