diff options
author | Hercules.ws <dev@herc.ws> | 2017-11-18 20:24:28 +0100 |
---|---|---|
committer | HerculesWSAPI <dev@herc.ws> | 2017-11-18 20:24:28 +0100 |
commit | a37d42b8694b455fb3017b8baa72f75cf9f830b7 (patch) | |
tree | efb1dc953d0edc87ab931604d3c338db6884ef37 | |
parent | 66ee4dea37d47af769cc94c8b8ebd2b12699ce7c (diff) | |
download | hercules-a37d42b8694b455fb3017b8baa72f75cf9f830b7.tar.gz hercules-a37d42b8694b455fb3017b8baa72f75cf9f830b7.tar.bz2 hercules-a37d42b8694b455fb3017b8baa72f75cf9f830b7.tar.xz hercules-a37d42b8694b455fb3017b8baa72f75cf9f830b7.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
-rw-r--r-- | src/common/HPMDataCheck.h | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 2 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 26 |
5 files changed, 34 insertions, 0 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index 7480269e5..e8135b6d1 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -574,6 +574,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "PACKET_ZC_MAIL_LIST", sizeof(struct PACKET_ZC_MAIL_LIST), SERVER_TYPE_MAP }, { "PACKET_ZC_NOTIFY_UNREADMAIL", sizeof(struct PACKET_ZC_NOTIFY_UNREADMAIL), SERVER_TYPE_MAP }, { "PACKET_ZC_READ_MAIL", sizeof(struct PACKET_ZC_READ_MAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_SKILL_SCALE", sizeof(struct PACKET_ZC_SKILL_SCALE), SERVER_TYPE_MAP }, { "PACKET_ZC_WRITE_MAIL_RESULT", sizeof(struct PACKET_ZC_WRITE_MAIL_RESULT), SERVER_TYPE_MAP }, { "mail_item", sizeof(struct mail_item), SERVER_TYPE_MAP }, { "maillistinfo", sizeof(struct maillistinfo), SERVER_TYPE_MAP }, diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 021d5fcaa..3948221c8 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -2294,6 +2294,8 @@ typedef void (*HPMHOOK_pre_clif_rodex_request_items) (struct map_session_data ** typedef void (*HPMHOOK_post_clif_rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result); typedef void (*HPMHOOK_pre_clif_rodex_icon) (int *fd, bool *show); typedef void (*HPMHOOK_post_clif_rodex_icon) (int fd, bool show); +typedef void (*HPMHOOK_pre_clif_skill_scale) (struct block_list **bl, int *src_id, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *casttime); +typedef void (*HPMHOOK_post_clif_skill_scale) (struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime); #endif // MAP_CLIF_H #ifdef COMMON_CORE_H /* cmdline */ typedef void (*HPMHOOK_pre_cmdline_init) (void); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 79f185f41..3f5d1096e 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1930,6 +1930,8 @@ struct { struct HPMHookPoint *HP_clif_rodex_request_items_post; struct HPMHookPoint *HP_clif_rodex_icon_pre; struct HPMHookPoint *HP_clif_rodex_icon_post; + struct HPMHookPoint *HP_clif_skill_scale_pre; + struct HPMHookPoint *HP_clif_skill_scale_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -8137,6 +8139,8 @@ struct { int HP_clif_rodex_request_items_post; int HP_clif_rodex_icon_pre; int HP_clif_rodex_icon_post; + int HP_clif_skill_scale_pre; + int HP_clif_skill_scale_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 411f34742..7cc9086ba 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -987,6 +987,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pRodexRequestItems, HP_clif_pRodexRequestItems) }, { HP_POP(clif->rodex_request_items, HP_clif_rodex_request_items) }, { HP_POP(clif->rodex_icon, HP_clif_rodex_icon) }, + { HP_POP(clif->skill_scale, HP_clif_skill_scale) }, /* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 4bff0a6ff..9625d3e52 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -25113,6 +25113,32 @@ void HP_clif_rodex_icon(int fd, bool show) { } return; } +void HP_clif_skill_scale(struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_skill_scale_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *src_id, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *casttime); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_scale_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_skill_scale_pre[hIndex].func; + preHookFunc(&bl, &src_id, &x, &y, &skill_id, &skill_lv, &casttime); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_scale(bl, src_id, x, y, skill_id, skill_lv, casttime); + } + if (HPMHooks.count.HP_clif_skill_scale_post > 0) { + void (*postHookFunc) (struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_scale_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_skill_scale_post[hIndex].func; + postHookFunc(bl, src_id, x, y, skill_id, skill_lv, casttime); + } + } + return; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; |