summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-11-05 23:53:43 +0300
committerAndrei Karas <akaras@inbox.ru>2018-11-14 06:00:50 +0300
commita9caa4ea37115869eb3926ca6e4c53709e7d9337 (patch)
tree0940de7d3992bfe0adacf3a36a6831ac516c99e7 /src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
parent94366099f9019643c9e431a35af064283fab5a0c (diff)
downloadhercules-a9caa4ea37115869eb3926ca6e4c53709e7d9337.tar.gz
hercules-a9caa4ea37115869eb3926ca6e4c53709e7d9337.tar.bz2
hercules-a9caa4ea37115869eb3926ca6e4c53709e7d9337.tar.xz
hercules-a9caa4ea37115869eb3926ca6e4c53709e7d9337.zip
Update HPM hooks.
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_login.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc105
1 files changed, 105 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index e432da70d..5e3d7b28d 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -6532,6 +6532,111 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const
}
return;
}
+/* packets_interface */
+void HP_packets_init(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_packets_init_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_packets_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.packets.init();
+ }
+ if (HPMHooks.count.HP_packets_init_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_packets_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_packets_final(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_packets_final_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_final_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_packets_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.packets.final();
+ }
+ if (HPMHooks.count.HP_packets_final_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_final_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_packets_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_packets_addLens(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_packets_addLens_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLens_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_packets_addLens_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.packets.addLens();
+ }
+ if (HPMHooks.count.HP_packets_addLens_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLens_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_packets_addLens_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_packets_addLen(int id, int len) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_packets_addLen_pre > 0) {
+ void (*preHookFunc) (int *id, int *len);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLen_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_packets_addLen_pre[hIndex].func;
+ preHookFunc(&id, &len);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.packets.addLen(id, len);
+ }
+ if (HPMHooks.count.HP_packets_addLen_post > 0) {
+ void (*postHookFunc) (int id, int len);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLen_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_packets_addLen_post[hIndex].func;
+ postHookFunc(id, len);
+ }
+ }
+ return;
+}
/* rnd_interface */
void HP_rnd_init(void) {
int hIndex = 0;