diff options
author | Haruna <haru@dotalux.com> | 2015-01-11 16:58:52 +0100 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2015-01-11 16:58:52 +0100 |
commit | 670fca4c54445440c25e1114e64170e3934645f1 (patch) | |
tree | 2283314884d273c4525d5b527cd0d6c9496020d1 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | 0500a83b68485616d53db34c2ac494faba6be7eb (diff) | |
parent | d5cbfe3188c9c0f91f74772237606863c5ff6114 (diff) | |
download | hercules-670fca4c54445440c25e1114e64170e3934645f1.tar.gz hercules-670fca4c54445440c25e1114e64170e3934645f1.tar.bz2 hercules-670fca4c54445440c25e1114e64170e3934645f1.tar.xz hercules-670fca4c54445440c25e1114e64170e3934645f1.zip |
Merge pull request #438 from 4144/pcdb_checkid
Convert pcdb_checkid into function in pc interface
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 3249949e7..9efaa6718 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -52854,6 +52854,33 @@ void HP_pc_expire_check(struct map_session_data *sd) { } return; } +bool HP_pc_db_checkid(unsigned int class_) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_pc_db_checkid_pre ) { + bool (*preHookFunc) (unsigned int *class_); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_db_checkid_pre[hIndex].func; + retVal___ = preHookFunc(&class_); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.db_checkid(class_); + } + if( HPMHooks.count.HP_pc_db_checkid_post ) { + bool (*postHookFunc) (bool retVal___, unsigned int *class_); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_db_checkid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &class_); + } + } + return retVal___; +} void HP_pc_autotrade_load(void) { int hIndex = 0; if( HPMHooks.count.HP_pc_autotrade_load_pre ) { |