From 32b33d8408b02ab2d133872de770446c32046fa3 Mon Sep 17 00:00:00 2001 From: "Hercules.ws" Date: Sun, 20 Apr 2014 02:41:13 +0200 Subject: HPM Hooks Update Signed-off-by: HerculesWSAPI --- src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 4 ++++ .../HPMHooking/HPMHooking.HookingPoints.inc | 1 + src/plugins/HPMHooking/HPMHooking.Hooks.inc | 25 ++++++++++++++++++++++ 3 files changed, 30 insertions(+) (limited to 'src') diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index d85b2aed9..61c510606 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -597,6 +597,8 @@ struct { struct HPMHookPoint *HP_clif_standing_post; struct HPMHookPoint *HP_clif_arrow_create_list_pre; struct HPMHookPoint *HP_clif_arrow_create_list_post; + struct HPMHookPoint *HP_clif_refresh_storagewindow_pre; + struct HPMHookPoint *HP_clif_refresh_storagewindow_post; struct HPMHookPoint *HP_clif_refresh_pre; struct HPMHookPoint *HP_clif_refresh_post; struct HPMHookPoint *HP_clif_fame_blacksmith_pre; @@ -5634,6 +5636,8 @@ struct { int HP_clif_standing_post; int HP_clif_arrow_create_list_pre; int HP_clif_arrow_create_list_post; + int HP_clif_refresh_storagewindow_pre; + int HP_clif_refresh_storagewindow_post; int HP_clif_refresh_pre; int HP_clif_refresh_post; int HP_clif_fame_blacksmith_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 7f731e727..85ce07a21 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -308,6 +308,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->sitting, HP_clif_sitting) }, { HP_POP(clif->standing, HP_clif_standing) }, { HP_POP(clif->arrow_create_list, HP_clif_arrow_create_list) }, + { HP_POP(clif->refresh_storagewindow, HP_clif_refresh_storagewindow) }, { HP_POP(clif->refresh, HP_clif_refresh) }, { HP_POP(clif->fame_blacksmith, HP_clif_fame_blacksmith) }, { HP_POP(clif->fame_alchemist, HP_clif_fame_alchemist) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 969cdad93..23f00ea97 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -7668,6 +7668,31 @@ void HP_clif_arrow_create_list(struct map_session_data *sd) { } return; } +void HP_clif_refresh_storagewindow(struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_refresh_storagewindow_pre ) { + void (*preHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_refresh_storagewindow_pre[hIndex].func; + preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.refresh_storagewindow(sd); + } + if( HPMHooks.count.HP_clif_refresh_storagewindow_post ) { + void (*postHookFunc) (struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_refresh_storagewindow_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} void HP_clif_refresh(struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_refresh_pre ) { -- cgit v1.2.3-70-g09d2