From 537b2bb3510f52eb9ccdee4f98e6061b5878bff0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 8 Aug 2017 18:24:10 +0300 Subject: Fix hpm issues after rodex commit. --- src/plugins/HPMHooking/HPMHooking.Defs.inc | 4 ++-- src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 14 ++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'src/plugins/HPMHooking') diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index b5ae9b0db..3ec573b6f 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -4472,8 +4472,8 @@ typedef void (*HPMHOOK_pre_mapif_rodex_send) (int *fd, int *sender_id, int *rece typedef void (*HPMHOOK_post_mapif_rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result); typedef int (*HPMHOOK_pre_mapif_parse_rodex_checkname) (int *fd); typedef int (*HPMHOOK_post_mapif_parse_rodex_checkname) (int retVal___, int fd); -typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, ); -typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, ); +typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name); +typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name); typedef int (*HPMHOOK_pre_mapif_load_guild_storage) (int *fd, int *account_id, int *guild_id, char *flag); typedef int (*HPMHOOK_post_mapif_load_guild_storage) (int retVal___, int fd, int account_id, int guild_id, char flag); typedef int (*HPMHOOK_pre_mapif_save_guild_storage_ack) (int *fd, int *account_id, int *guild_id, int *fail); diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index b727d208b..a372f83b3 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -14751,16 +14751,14 @@ int HP_mapif_parse_rodex_checkname(int fd) { } return retVal___; } -void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, ) { -/* Error: Unexpected character '+' */ -/* Error: Unhandled var type 'char name[(23+1)]' */ +void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name) { int hIndex = 0; if (HPMHooks.count.HP_mapif_rodex_checkname_pre > 0) { - void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, ); + void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_pre[hIndex].func; - preHookFunc(&fd, &reqchar_id, &target_char_id, &target_class, &target_level, ); + preHookFunc(&fd, &reqchar_id, &target_char_id, &target_class, &target_level, &name); } if (*HPMforce_return) { *HPMforce_return = false; @@ -14768,13 +14766,13 @@ void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short } } { - HPMHooks.source.mapif.rodex_checkname(fd, reqchar_id, target_char_id, target_class, target_level, ); + HPMHooks.source.mapif.rodex_checkname(fd, reqchar_id, target_char_id, target_class, target_level, name); } if (HPMHooks.count.HP_mapif_rodex_checkname_post > 0) { - void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, ); + void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name); for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_post[hIndex].func; - postHookFunc(fd, reqchar_id, target_char_id, target_class, target_level, ); + postHookFunc(fd, reqchar_id, target_char_id, target_class, target_level, name); } } return; -- cgit v1.2.3-70-g09d2