From 7dbf982616937504586c6552b88b3e0b38e2eb49 Mon Sep 17 00:00:00 2001 From: "Hercules.ws" Date: Fri, 25 Dec 2015 14:09:16 +0100 Subject: HPM Hooks Update Signed-off-by: HerculesWSAPI --- .../HPMHooking/HPMHooking_map.HPMHooksCore.inc | 4 ++++ .../HPMHooking/HPMHooking_map.HookingPoints.inc | 1 + src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 26 ++++++++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 92b2d4bd5..c725cdf4a 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1846,6 +1846,8 @@ struct { struct HPMHookPoint *HP_clif_add_random_options_post; struct HPMHookPoint *HP_clif_pHotkeyRowShift_pre; struct HPMHookPoint *HP_clif_pHotkeyRowShift_post; + struct HPMHookPoint *HP_clif_dressroom_open_pre; + struct HPMHookPoint *HP_clif_dressroom_open_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -7671,6 +7673,8 @@ struct { int HP_clif_add_random_options_post; int HP_clif_pHotkeyRowShift_pre; int HP_clif_pHotkeyRowShift_post; + int HP_clif_dressroom_open_pre; + int HP_clif_dressroom_open_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 4a18d529d..456f2985f 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -943,6 +943,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) }, { HP_POP(clif->add_random_options, HP_clif_add_random_options) }, { HP_POP(clif->pHotkeyRowShift, HP_clif_pHotkeyRowShift) }, + { HP_POP(clif->dressroom_open, HP_clif_dressroom_open) }, /* cmdline */ { 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 8f6ec125b..ad9d96f03 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -24041,6 +24041,32 @@ void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) { } return; } +void HP_clif_dressroom_open(struct map_session_data *sd, int view) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_dressroom_open_pre ) { + void (*preHookFunc) (struct map_session_data *sd, int *view); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_dressroom_open_pre[hIndex].func; + preHookFunc(sd, &view); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.dressroom_open(sd, view); + } + if( HPMHooks.count.HP_clif_dressroom_open_post ) { + void (*postHookFunc) (struct map_session_data *sd, int *view); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_dressroom_open_post[hIndex].func; + postHookFunc(sd, &view); + } + } + return; +} /* cmdline */ void HP_cmdline_init(void) { int hIndex = 0; -- cgit v1.2.3-60-g2f50