diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-05-09 02:38:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-06-02 00:23:24 +0300 |
commit | 0d5238bba6552616921f22d484f6b707d0abe6fe (patch) | |
tree | a8dfc1f4d1af12237e059e57043430d27ce67946 /src/plugins/HPMHooking | |
parent | 441470decb97f738ea4c854cbf5138e8eeac2bb4 (diff) | |
download | hercules-0d5238bba6552616921f22d484f6b707d0abe6fe.tar.gz hercules-0d5238bba6552616921f22d484f6b707d0abe6fe.tar.bz2 hercules-0d5238bba6552616921f22d484f6b707d0abe6fe.tar.xz hercules-0d5238bba6552616921f22d484f6b707d0abe6fe.zip |
Update HPM
Diffstat (limited to 'src/plugins/HPMHooking')
4 files changed, 40 insertions, 7 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index d8bf3fae9..e70e64123 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -1300,8 +1300,10 @@ typedef void (*HPMHOOK_pre_clif_update_rankingpoint) (struct map_session_data ** typedef void (*HPMHOOK_post_clif_update_rankingpoint) (struct map_session_data *sd, enum fame_list_type type, int points); typedef void (*HPMHOOK_pre_clif_pRanklist) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRanklist) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_hotkeys) (struct map_session_data **sd); -typedef void (*HPMHOOK_post_clif_hotkeys) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_hotkeys) (struct map_session_data **sd, int *tab); +typedef void (*HPMHOOK_post_clif_hotkeys) (struct map_session_data *sd, int tab); +typedef void (*HPMHOOK_pre_clif_hotkeysAll) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_hotkeysAll) (struct map_session_data *sd); typedef int (*HPMHOOK_pre_clif_insight) (struct block_list **bl, va_list ap); typedef int (*HPMHOOK_post_clif_insight) (int retVal___, struct block_list *bl, va_list ap); typedef int (*HPMHOOK_pre_clif_outsight) (struct block_list **bl, va_list ap); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 1044b7592..4fb306d00 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -892,6 +892,8 @@ struct { struct HPMHookPoint *HP_clif_pRanklist_post; struct HPMHookPoint *HP_clif_hotkeys_pre; struct HPMHookPoint *HP_clif_hotkeys_post; + struct HPMHookPoint *HP_clif_hotkeysAll_pre; + struct HPMHookPoint *HP_clif_hotkeysAll_post; struct HPMHookPoint *HP_clif_insight_pre; struct HPMHookPoint *HP_clif_insight_post; struct HPMHookPoint *HP_clif_outsight_pre; @@ -7673,6 +7675,8 @@ struct { int HP_clif_pRanklist_post; int HP_clif_hotkeys_pre; int HP_clif_hotkeys_post; + int HP_clif_hotkeysAll_pre; + int HP_clif_hotkeysAll_post; int HP_clif_insight_pre; int HP_clif_insight_post; int HP_clif_outsight_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index a817b2023..00867e4ac 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -470,6 +470,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->update_rankingpoint, HP_clif_update_rankingpoint) }, { HP_POP(clif->pRanklist, HP_clif_pRanklist) }, { HP_POP(clif->hotkeys, HP_clif_hotkeys) }, + { HP_POP(clif->hotkeysAll, HP_clif_hotkeysAll) }, { HP_POP(clif->insight, HP_clif_insight) }, { HP_POP(clif->outsight, HP_clif_outsight) }, { HP_POP(clif->skillcastcancel, HP_clif_skillcastcancel) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 9636d67c7..fb738a81f 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -11591,14 +11591,14 @@ void HP_clif_pRanklist(int fd, struct map_session_data *sd) { } return; } -void HP_clif_hotkeys(struct map_session_data *sd) { +void HP_clif_hotkeys(struct map_session_data *sd, int tab) { int hIndex = 0; if (HPMHooks.count.HP_clif_hotkeys_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd); + void (*preHookFunc) (struct map_session_data **sd, int *tab); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_hotkeys_pre[hIndex].func; - preHookFunc(&sd); + preHookFunc(&sd, &tab); } if (*HPMforce_return) { *HPMforce_return = false; @@ -11606,12 +11606,38 @@ void HP_clif_hotkeys(struct map_session_data *sd) { } } { - HPMHooks.source.clif.hotkeys(sd); + HPMHooks.source.clif.hotkeys(sd, tab); } if (HPMHooks.count.HP_clif_hotkeys_post > 0) { - void (*postHookFunc) (struct map_session_data *sd); + void (*postHookFunc) (struct map_session_data *sd, int tab); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_hotkeys_post[hIndex].func; + postHookFunc(sd, tab); + } + } + return; +} +void HP_clif_hotkeysAll(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_hotkeysAll_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeysAll_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_hotkeysAll_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.hotkeysAll(sd); + } + if (HPMHooks.count.HP_clif_hotkeysAll_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeysAll_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_hotkeysAll_post[hIndex].func; postHookFunc(sd); } } |