diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2015-07-08 03:44:39 +0200 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2015-07-08 03:44:39 +0200 |
commit | 488a874c136192e48e24afee710e7381b7cd5bd6 (patch) | |
tree | bb51e396a86b79569dc2e5a90cc907e2f9e8faf8 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | 041e0625b543215e8b319fc4ef32fa24cd199656 (diff) | |
download | hercules-488a874c136192e48e24afee710e7381b7cd5bd6.tar.gz hercules-488a874c136192e48e24afee710e7381b7cd5bd6.tar.bz2 hercules-488a874c136192e48e24afee710e7381b7cd5bd6.tar.xz hercules-488a874c136192e48e24afee710e7381b7cd5bd6.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index c623747aa..04f31aea5 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -17751,6 +17751,111 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char re } return; } +void HP_clif_openmergeitem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_openmergeitem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_openmergeitem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.openmergeitem(fd, sd); + } + if( HPMHooks.count.HP_clif_openmergeitem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_openmergeitem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_clif_cancelmergeitem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_cancelmergeitem_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_cancelmergeitem_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cancelmergeitem(fd, sd); + } + if( HPMHooks.count.HP_clif_cancelmergeitem_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_cancelmergeitem_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +int HP_clif_comparemergeitem(const void *a, const void *b) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_clif_comparemergeitem_pre ) { + int (*preHookFunc) (const void *a, const void *b); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_comparemergeitem_pre[hIndex].func; + retVal___ = preHookFunc(a, b); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.comparemergeitem(a, b); + } + if( HPMHooks.count.HP_clif_comparemergeitem_post ) { + int (*postHookFunc) (int retVal___, const void *a, const void *b); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_comparemergeitem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, a, b); + } + } + return retVal___; +} +void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_clif_ackmergeitems_pre ) { + void (*preHookFunc) (int *fd, struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_clif_ackmergeitems_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ackmergeitems(fd, sd); + } + if( HPMHooks.count.HP_clif_ackmergeitems_post ) { + void (*postHookFunc) (int *fd, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_clif_ackmergeitems_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_clif_pWantToConnection_pre ) { |