summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2015-10-04 22:53:03 +0200
committerHerculesWSAPI <Hercules@efficiently.awesome>2015-10-04 22:53:03 +0200
commitf4bd71bfc3b39c6a25b3050a05f4646d80820215 (patch)
tree51d3714d405dc0aafa1805ed275ae4e855e3b687 /src/plugins
parentacbbba21c888c7e8c9a6c31652dfd61c90ca6ac8 (diff)
downloadhercules-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')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc27
3 files changed, 32 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 408d7d0cd..2deb0f416 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -497,6 +497,8 @@ struct {
struct HPMHookPoint *HP_clif_send_actual_post;
struct HPMHookPoint *HP_clif_parse_pre;
struct HPMHookPoint *HP_clif_parse_post;
+ struct HPMHookPoint *HP_clif_packet_pre;
+ struct HPMHookPoint *HP_clif_packet_post;
struct HPMHookPoint *HP_clif_parse_cmd_pre;
struct HPMHookPoint *HP_clif_parse_cmd_post;
struct HPMHookPoint *HP_clif_decrypt_cmd_pre;
@@ -6220,6 +6222,8 @@ struct {
int HP_clif_send_actual_post;
int HP_clif_parse_pre;
int HP_clif_parse_post;
+ int HP_clif_packet_pre;
+ int HP_clif_packet_post;
int HP_clif_parse_cmd_pre;
int HP_clif_parse_cmd_post;
int HP_clif_decrypt_cmd_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index d0d97192e..4a28fffb3 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -260,6 +260,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->send_sub, HP_clif_send_sub) },
{ HP_POP(clif->send_actual, HP_clif_send_actual) },
{ HP_POP(clif->parse, HP_clif_parse) },
+ { HP_POP(clif->packet, HP_clif_packet) },
{ HP_POP(clif->parse_cmd, HP_clif_parse_cmd) },
{ HP_POP(clif->decrypt_cmd, HP_clif_decrypt_cmd) },
{ HP_POP(clif->authok, HP_clif_authok) },
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;