From 284a1631b40f442e058dabd9fd31301b9e50e71b Mon Sep 17 00:00:00 2001 From: "Hercules.ws" Date: Sun, 19 Jan 2014 05:59:58 +0100 Subject: HPM Hooks Update Signed-off-by: HerculesWSAPI --- src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 8 ++++---- src/plugins/HPMHooking/HPMHooking.HookingPoints.inc | 2 +- src/plugins/HPMHooking/HPMHooking.Hooks.inc | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index 654d84b42..0f9748153 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -329,8 +329,8 @@ struct { struct HPMHookPoint *HP_chrif_removefriend_post; struct HPMHookPoint *HP_chrif_send_report_pre; struct HPMHookPoint *HP_chrif_send_report_post; - struct HPMHookPoint *HP_chrif_flush_fifo_pre; - struct HPMHookPoint *HP_chrif_flush_fifo_post; + struct HPMHookPoint *HP_chrif_flush_pre; + struct HPMHookPoint *HP_chrif_flush_post; struct HPMHookPoint *HP_chrif_skillid2idx_pre; struct HPMHookPoint *HP_chrif_skillid2idx_post; struct HPMHookPoint *HP_chrif_sd_to_auth_pre; @@ -5348,8 +5348,8 @@ struct { int HP_chrif_removefriend_post; int HP_chrif_send_report_pre; int HP_chrif_send_report_post; - int HP_chrif_flush_fifo_pre; - int HP_chrif_flush_fifo_post; + int HP_chrif_flush_pre; + int HP_chrif_flush_post; int HP_chrif_skillid2idx_pre; int HP_chrif_skillid2idx_post; int HP_chrif_sd_to_auth_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 144eff850..226497c3f 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -173,7 +173,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chrif->divorce, HP_chrif_divorce) }, { HP_POP(chrif->removefriend, HP_chrif_removefriend) }, { HP_POP(chrif->send_report, HP_chrif_send_report) }, - { HP_POP(chrif->flush_fifo, HP_chrif_flush_fifo) }, + { HP_POP(chrif->flush, HP_chrif_flush) }, { HP_POP(chrif->skillid2idx, HP_chrif_skillid2idx) }, { HP_POP(chrif->sd_to_auth, HP_chrif_sd_to_auth) }, { HP_POP(chrif->check_connect_char_server, HP_chrif_check_connect_char_server) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 73936f460..7b69fd902 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -4254,13 +4254,13 @@ void HP_chrif_send_report(char *buf, int len) { } return; } -bool HP_chrif_flush_fifo(void) { +bool HP_chrif_flush(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_flush_fifo_pre ) { + if( HPMHooks.count.HP_chrif_flush_pre ) { bool (*preHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_fifo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_chrif_flush_fifo_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chrif_flush_pre[hIndex].func; retVal___ = preHookFunc(); } if( *HPMforce_return ) { @@ -4269,12 +4269,12 @@ bool HP_chrif_flush_fifo(void) { } } { - retVal___ = HPMHooks.source.chrif.flush_fifo(); + retVal___ = HPMHooks.source.chrif.flush(); } - if( HPMHooks.count.HP_chrif_flush_fifo_post ) { + if( HPMHooks.count.HP_chrif_flush_post ) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_fifo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_chrif_flush_fifo_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chrif_flush_post[hIndex].func; retVal___ = postHookFunc(retVal___); } } -- cgit v1.2.3-70-g09d2 From 8fb2b31e8de73872baddc3d983a4eea5c359329d Mon Sep 17 00:00:00 2001 From: "Hercules.ws" Date: Thu, 23 Jan 2014 17:21:30 +0100 Subject: HPM Hooks Update Signed-off-by: HerculesWSAPI --- src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 8 ++++---- .../HPMHooking/HPMHooking.HookingPoints.inc | 2 +- src/plugins/HPMHooking/HPMHooking.Hooks.inc | 24 +++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index 0f9748153..3dfa69d4c 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -9,8 +9,8 @@ struct { struct HPMHookPoint *HP_atcommand_init_post; struct HPMHookPoint *HP_atcommand_final_pre; struct HPMHookPoint *HP_atcommand_final_post; - struct HPMHookPoint *HP_atcommand_parse_pre; - struct HPMHookPoint *HP_atcommand_parse_post; + struct HPMHookPoint *HP_atcommand_exec_pre; + struct HPMHookPoint *HP_atcommand_exec_post; struct HPMHookPoint *HP_atcommand_create_pre; struct HPMHookPoint *HP_atcommand_create_post; struct HPMHookPoint *HP_atcommand_can_use_pre; @@ -5028,8 +5028,8 @@ struct { int HP_atcommand_init_post; int HP_atcommand_final_pre; int HP_atcommand_final_post; - int HP_atcommand_parse_pre; - int HP_atcommand_parse_post; + int HP_atcommand_exec_pre; + int HP_atcommand_exec_post; int HP_atcommand_create_pre; int HP_atcommand_create_post; int HP_atcommand_can_use_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 226497c3f..0b7201cdc 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -8,7 +8,7 @@ struct HookingPointData HookingPoints[] = { /* atcommand */ { HP_POP(atcommand->init, HP_atcommand_init) }, { HP_POP(atcommand->final, HP_atcommand_final) }, - { HP_POP(atcommand->parse, HP_atcommand_parse) }, + { HP_POP(atcommand->exec, HP_atcommand_exec) }, { HP_POP(atcommand->create, HP_atcommand_create) }, { HP_POP(atcommand->can_use, HP_atcommand_can_use) }, { HP_POP(atcommand->can_use2, HP_atcommand_can_use2) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 7b69fd902..4db53868d 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -55,14 +55,14 @@ void HP_atcommand_final(void) { } return; } -bool HP_atcommand_parse(const int fd, struct map_session_data *sd, const char *message, int type) { +bool HP_atcommand_exec(const int fd, struct map_session_data *sd, const char *message, bool player_invoked) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_parse_pre ) { - bool (*preHookFunc) (const int *fd, struct map_session_data *sd, const char *message, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_parse_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_atcommand_parse_pre[hIndex].func; - retVal___ = preHookFunc(&fd, sd, message, &type); + if( HPMHooks.count.HP_atcommand_exec_pre ) { + bool (*preHookFunc) (const int *fd, struct map_session_data *sd, const char *message, bool *player_invoked); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exec_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_atcommand_exec_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd, message, &player_invoked); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -70,13 +70,13 @@ bool HP_atcommand_parse(const int fd, struct map_session_data *sd, const char *m } } { - retVal___ = HPMHooks.source.atcommand.parse(fd, sd, message, type); + retVal___ = HPMHooks.source.atcommand.exec(fd, sd, message, player_invoked); } - if( HPMHooks.count.HP_atcommand_parse_post ) { - bool (*postHookFunc) (bool retVal___, const int *fd, struct map_session_data *sd, const char *message, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_parse_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_atcommand_parse_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, sd, message, &type); + if( HPMHooks.count.HP_atcommand_exec_post ) { + bool (*postHookFunc) (bool retVal___, const int *fd, struct map_session_data *sd, const char *message, bool *player_invoked); + for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exec_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_atcommand_exec_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd, message, &player_invoked); } } return retVal___; -- cgit v1.2.3-70-g09d2