diff options
Diffstat (limited to 'src')
4 files changed, 68 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 4510bc3df..6d836a3a9 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -1724,6 +1724,10 @@ typedef int (*HPMHOOK_pre_clif_comparemergeitem) (const void **a, const void **b typedef int (*HPMHOOK_post_clif_comparemergeitem) (int retVal___, const void *a, const void *b); typedef void (*HPMHOOK_pre_clif_ackmergeitems) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_ackmergeitems) (int fd, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_clif_isdisguised) (struct block_list **bl); +typedef bool (*HPMHOOK_post_clif_isdisguised) (bool retVal___, struct block_list *bl); +typedef unsigned char (*HPMHOOK_pre_clif_bl_type) (struct block_list **bl); +typedef unsigned char (*HPMHOOK_post_clif_bl_type) (unsigned char retVal___, struct block_list *bl); typedef void (*HPMHOOK_pre_clif_pWantToConnection) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pWantToConnection) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pLoadEndAck) (int *fd, struct map_session_data **sd); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 1de0b6077..61bf1893a 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1390,6 +1390,10 @@ struct { struct HPMHookPoint *HP_clif_comparemergeitem_post; struct HPMHookPoint *HP_clif_ackmergeitems_pre; struct HPMHookPoint *HP_clif_ackmergeitems_post; + struct HPMHookPoint *HP_clif_isdisguised_pre; + struct HPMHookPoint *HP_clif_isdisguised_post; + struct HPMHookPoint *HP_clif_bl_type_pre; + struct HPMHookPoint *HP_clif_bl_type_post; struct HPMHookPoint *HP_clif_pWantToConnection_pre; struct HPMHookPoint *HP_clif_pWantToConnection_post; struct HPMHookPoint *HP_clif_pLoadEndAck_pre; @@ -7287,6 +7291,10 @@ struct { int HP_clif_comparemergeitem_post; int HP_clif_ackmergeitems_pre; int HP_clif_ackmergeitems_post; + int HP_clif_isdisguised_pre; + int HP_clif_isdisguised_post; + int HP_clif_bl_type_pre; + int HP_clif_bl_type_post; int HP_clif_pWantToConnection_pre; int HP_clif_pWantToConnection_post; int HP_clif_pLoadEndAck_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index b18d11d66..3b45377c5 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -716,6 +716,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->cancelmergeitem, HP_clif_cancelmergeitem) }, { HP_POP(clif->comparemergeitem, HP_clif_comparemergeitem) }, { HP_POP(clif->ackmergeitems, HP_clif_ackmergeitems) }, + { HP_POP(clif->isdisguised, HP_clif_isdisguised) }, + { HP_POP(clif->bl_type, HP_clif_bl_type) }, { 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_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index ab2def6cd..b2ed7006d 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -18110,6 +18110,60 @@ void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) { } return; } +bool HP_clif_isdisguised(struct block_list *bl) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_clif_isdisguised_pre ) { + bool (*preHookFunc) (struct block_list **bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_isdisguised_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_isdisguised_pre[hIndex].func; + retVal___ = preHookFunc(&bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.isdisguised(bl); + } + if( HPMHooks.count.HP_clif_isdisguised_post ) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_isdisguised_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_isdisguised_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +unsigned char HP_clif_bl_type(struct block_list *bl) { + int hIndex = 0; + unsigned char retVal___ = 0; + if( HPMHooks.count.HP_clif_bl_type_pre ) { + unsigned char (*preHookFunc) (struct block_list **bl); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bl_type_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_bl_type_pre[hIndex].func; + retVal___ = preHookFunc(&bl); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.bl_type(bl); + } + if( HPMHooks.count.HP_clif_bl_type_post ) { + unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bl_type_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_bl_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_pWantToConnection_pre ) { |