From 9a712eea333bd44605355beb9c2d431b4bf2f7fc Mon Sep 17 00:00:00 2001 From: Asheraf Date: Wed, 6 Nov 2019 17:18:04 +0100 Subject: HPM Hooks Update --- src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 83 ++++++++++++++++--------- 1 file changed, 55 insertions(+), 28 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 c331d66a9..5c552a9ee 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -11995,14 +11995,14 @@ void HP_clif_combo_delay(struct block_list *bl, int wait) { } return; } -void HP_clif_status_change(struct block_list *bl, int type, int flag, int total_tick, int val1, int val2, int val3) { +void HP_clif_status_change(struct block_list *bl, int relevant_bl, int type, int flag, int total_tick, int val1, int val2, int val3) { int hIndex = 0; if (HPMHooks.count.HP_clif_status_change_pre > 0) { - void (*preHookFunc) (struct block_list **bl, int *type, int *flag, int *total_tick, int *val1, int *val2, int *val3); + void (*preHookFunc) (struct block_list **bl, int *relevant_bl, int *type, int *flag, int *total_tick, int *val1, int *val2, int *val3); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_status_change_pre[hIndex].func; - preHookFunc(&bl, &type, &flag, &total_tick, &val1, &val2, &val3); + preHookFunc(&bl, &relevant_bl, &type, &flag, &total_tick, &val1, &val2, &val3); } if (*HPMforce_return) { *HPMforce_return = false; @@ -12010,25 +12010,25 @@ void HP_clif_status_change(struct block_list *bl, int type, int flag, int total_ } } { - HPMHooks.source.clif.status_change(bl, type, flag, total_tick, val1, val2, val3); + HPMHooks.source.clif.status_change(bl, relevant_bl, type, flag, total_tick, val1, val2, val3); } if (HPMHooks.count.HP_clif_status_change_post > 0) { - void (*postHookFunc) (struct block_list *bl, int type, int flag, int total_tick, int val1, int val2, int val3); + void (*postHookFunc) (struct block_list *bl, int relevant_bl, int type, int flag, int total_tick, int val1, int val2, int val3); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_status_change_post[hIndex].func; - postHookFunc(bl, type, flag, total_tick, val1, val2, val3); + postHookFunc(bl, relevant_bl, type, flag, total_tick, val1, val2, val3); } } return; } -void HP_clif_status_change_sub(struct block_list *bl, int type, int flag, int tick, int total_tick, int val1, int val2, int val3) { +void HP_clif_status_change_sub(struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3) { int hIndex = 0; if (HPMHooks.count.HP_clif_status_change_sub_pre > 0) { - void (*preHookFunc) (struct block_list **bl, int *type, int *flag, int *tick, int *total_tick, int *val1, int *val2, int *val3); + void (*preHookFunc) (struct block_list **bl, int *type, int *relevant_bl, int *flag, int *tick, int *total_tick, int *val1, int *val2, int *val3); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_status_change_sub_pre[hIndex].func; - preHookFunc(&bl, &type, &flag, &tick, &total_tick, &val1, &val2, &val3); + preHookFunc(&bl, &type, &relevant_bl, &flag, &tick, &total_tick, &val1, &val2, &val3); } if (*HPMforce_return) { *HPMforce_return = false; @@ -12036,13 +12036,13 @@ void HP_clif_status_change_sub(struct block_list *bl, int type, int flag, int ti } } { - HPMHooks.source.clif.status_change_sub(bl, type, flag, tick, total_tick, val1, val2, val3); + HPMHooks.source.clif.status_change_sub(bl, type, relevant_bl, flag, tick, total_tick, val1, val2, val3); } if (HPMHooks.count.HP_clif_status_change_sub_post > 0) { - void (*postHookFunc) (struct block_list *bl, int type, int flag, int tick, int total_tick, int val1, int val2, int val3); + void (*postHookFunc) (struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_status_change_sub_post[hIndex].func; - postHookFunc(bl, type, flag, tick, total_tick, val1, val2, val3); + postHookFunc(bl, type, relevant_bl, flag, tick, total_tick, val1, val2, val3); } } return; @@ -84029,14 +84029,14 @@ unsigned int HP_status_sc2scb_flag(sc_type sc) { } return retVal___; } -int HP_status_type2relevant_bl_types(int type) { +int HP_status_get_sc_relevant_bl_types(sc_type type) { int hIndex = 0; int retVal___ = 0; - if (HPMHooks.count.HP_status_type2relevant_bl_types_pre > 0) { - int (*preHookFunc) (int *type); + if (HPMHooks.count.HP_status_get_sc_relevant_bl_types_pre > 0) { + int (*preHookFunc) (sc_type *type); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_relevant_bl_types_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_sc_relevant_bl_types_pre[hIndex].func; retVal___ = preHookFunc(&type); } if (*HPMforce_return) { @@ -84045,12 +84045,12 @@ int HP_status_type2relevant_bl_types(int type) { } } { - retVal___ = HPMHooks.source.status.type2relevant_bl_types(type); + retVal___ = HPMHooks.source.status.get_sc_relevant_bl_types(type); } - if (HPMHooks.count.HP_status_type2relevant_bl_types_post > 0) { - int (*postHookFunc) (int retVal___, int type); - for (hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_post[hIndex].func; + if (HPMHooks.count.HP_status_get_sc_relevant_bl_types_post > 0) { + int (*postHookFunc) (int retVal___, sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_relevant_bl_types_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_sc_relevant_bl_types_post[hIndex].func; retVal___ = postHookFunc(retVal___, type); } } @@ -84083,6 +84083,33 @@ int HP_status_get_sc_type(sc_type idx) { } return retVal___; } +int HP_status_get_sc_icon(sc_type type) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_get_sc_icon_pre > 0) { + int (*preHookFunc) (sc_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_icon_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_sc_icon_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_sc_icon(type); + } + if (HPMHooks.count.HP_status_get_sc_icon_post > 0) { + int (*postHookFunc) (int retVal___, sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_icon_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_sc_icon_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type); + } + } + return retVal___; +} int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp, int64 sp, int walkdelay, int flag) { int hIndex = 0; int retVal___ = 0; @@ -87236,14 +87263,14 @@ void HP_status_read_job_db_sub(int idx, const char *name, struct config_setting_ } return; } -void HP_status_set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) { +void HP_status_set_sc(uint16 skill_id, sc_type sc, unsigned int flag) { int hIndex = 0; if (HPMHooks.count.HP_status_set_sc_pre > 0) { - void (*preHookFunc) (uint16 *skill_id, sc_type *sc, int *icon, unsigned int *flag); + void (*preHookFunc) (uint16 *skill_id, sc_type *sc, unsigned int *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_set_sc_pre[hIndex].func; - preHookFunc(&skill_id, &sc, &icon, &flag); + preHookFunc(&skill_id, &sc, &flag); } if (*HPMforce_return) { *HPMforce_return = false; @@ -87251,13 +87278,13 @@ void HP_status_set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) } } { - HPMHooks.source.status.set_sc(skill_id, sc, icon, flag); + HPMHooks.source.status.set_sc(skill_id, sc, flag); } if (HPMHooks.count.HP_status_set_sc_post > 0) { - void (*postHookFunc) (uint16 skill_id, sc_type sc, int icon, unsigned int flag); + void (*postHookFunc) (uint16 skill_id, sc_type sc, unsigned int flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_set_sc_post[hIndex].func; - postHookFunc(skill_id, sc, icon, flag); + postHookFunc(skill_id, sc, flag); } } return; -- cgit v1.2.3-70-g09d2