diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2015-10-04 22:53:03 +0200 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2015-10-04 22:53:03 +0200 |
commit | f4bd71bfc3b39c6a25b3050a05f4646d80820215 (patch) | |
tree | 51d3714d405dc0aafa1805ed275ae4e855e3b687 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | acbbba21c888c7e8c9a6c31652dfd61c90ca6ac8 (diff) | |
download | hercules-f4bd71bfc3b39c6a25b3050a05f4646d80820215.tar.gz hercules-f4bd71bfc3b39c6a25b3050a05f4646d80820215.tar.bz2 hercules-f4bd71bfc3b39c6a25b3050a05f4646d80820215.tar.xz hercules-f4bd71bfc3b39c6a25b3050a05f4646d80820215.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 5602014eb..9c996f7dd 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -6672,6 +6672,33 @@ int HP_clif_parse(int fd) { } return retVal___; } +const struct s_packet_db* HP_clif_packet(int packet_id) { + int hIndex = 0; + const struct s_packet_db* retVal___ = NULL; + if( HPMHooks.count.HP_clif_packet_pre ) { + const struct s_packet_db* (*preHookFunc) (int *packet_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_packet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_packet_pre[hIndex].func; + retVal___ = preHookFunc(&packet_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.packet(packet_id); + } + if( HPMHooks.count.HP_clif_packet_post ) { + const struct s_packet_db* (*postHookFunc) (const struct s_packet_db* retVal___, int *packet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_packet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_packet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &packet_id); + } + } + return retVal___; +} unsigned short HP_clif_parse_cmd(int fd, struct map_session_data *sd) { int hIndex = 0; unsigned short retVal___ = 0; |