diff options
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 96 |
1 files changed, 87 insertions, 9 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 147458d09..bdae21c21 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2019 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27370,13 +27370,13 @@ void HP_clif_pBGQueueBattleBeginAck(int fd, struct map_session_data *sd) { } return; } -void HP_clif_pCashShopOpen(int fd, struct map_session_data *sd) { +void HP_clif_pCashShopOpen1(int fd, struct map_session_data *sd) { int hIndex = 0; - if (HPMHooks.count.HP_clif_pCashShopOpen_pre > 0) { + if (HPMHooks.count.HP_clif_pCashShopOpen1_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen1_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen1_pre[hIndex].func; preHookFunc(&fd, &sd); } if (*HPMforce_return) { @@ -27385,12 +27385,64 @@ void HP_clif_pCashShopOpen(int fd, struct map_session_data *sd) { } } { - HPMHooks.source.clif.pCashShopOpen(fd, sd); + HPMHooks.source.clif.pCashShopOpen1(fd, sd); } - if (HPMHooks.count.HP_clif_pCashShopOpen_post > 0) { + if (HPMHooks.count.HP_clif_pCashShopOpen1_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_clif_pCashShopOpen_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen1_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopOpen1_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pCashShopOpen2(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pCashShopOpen2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen2_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCashShopOpen2(fd, sd); + } + if (HPMHooks.count.HP_clif_pCashShopOpen2_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopOpen2_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pCashShopLimitedReq(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pCashShopLimitedReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopLimitedReq_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopLimitedReq_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCashShopLimitedReq(fd, sd); + } + if (HPMHooks.count.HP_clif_pCashShopLimitedReq_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopLimitedReq_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopLimitedReq_post[hIndex].func; postHookFunc(fd, sd); } } @@ -27578,6 +27630,32 @@ void HP_clif_cashShopBuyAck(int fd, struct map_session_data *sd, int itemId, enu } return; } +void HP_clif_cashShopOpen(int fd, struct map_session_data *sd, int tab) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cashShopOpen_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *tab); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopOpen_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cashShopOpen_pre[hIndex].func; + preHookFunc(&fd, &sd, &tab); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cashShopOpen(fd, sd, tab); + } + if (HPMHooks.count.HP_clif_cashShopOpen_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int tab); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopOpen_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cashShopOpen_post[hIndex].func; + postHookFunc(fd, sd, tab); + } + } + return; +} void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre > 0) { |