diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2014-01-23 17:21:30 +0100 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2014-01-23 17:21:30 +0100 |
commit | 8fb2b31e8de73872baddc3d983a4eea5c359329d (patch) | |
tree | 29a4cf80c6c8fa38d53586d02330f4783ff6a15c /src/plugins/HPMHooking/HPMHooking.Hooks.inc | |
parent | e68d860dbaa6b1bcf8104463cd3001ae946b7d4e (diff) | |
download | hercules-8fb2b31e8de73872baddc3d983a4eea5c359329d.tar.gz hercules-8fb2b31e8de73872baddc3d983a4eea5c359329d.tar.bz2 hercules-8fb2b31e8de73872baddc3d983a4eea5c359329d.tar.xz hercules-8fb2b31e8de73872baddc3d983a4eea5c359329d.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 24 |
1 files changed, 12 insertions, 12 deletions
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___; |