diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2014-04-19 22:38:28 +0200 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2014-04-19 22:38:28 +0200 |
commit | 11d2525f4a7a358030caaa17fe82dc7bab8fe63f (patch) | |
tree | 0d87c909a27d961c94f4c877b2d0a581b81c1d84 /src/plugins/HPMHooking/HPMHooking.Hooks.inc | |
parent | 93584f7416164985220293b7c08fcc29c4d5060f (diff) | |
download | hercules-11d2525f4a7a358030caaa17fe82dc7bab8fe63f.tar.gz hercules-11d2525f4a7a358030caaa17fe82dc7bab8fe63f.tar.bz2 hercules-11d2525f4a7a358030caaa17fe82dc7bab8fe63f.tar.xz hercules-11d2525f4a7a358030caaa17fe82dc7bab8fe63f.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 626040e7a..606197a6c 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -32693,14 +32693,14 @@ int HP_itemdb_readdb_sql(const char *tablename) { } return retVal___; } -uint64 HP_itemdb_unique_id(int8 flag, int64 value) { +uint64 HP_itemdb_unique_id(struct map_session_data *sd) { int hIndex = 0; uint64 retVal___ = 0; if( HPMHooks.count.HP_itemdb_unique_id_pre ) { - uint64 (*preHookFunc) (int8 *flag, int64 *value); + uint64 (*preHookFunc) (struct map_session_data *sd); for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_itemdb_unique_id_pre[hIndex].func; - retVal___ = preHookFunc(&flag, &value); + retVal___ = preHookFunc(sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -32708,39 +32708,13 @@ uint64 HP_itemdb_unique_id(int8 flag, int64 value) { } } { - retVal___ = HPMHooks.source.itemdb.unique_id(flag, value); + retVal___ = HPMHooks.source.itemdb.unique_id(sd); } if( HPMHooks.count.HP_itemdb_unique_id_post ) { - uint64 (*postHookFunc) (uint64 retVal___, int8 *flag, int64 *value); + uint64 (*postHookFunc) (uint64 retVal___, struct map_session_data *sd); for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_itemdb_unique_id_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &flag, &value); - } - } - return retVal___; -} -int HP_itemdb_uid_load(void) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_uid_load_pre ) { - int (*preHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_uid_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_itemdb_uid_load_pre[hIndex].func; - retVal___ = preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.itemdb.uid_load(); - } - if( HPMHooks.count.HP_itemdb_uid_load_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_uid_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_itemdb_uid_load_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; |