diff options
author | Hercules.ws <dev@herc.ws> | 2018-06-25 20:43:34 +0200 |
---|---|---|
committer | HerculesWSAPI <dev@herc.ws> | 2018-06-25 20:43:34 +0200 |
commit | ce52b50c244e9223c398b70575616e88414446ce (patch) | |
tree | 67840980b89dfa403fb9cbd6a40e8e59a5b9898e /src/plugins/HPMHooking | |
parent | 13d0d8cfb5e37e1e4f1842c247844c3fc736c02f (diff) | |
download | hercules-ce52b50c244e9223c398b70575616e88414446ce.tar.gz hercules-ce52b50c244e9223c398b70575616e88414446ce.tar.bz2 hercules-ce52b50c244e9223c398b70575616e88414446ce.tar.xz hercules-ce52b50c244e9223c398b70575616e88414446ce.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 17 |
2 files changed, 11 insertions, 10 deletions
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; |