diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2014-11-03 11:20:42 +0100 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2014-11-03 11:20:42 +0100 |
commit | 1c76a4249ea878bd133c16a7e8b799d51b7e8594 (patch) | |
tree | 7a4bc5f8afb4fa09df74da040ffb5cda3c04ced8 /src/plugins/HPMHooking | |
parent | 8fcff554229f0ef60c0f86218224799ad50fbf0e (diff) | |
download | hercules-1c76a4249ea878bd133c16a7e8b799d51b7e8594.tar.gz hercules-1c76a4249ea878bd133c16a7e8b799d51b7e8594.tar.bz2 hercules-1c76a4249ea878bd133c16a7e8b799d51b7e8594.tar.xz hercules-1c76a4249ea878bd133c16a7e8b799d51b7e8594.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 28 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 7 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 183 |
3 files changed, 218 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 6054e9d9a..ba42106f6 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1301,6 +1301,10 @@ struct { struct HPMHookPoint *HP_clif_npc_market_open_post; struct HPMHookPoint *HP_clif_npc_market_purchase_ack_pre; struct HPMHookPoint *HP_clif_npc_market_purchase_ack_post; + struct HPMHookPoint *HP_clif_parse_roulette_db_pre; + struct HPMHookPoint *HP_clif_parse_roulette_db_post; + struct HPMHookPoint *HP_clif_roulette_generate_ack_pre; + struct HPMHookPoint *HP_clif_roulette_generate_ack_post; struct HPMHookPoint *HP_clif_pWantToConnection_pre; struct HPMHookPoint *HP_clif_pWantToConnection_post; struct HPMHookPoint *HP_clif_pLoadEndAck_pre; @@ -1741,6 +1745,16 @@ struct { struct HPMHookPoint *HP_clif_pBankOpen_post; struct HPMHookPoint *HP_clif_pBankClose_pre; struct HPMHookPoint *HP_clif_pBankClose_post; + struct HPMHookPoint *HP_clif_pRouletteOpen_pre; + struct HPMHookPoint *HP_clif_pRouletteOpen_post; + struct HPMHookPoint *HP_clif_pRouletteInfo_pre; + struct HPMHookPoint *HP_clif_pRouletteInfo_post; + struct HPMHookPoint *HP_clif_pRouletteClose_pre; + struct HPMHookPoint *HP_clif_pRouletteClose_post; + struct HPMHookPoint *HP_clif_pRouletteGenerate_pre; + struct HPMHookPoint *HP_clif_pRouletteGenerate_post; + struct HPMHookPoint *HP_clif_pRouletteRecvItem_pre; + struct HPMHookPoint *HP_clif_pRouletteRecvItem_post; struct HPMHookPoint *HP_clif_pNPCShopClosed_pre; struct HPMHookPoint *HP_clif_pNPCShopClosed_post; struct HPMHookPoint *HP_clif_pNPCMarketClosed_pre; @@ -6348,6 +6362,10 @@ struct { int HP_clif_npc_market_open_post; int HP_clif_npc_market_purchase_ack_pre; int HP_clif_npc_market_purchase_ack_post; + int HP_clif_parse_roulette_db_pre; + int HP_clif_parse_roulette_db_post; + int HP_clif_roulette_generate_ack_pre; + int HP_clif_roulette_generate_ack_post; int HP_clif_pWantToConnection_pre; int HP_clif_pWantToConnection_post; int HP_clif_pLoadEndAck_pre; @@ -6788,6 +6806,16 @@ struct { int HP_clif_pBankOpen_post; int HP_clif_pBankClose_pre; int HP_clif_pBankClose_post; + int HP_clif_pRouletteOpen_pre; + int HP_clif_pRouletteOpen_post; + int HP_clif_pRouletteInfo_pre; + int HP_clif_pRouletteInfo_post; + int HP_clif_pRouletteClose_pre; + int HP_clif_pRouletteClose_post; + int HP_clif_pRouletteGenerate_pre; + int HP_clif_pRouletteGenerate_post; + int HP_clif_pRouletteRecvItem_pre; + int HP_clif_pRouletteRecvItem_post; int HP_clif_pNPCShopClosed_pre; int HP_clif_pNPCShopClosed_post; int HP_clif_pNPCMarketClosed_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index e2f946f7e..21e3d616d 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -660,6 +660,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->delay_damage_sub, HP_clif_delay_damage_sub) }, { HP_POP(clif->npc_market_open, HP_clif_npc_market_open) }, { HP_POP(clif->npc_market_purchase_ack, HP_clif_npc_market_purchase_ack) }, + { HP_POP(clif->parse_roulette_db, HP_clif_parse_roulette_db) }, + { HP_POP(clif->roulette_generate_ack, HP_clif_roulette_generate_ack) }, { HP_POP(clif->pWantToConnection, HP_clif_pWantToConnection) }, { HP_POP(clif->pLoadEndAck, HP_clif_pLoadEndAck) }, { HP_POP(clif->pTickSend, HP_clif_pTickSend) }, @@ -880,6 +882,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pBankCheck, HP_clif_pBankCheck) }, { HP_POP(clif->pBankOpen, HP_clif_pBankOpen) }, { HP_POP(clif->pBankClose, HP_clif_pBankClose) }, + { HP_POP(clif->pRouletteOpen, HP_clif_pRouletteOpen) }, + { HP_POP(clif->pRouletteInfo, HP_clif_pRouletteInfo) }, + { HP_POP(clif->pRouletteClose, HP_clif_pRouletteClose) }, + { HP_POP(clif->pRouletteGenerate, HP_clif_pRouletteGenerate) }, + { HP_POP(clif->pRouletteRecvItem, HP_clif_pRouletteRecvItem) }, { HP_POP(clif->pNPCShopClosed, HP_clif_pNPCShopClosed) }, { HP_POP(clif->pNPCMarketClosed, HP_clif_pNPCMarketClosed) }, { HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index f47cf27f0..3407c3268 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -17161,6 +17161,59 @@ void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, struct packet_ } return; } +bool HP_clif_parse_roulette_db(void) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_clif_parse_roulette_db_pre ) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_parse_roulette_db_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.parse_roulette_db(); + } + if( HPMHooks.count.HP_clif_parse_roulette_db_post ) { + bool (*postHookFunc) (bool retVal___); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_parse_roulette_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_roulette_generate_ack_pre ) { + void (*preHookFunc) (struct map_session_data *sd, unsigned char *result, short *stage, short *prizeIdx, short *bonusItemID); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_pre[hIndex].func; + preHookFunc(sd, &result, &stage, &prizeIdx, &bonusItemID); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.roulette_generate_ack(sd, result, stage, prizeIdx, bonusItemID); + } + if( HPMHooks.count.HP_clif_roulette_generate_ack_post ) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char *result, short *stage, short *prizeIdx, short *bonusItemID); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_post[hIndex].func; + postHookFunc(sd, &result, &stage, &prizeIdx, &bonusItemID); + } + } + return; +} void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_pWantToConnection_pre ) { @@ -22881,6 +22934,136 @@ void HP_clif_pBankClose(int fd, struct map_session_data *sd) { } return; } +void HP_clif_pRouletteOpen(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRouletteOpen_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRouletteOpen_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRouletteOpen(fd, sd); + } + if( HPMHooks.count.HP_clif_pRouletteOpen_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRouletteOpen_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRouletteInfo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRouletteInfo_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRouletteInfo_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRouletteInfo(fd, sd); + } + if( HPMHooks.count.HP_clif_pRouletteInfo_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRouletteInfo_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRouletteClose(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRouletteClose_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRouletteClose_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRouletteClose(fd, sd); + } + if( HPMHooks.count.HP_clif_pRouletteClose_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRouletteClose_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRouletteGenerate(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRouletteGenerate_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRouletteGenerate_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRouletteGenerate(fd, sd); + } + if( HPMHooks.count.HP_clif_pRouletteGenerate_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRouletteGenerate_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_pRouletteRecvItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_pRouletteRecvItem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_pRouletteRecvItem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRouletteRecvItem(fd, sd); + } + if( HPMHooks.count.HP_clif_pRouletteRecvItem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_pRouletteRecvItem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} void HP_clif_pNPCShopClosed(int fd, struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_pNPCShopClosed_pre ) { |