From 0e48eab94453b0778b1e5778dc7ebd8b8f81362a Mon Sep 17 00:00:00 2001 From: "Hercules.ws" Date: Fri, 15 Nov 2013 06:35:42 +0100 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 ebc69aae4..0f9dd1e9a 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -1281,6 +1281,8 @@ struct { struct HPMHookPoint *HP_clif_bank_withdraw_post; struct HPMHookPoint *HP_clif_show_modifiers_pre; struct HPMHookPoint *HP_clif_show_modifiers_post; + struct HPMHookPoint *HP_clif_notify_bounditem_pre; + struct HPMHookPoint *HP_clif_notify_bounditem_post; struct HPMHookPoint *HP_clif_pWantToConnection_pre; struct HPMHookPoint *HP_clif_pWantToConnection_post; struct HPMHookPoint *HP_clif_pLoadEndAck_pre; @@ -6232,6 +6234,8 @@ struct { int HP_clif_bank_withdraw_post; int HP_clif_show_modifiers_pre; int HP_clif_show_modifiers_post; + int HP_clif_notify_bounditem_pre; + int HP_clif_notify_bounditem_post; int HP_clif_pWantToConnection_pre; int HP_clif_pWantToConnection_post; int HP_clif_pLoadEndAck_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 6cd3d4702..f22ed6b32 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -650,6 +650,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->bank_deposit, HP_clif_bank_deposit) }, { HP_POP(clif->bank_withdraw, HP_clif_bank_withdraw) }, { HP_POP(clif->show_modifiers, HP_clif_show_modifiers) }, + { HP_POP(clif->notify_bounditem, HP_clif_notify_bounditem) }, { HP_POP(clif->pWantToConnection, HP_clif_pWantToConnection) }, { HP_POP(clif->pLoadEndAck, HP_clif_pLoadEndAck) }, { HP_POP(clif->pTickSend, HP_clif_pTickSend) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index b6793f48f..d8b8d65ae 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -16273,6 +16273,31 @@ void HP_clif_show_modifiers(struct map_session_data *sd) { } return; } +void HP_clif_notify_bounditem(struct map_session_data *sd, unsigned short index) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_notify_bounditem_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned short *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_bounditem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_notify_bounditem_pre[hIndex].func; + preHookFunc(sd, &index); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.notify_bounditem(sd, index); + } + if( HPMHooks.count.HP_clif_notify_bounditem_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short *index); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_bounditem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_notify_bounditem_post[hIndex].func; + postHookFunc(sd, &index); + } + } + return; +} void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_pWantToConnection_pre ) { -- cgit v1.2.3-70-g09d2