diff options
Diffstat (limited to 'src')
7 files changed, 74 insertions, 141 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 1b2ed3cdc..f391eb414 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -3622,8 +3622,6 @@ typedef int (*HPMHOOK_pre_intif_broadcast2) (const char **mes, int *len, unsigne typedef int (*HPMHOOK_post_intif_broadcast2) (int retVal___, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY); typedef int (*HPMHOOK_pre_intif_main_message) (struct map_session_data **sd, const char **message); typedef int (*HPMHOOK_post_intif_main_message) (int retVal___, struct map_session_data *sd, const char *message); -typedef int (*HPMHOOK_pre_intif_wis_message_to_gm) (char **Wisp_name, int *permission, char **mes); -typedef int (*HPMHOOK_post_intif_wis_message_to_gm) (int retVal___, char *Wisp_name, int permission, char *mes); typedef int (*HPMHOOK_pre_intif_saveregistry) (struct map_session_data **sd); typedef int (*HPMHOOK_post_intif_saveregistry) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_intif_request_registry) (struct map_session_data **sd, int *flag); @@ -3774,10 +3772,6 @@ typedef void (*HPMHOOK_pre_intif_achievements_request) (struct map_session_data typedef void (*HPMHOOK_post_intif_achievements_request) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_intif_achievements_save) (struct map_session_data **sd); typedef void (*HPMHOOK_post_intif_achievements_save) (struct map_session_data *sd); -typedef int (*HPMHOOK_pre_intif_pWisToGM_sub) (struct map_session_data **sd, va_list va); -typedef int (*HPMHOOK_post_intif_pWisToGM_sub) (int retVal___, struct map_session_data *sd, va_list va); -typedef void (*HPMHOOK_pre_intif_pWisToGM) (int *fd); -typedef void (*HPMHOOK_post_intif_pWisToGM) (int fd); typedef void (*HPMHOOK_pre_intif_pRegisters) (int *fd); typedef void (*HPMHOOK_post_intif_pRegisters) (int fd); typedef void (*HPMHOOK_pre_intif_pAccountStorage) (int *fd); @@ -5134,8 +5128,6 @@ typedef int (*HPMHOOK_pre_mapif_disconnectplayer) (int *fd, int *account_id, int typedef int (*HPMHOOK_post_mapif_disconnectplayer) (int retVal___, int fd, int account_id, int char_id, int reason); typedef int (*HPMHOOK_pre_mapif_parse_broadcast) (int *fd); typedef int (*HPMHOOK_post_mapif_parse_broadcast) (int retVal___, int fd); -typedef int (*HPMHOOK_pre_mapif_parse_WisToGM) (int *fd); -typedef int (*HPMHOOK_post_mapif_parse_WisToGM) (int retVal___, int fd); typedef int (*HPMHOOK_pre_mapif_parse_Registry) (int *fd); typedef int (*HPMHOOK_post_mapif_parse_Registry) (int retVal___, int fd); typedef int (*HPMHOOK_pre_mapif_parse_RegistryRequest) (int *fd); @@ -6410,6 +6402,10 @@ typedef int (*HPMHOOK_pre_pc_have_magnifier) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_have_magnifier) (int retVal___, struct map_session_data *sd); typedef bool (*HPMHOOK_pre_pc_process_chat_message) (struct map_session_data **sd, const char **message); typedef bool (*HPMHOOK_post_pc_process_chat_message) (bool retVal___, struct map_session_data *sd, const char *message); +typedef int (*HPMHOOK_pre_pc_wis_message_to_gm) (const char **sender_name, int *permission, const char **message); +typedef int (*HPMHOOK_post_pc_wis_message_to_gm) (int retVal___, const char *sender_name, int permission, const char *message); +typedef int (*HPMHOOK_pre_pc_wis_message_to_gm_sub) (struct map_session_data **sd, va_list va); +typedef int (*HPMHOOK_post_pc_wis_message_to_gm_sub) (int retVal___, struct map_session_data *sd, va_list va); typedef void (*HPMHOOK_pre_pc_check_supernovice_call) (struct map_session_data **sd, const char **message); typedef void (*HPMHOOK_post_pc_check_supernovice_call) (struct map_session_data *sd, const char *message); typedef bool (*HPMHOOK_pre_pc_check_basicskill) (struct map_session_data **sd, int *level); diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index f9b924632..bc472dad8 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -1252,8 +1252,6 @@ struct { struct HPMHookPoint *HP_mapif_disconnectplayer_post; struct HPMHookPoint *HP_mapif_parse_broadcast_pre; struct HPMHookPoint *HP_mapif_parse_broadcast_post; - struct HPMHookPoint *HP_mapif_parse_WisToGM_pre; - struct HPMHookPoint *HP_mapif_parse_WisToGM_post; struct HPMHookPoint *HP_mapif_parse_Registry_pre; struct HPMHookPoint *HP_mapif_parse_Registry_post; struct HPMHookPoint *HP_mapif_parse_RegistryRequest_pre; @@ -2879,8 +2877,6 @@ struct { int HP_mapif_disconnectplayer_post; int HP_mapif_parse_broadcast_pre; int HP_mapif_parse_broadcast_post; - int HP_mapif_parse_WisToGM_pre; - int HP_mapif_parse_WisToGM_post; int HP_mapif_parse_Registry_pre; int HP_mapif_parse_Registry_post; int HP_mapif_parse_RegistryRequest_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index af38a694b..48aee470a 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -664,7 +664,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->account_reg_reply, HP_mapif_account_reg_reply) }, { HP_POP(mapif->disconnectplayer, HP_mapif_disconnectplayer) }, { HP_POP(mapif->parse_broadcast, HP_mapif_parse_broadcast) }, - { HP_POP(mapif->parse_WisToGM, HP_mapif_parse_WisToGM) }, { HP_POP(mapif->parse_Registry, HP_mapif_parse_Registry) }, { HP_POP(mapif->parse_RegistryRequest, HP_mapif_parse_RegistryRequest) }, { HP_POP(mapif->namechange_ack, HP_mapif_namechange_ack) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index 5ea566d77..1148966c8 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -16415,33 +16415,6 @@ int HP_mapif_parse_broadcast(int fd) { } return retVal___; } -int HP_mapif_parse_WisToGM(int fd) { - int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_mapif_parse_WisToGM_pre > 0) { - int (*preHookFunc) (int *fd); - *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_pre[hIndex].func; - retVal___ = preHookFunc(&fd); - } - if (*HPMforce_return) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.parse_WisToGM(fd); - } - if (HPMHooks.count.HP_mapif_parse_WisToGM_post > 0) { - int (*postHookFunc) (int retVal___, int fd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fd); - } - } - return retVal___; -} int HP_mapif_parse_Registry(int fd) { int hIndex = 0; int retVal___ = 0; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 5627c6ce0..313421b2a 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -2822,8 +2822,6 @@ struct { struct HPMHookPoint *HP_intif_broadcast2_post; struct HPMHookPoint *HP_intif_main_message_pre; struct HPMHookPoint *HP_intif_main_message_post; - struct HPMHookPoint *HP_intif_wis_message_to_gm_pre; - struct HPMHookPoint *HP_intif_wis_message_to_gm_post; struct HPMHookPoint *HP_intif_saveregistry_pre; struct HPMHookPoint *HP_intif_saveregistry_post; struct HPMHookPoint *HP_intif_request_registry_pre; @@ -2974,10 +2972,6 @@ struct { struct HPMHookPoint *HP_intif_achievements_request_post; struct HPMHookPoint *HP_intif_achievements_save_pre; struct HPMHookPoint *HP_intif_achievements_save_post; - struct HPMHookPoint *HP_intif_pWisToGM_sub_pre; - struct HPMHookPoint *HP_intif_pWisToGM_sub_post; - struct HPMHookPoint *HP_intif_pWisToGM_pre; - struct HPMHookPoint *HP_intif_pWisToGM_post; struct HPMHookPoint *HP_intif_pRegisters_pre; struct HPMHookPoint *HP_intif_pRegisters_post; struct HPMHookPoint *HP_intif_pAccountStorage_pre; @@ -4980,6 +4974,10 @@ struct { struct HPMHookPoint *HP_pc_have_magnifier_post; struct HPMHookPoint *HP_pc_process_chat_message_pre; struct HPMHookPoint *HP_pc_process_chat_message_post; + struct HPMHookPoint *HP_pc_wis_message_to_gm_pre; + struct HPMHookPoint *HP_pc_wis_message_to_gm_post; + struct HPMHookPoint *HP_pc_wis_message_to_gm_sub_pre; + struct HPMHookPoint *HP_pc_wis_message_to_gm_sub_post; struct HPMHookPoint *HP_pc_check_supernovice_call_pre; struct HPMHookPoint *HP_pc_check_supernovice_call_post; struct HPMHookPoint *HP_pc_check_basicskill_pre; @@ -9611,8 +9609,6 @@ struct { int HP_intif_broadcast2_post; int HP_intif_main_message_pre; int HP_intif_main_message_post; - int HP_intif_wis_message_to_gm_pre; - int HP_intif_wis_message_to_gm_post; int HP_intif_saveregistry_pre; int HP_intif_saveregistry_post; int HP_intif_request_registry_pre; @@ -9763,10 +9759,6 @@ struct { int HP_intif_achievements_request_post; int HP_intif_achievements_save_pre; int HP_intif_achievements_save_post; - int HP_intif_pWisToGM_sub_pre; - int HP_intif_pWisToGM_sub_post; - int HP_intif_pWisToGM_pre; - int HP_intif_pWisToGM_post; int HP_intif_pRegisters_pre; int HP_intif_pRegisters_post; int HP_intif_pAccountStorage_pre; @@ -11769,6 +11761,10 @@ struct { int HP_pc_have_magnifier_post; int HP_pc_process_chat_message_pre; int HP_pc_process_chat_message_post; + int HP_pc_wis_message_to_gm_pre; + int HP_pc_wis_message_to_gm_post; + int HP_pc_wis_message_to_gm_sub_pre; + int HP_pc_wis_message_to_gm_sub_post; int HP_pc_check_supernovice_call_pre; int HP_pc_check_supernovice_call_post; int HP_pc_check_basicskill_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index efb2e5297..0119c75cc 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -1448,7 +1448,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->broadcast, HP_intif_broadcast) }, { HP_POP(intif->broadcast2, HP_intif_broadcast2) }, { HP_POP(intif->main_message, HP_intif_main_message) }, - { HP_POP(intif->wis_message_to_gm, HP_intif_wis_message_to_gm) }, { HP_POP(intif->saveregistry, HP_intif_saveregistry) }, { HP_POP(intif->request_registry, HP_intif_request_registry) }, { HP_POP(intif->request_account_storage, HP_intif_request_account_storage) }, @@ -1524,8 +1523,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->CheckForCharServer, HP_intif_CheckForCharServer) }, { HP_POP(intif->achievements_request, HP_intif_achievements_request) }, { HP_POP(intif->achievements_save, HP_intif_achievements_save) }, - { HP_POP(intif->pWisToGM_sub, HP_intif_pWisToGM_sub) }, - { HP_POP(intif->pWisToGM, HP_intif_pWisToGM) }, { HP_POP(intif->pRegisters, HP_intif_pRegisters) }, { HP_POP(intif->pAccountStorage, HP_intif_pAccountStorage) }, { HP_POP(intif->pChangeNameOk, HP_intif_pChangeNameOk) }, @@ -2548,6 +2545,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->update_idle_time, HP_pc_update_idle_time) }, { HP_POP(pc->have_magnifier, HP_pc_have_magnifier) }, { HP_POP(pc->process_chat_message, HP_pc_process_chat_message) }, + { HP_POP(pc->wis_message_to_gm, HP_pc_wis_message_to_gm) }, + { HP_POP(pc->wis_message_to_gm_sub, HP_pc_wis_message_to_gm_sub) }, { HP_POP(pc->check_supernovice_call, HP_pc_check_supernovice_call) }, { HP_POP(pc->check_basicskill, HP_pc_check_basicskill) }, { HP_POP(pc->isDeathPenaltyJob, HP_pc_isDeathPenaltyJob) }, 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) { |