From fa0e16f6e27f783186ad83ca442fe0b48e7c2cfd Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 25 Aug 2019 17:45:23 +0200 Subject: HPM Hooks Update Signed-off-by: Haru --- src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 146 ++++++++++-------------- 1 file changed, 60 insertions(+), 86 deletions(-) (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc') diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 1f434f8bb..2a3fa27af 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -37050,33 +37050,6 @@ int HP_intif_main_message(struct map_session_data *sd, const char *message) { } return retVal___; } -int HP_intif_wis_message_to_gm(char *Wisp_name, int permission, char *mes) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_intif_wis_message_to_gm_pre > 0) { - int (*preHookFunc) (char **Wisp_name, int *permission, char **mes); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_to_gm_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_wis_message_to_gm_pre[hIndex].func; - retVal___ = preHookFunc(&Wisp_name, &permission, &mes); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.intif.wis_message_to_gm(Wisp_name, permission, mes); - } - if (HPMHooks.count.HP_intif_wis_message_to_gm_post > 0) { - int (*postHookFunc) (int retVal___, char *Wisp_name, int permission, char *mes); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_to_gm_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_wis_message_to_gm_post[hIndex].func; - retVal___ = postHookFunc(retVal___, Wisp_name, permission, mes); - } - } - return retVal___; -} int HP_intif_saveregistry(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; @@ -39093,65 +39066,6 @@ void HP_intif_achievements_save(struct map_session_data *sd) { } return; } -int HP_intif_pWisToGM_sub(struct map_session_data *sd, va_list va) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_intif_pWisToGM_sub_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, va_list va); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_pre; hIndex++) { - va_list va___copy; va_copy(va___copy, va); - preHookFunc = HPMHooks.list.HP_intif_pWisToGM_sub_pre[hIndex].func; - retVal___ = preHookFunc(&sd, va___copy); - va_end(va___copy); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - va_list va___copy; va_copy(va___copy, va); - retVal___ = HPMHooks.source.intif.pWisToGM_sub(sd, va___copy); - va_end(va___copy); - } - if (HPMHooks.count.HP_intif_pWisToGM_sub_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list va); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_post; hIndex++) { - va_list va___copy; va_copy(va___copy, va); - postHookFunc = HPMHooks.list.HP_intif_pWisToGM_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, va___copy); - va_end(va___copy); - } - } - return retVal___; -} -void HP_intif_pWisToGM(int fd) { - int hIndex = 0; - if (HPMHooks.count.HP_intif_pWisToGM_pre > 0) { - void (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_intif_pWisToGM_pre[hIndex].func; - preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.intif.pWisToGM(fd); - } - if (HPMHooks.count.HP_intif_pWisToGM_post > 0) { - void (*postHookFunc) (int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_intif_pWisToGM_post[hIndex].func; - postHookFunc(fd); - } - } - return; -} void HP_intif_pRegisters(int fd) { int hIndex = 0; if (HPMHooks.count.HP_intif_pRegisters_pre > 0) { @@ -66284,6 +66198,66 @@ bool HP_pc_process_chat_message(struct map_session_data *sd, const char *message } return retVal___; } +int HP_pc_wis_message_to_gm(const char *sender_name, int permission, const char *message) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_wis_message_to_gm_pre > 0) { + int (*preHookFunc) (const char **sender_name, int *permission, const char **message); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_pre[hIndex].func; + retVal___ = preHookFunc(&sender_name, &permission, &message); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.wis_message_to_gm(sender_name, permission, message); + } + if (HPMHooks.count.HP_pc_wis_message_to_gm_post > 0) { + int (*postHookFunc) (int retVal___, const char *sender_name, int permission, const char *message); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sender_name, permission, message); + } + } + return retVal___; +} +int HP_pc_wis_message_to_gm_sub(struct map_session_data *sd, va_list va) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_wis_message_to_gm_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list va); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_sub_pre; hIndex++) { + va_list va___copy; va_copy(va___copy, va); + preHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_sub_pre[hIndex].func; + retVal___ = preHookFunc(&sd, va___copy); + va_end(va___copy); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list va___copy; va_copy(va___copy, va); + retVal___ = HPMHooks.source.pc.wis_message_to_gm_sub(sd, va___copy); + va_end(va___copy); + } + if (HPMHooks.count.HP_pc_wis_message_to_gm_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list va); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_sub_post; hIndex++) { + va_list va___copy; va_copy(va___copy, va); + postHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, va___copy); + va_end(va___copy); + } + } + return retVal___; +} void HP_pc_check_supernovice_call(struct map_session_data *sd, const char *message) { int hIndex = 0; if (HPMHooks.count.HP_pc_check_supernovice_call_pre > 0) { -- cgit v1.2.3-70-g09d2