diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2014-12-20 00:13:35 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2014-12-20 00:13:35 +0800 |
commit | c4456ddbebccaca51ab040c60e3c586ed2cc0a10 (patch) | |
tree | 53d3e23baab08d63d88fdc055f6880f884aac640 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | 772cb2b111973c0c749e505ffd2685bb67e887bd (diff) | |
parent | 68f0fee76a73612263984da5d9de1e32b7ffe7da (diff) | |
download | hercules-c4456ddbebccaca51ab040c60e3c586ed2cc0a10.tar.gz hercules-c4456ddbebccaca51ab040c60e3c586ed2cc0a10.tar.bz2 hercules-c4456ddbebccaca51ab040c60e3c586ed2cc0a10.tar.xz hercules-c4456ddbebccaca51ab040c60e3c586ed2cc0a10.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 0169d43c7..62b1be620 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -34264,6 +34264,33 @@ struct item_combo* HP_itemdb_id2combo(unsigned short id) { } return retVal___; } +bool HP_itemdb_is_item_usable(struct item_data *item) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_itemdb_is_item_usable_pre ) { + bool (*preHookFunc) (struct item_data *item); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_is_item_usable_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_itemdb_is_item_usable_pre[hIndex].func; + retVal___ = preHookFunc(item); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.is_item_usable(item); + } + if( HPMHooks.count.HP_itemdb_is_item_usable_post ) { + bool (*postHookFunc) (bool retVal___, struct item_data *item); + for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_is_item_usable_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_itemdb_is_item_usable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, item); + } + } + return retVal___; +} /* logs */ void HP_logs_pick_pc(struct map_session_data *sd, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) { int hIndex = 0; @@ -42784,6 +42811,33 @@ int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) { } return retVal___; } +int HP_npc_onuntouch_event(struct map_session_data *sd, struct npc_data *nd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_npc_onuntouch_event_pre ) { + int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_onuntouch_event_pre[hIndex].func; + retVal___ = preHookFunc(sd, nd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.onuntouch_event(sd, nd); + } + if( HPMHooks.count.HP_npc_onuntouch_event_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_onuntouch_event_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, nd); + } + } + return retVal___; +} int HP_npc_enable_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; @@ -43454,6 +43508,33 @@ int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) } return retVal___; } +int HP_npc_untouch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_npc_untouch_areanpc_pre ) { + int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_pre[hIndex].func; + retVal___ = preHookFunc(sd, &m, &x, &y); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.untouch_areanpc(sd, m, x, y); + } + if( HPMHooks.count.HP_npc_untouch_areanpc_post ) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &m, &x, &y); + } + } + return retVal___; +} int HP_npc_touch_areanpc2(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; |