diff options
author | Hercules.ws <dev@herc.ws> | 2019-02-11 01:03:29 +0100 |
---|---|---|
committer | HerculesWSAPI <dev@herc.ws> | 2019-02-11 01:03:29 +0100 |
commit | bfedf40f23eef409fd0dcc1cb85ed63b0166317b (patch) | |
tree | e047cc055d2046490cb5c12ce27e935c4c444d08 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | 277c9edf4fb18dbb594fc293289d0b74ecc143d9 (diff) | |
download | hercules-bfedf40f23eef409fd0dcc1cb85ed63b0166317b.tar.gz hercules-bfedf40f23eef409fd0dcc1cb85ed63b0166317b.tar.bz2 hercules-bfedf40f23eef409fd0dcc1cb85ed63b0166317b.tar.xz hercules-bfedf40f23eef409fd0dcc1cb85ed63b0166317b.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index af1fc7bc4..52ec843d2 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -29408,6 +29408,32 @@ void HP_clif_pNPCBarterPurchase(int fd, struct map_session_data *sd) { } return; } +void HP_clif_pClientVersion(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pClientVersion_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pClientVersion_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pClientVersion(fd, sd); + } + if (HPMHooks.count.HP_clif_pClientVersion_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pClientVersion_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; |