diff options
author | Haru <haru@dotalux.com> | 2020-02-09 23:58:26 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2020-02-09 23:58:26 +0100 |
commit | caae14cae60f27594a2dbf4c41076330be1afd5e (patch) | |
tree | 3be31ba3a73295bd3d655d27643a248e9abe60a6 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | 1d0bd5baf6364822e48ba64010a52377c6abb776 (diff) | |
download | hercules-caae14cae60f27594a2dbf4c41076330be1afd5e.tar.gz hercules-caae14cae60f27594a2dbf4c41076330be1afd5e.tar.bz2 hercules-caae14cae60f27594a2dbf4c41076330be1afd5e.tar.xz hercules-caae14cae60f27594a2dbf4c41076330be1afd5e.zip |
HPM Hooks Update
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 78702bedb..b50d86180 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -63360,6 +63360,33 @@ int HP_pc_useitem(struct map_session_data *sd, int n) { } return retVal___; } +int HP_pc_itemskill_clear(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_itemskill_clear_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemskill_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_itemskill_clear_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.itemskill_clear(sd); + } + if (HPMHooks.count.HP_pc_itemskill_clear_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemskill_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_itemskill_clear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; @@ -78137,6 +78164,33 @@ int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) } return retVal___; } +bool HP_skill_is_item_skill(struct map_session_data *sd, int skill_id, int skill_lv) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_skill_is_item_skill_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *skill_lv); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_item_skill_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_is_item_skill_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &skill_id, &skill_lv); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.is_item_skill(sd, skill_id, skill_lv); + } + if (HPMHooks.count.HP_skill_is_item_skill_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int skill_id, int skill_lv); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_item_skill_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_is_item_skill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv); + } + } + return retVal___; +} int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; |