From 9ae4b5ad26029f8056635a6112828d87dc671184 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 22 Apr 2018 20:57:40 +0200 Subject: HPM Hooks Update Signed-off-by: Haru --- src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 72 +++++++++++++++++++++---- 1 file changed, 63 insertions(+), 9 deletions(-) (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc') diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index d8f515444..7a75f57e2 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -81540,11 +81540,11 @@ int HP_status_percent_change(struct block_list *src, struct block_list *target, } return retVal___; } -int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { +int HP_status_set_hp(struct block_list *bl, unsigned int hp, enum status_heal_flag flag) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_status_set_hp_pre > 0) { - int (*preHookFunc) (struct block_list **bl, unsigned int *hp, int *flag); + int (*preHookFunc) (struct block_list **bl, unsigned int *hp, enum status_heal_flag *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_set_hp_pre[hIndex].func; @@ -81559,7 +81559,7 @@ int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { retVal___ = HPMHooks.source.status.set_hp(bl, hp, flag); } if (HPMHooks.count.HP_status_set_hp_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int hp, int flag); + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int hp, enum status_heal_flag flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_set_hp_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, hp, flag); @@ -81567,11 +81567,11 @@ int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { } return retVal___; } -int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { +int HP_status_set_sp(struct block_list *bl, unsigned int sp, enum status_heal_flag flag) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_status_set_sp_pre > 0) { - int (*preHookFunc) (struct block_list **bl, unsigned int *sp, int *flag); + int (*preHookFunc) (struct block_list **bl, unsigned int *sp, enum status_heal_flag *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_set_sp_pre[hIndex].func; @@ -81586,7 +81586,7 @@ int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { retVal___ = HPMHooks.source.status.set_sp(bl, sp, flag); } if (HPMHooks.count.HP_status_set_sp_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int sp, int flag); + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int sp, enum status_heal_flag flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_set_sp_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sp, flag); @@ -81594,11 +81594,11 @@ int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { } return retVal___; } -int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { +int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, enum status_heal_flag flag) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_status_heal_pre > 0) { - int (*preHookFunc) (struct block_list **bl, int64 *hp, int64 *sp, int *flag); + int (*preHookFunc) (struct block_list **bl, int64 *hp, int64 *sp, enum status_heal_flag *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_heal_pre[hIndex].func; @@ -81613,7 +81613,7 @@ int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { retVal___ = HPMHooks.source.status.heal(bl, hp, sp, flag); } if (HPMHooks.count.HP_status_heal_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int64 hp, int64 sp, int flag); + int (*postHookFunc) (int retVal___, struct block_list *bl, int64 hp, int64 sp, enum status_heal_flag flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_heal_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, hp, sp, flag); @@ -83531,6 +83531,60 @@ unsigned int HP_status_get_base_maxsp(const struct map_session_data *sd, const s } return retVal___; } +unsigned int HP_status_get_restart_hp(const struct map_session_data *sd, const struct status_data *st) { + int hIndex = 0; + unsigned int retVal___ = 0; + if (HPMHooks.count.HP_status_get_restart_hp_pre > 0) { + unsigned int (*preHookFunc) (const struct map_session_data **sd, const struct status_data **st); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_hp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_restart_hp_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &st); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_restart_hp(sd, st); + } + if (HPMHooks.count.HP_status_get_restart_hp_post > 0) { + unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_hp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_restart_hp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); + } + } + return retVal___; +} +unsigned int HP_status_get_restart_sp(const struct map_session_data *sd, const struct status_data *st) { + int hIndex = 0; + unsigned int retVal___ = 0; + if (HPMHooks.count.HP_status_get_restart_sp_pre > 0) { + unsigned int (*preHookFunc) (const struct map_session_data **sd, const struct status_data **st); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_sp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_restart_sp_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &st); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_restart_sp(sd, st); + } + if (HPMHooks.count.HP_status_get_restart_sp_post > 0) { + unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_sp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_restart_sp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); + } + } + return retVal___; +} int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; -- cgit v1.2.3-60-g2f50