diff options
author | Haruna <haru@dotalux.com> | 2014-12-16 22:44:08 +0100 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2014-12-16 22:44:08 +0100 |
commit | 57efadd40016af332be6c19f5f5e84b4104805bb (patch) | |
tree | e413519b4ef3df881a9bb245af824d1661765255 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | 445bb7d0595832b3fed3ad3218073c4f6b6bb207 (diff) | |
parent | dd6393551b6c93a9c6ebf9fcbe45c3eecf89dc81 (diff) | |
download | hercules-57efadd40016af332be6c19f5f5e84b4104805bb.tar.gz hercules-57efadd40016af332be6c19f5f5e84b4104805bb.tar.bz2 hercules-57efadd40016af332be6c19f5f5e84b4104805bb.tar.xz hercules-57efadd40016af332be6c19f5f5e84b4104805bb.zip |
Merge pull request #415 from 4144/pcfix
allow add script to pet egg.
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index cf4e0e871..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; |