diff options
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HookingPoints.inc | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 38 |
3 files changed, 6 insertions, 37 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index 3827f3e84..d85b2aed9 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -2567,8 +2567,6 @@ struct { struct HPMHookPoint *HP_itemdb_readdb_sql_post; struct HPMHookPoint *HP_itemdb_unique_id_pre; struct HPMHookPoint *HP_itemdb_unique_id_post; - struct HPMHookPoint *HP_itemdb_uid_load_pre; - struct HPMHookPoint *HP_itemdb_uid_load_post; struct HPMHookPoint *HP_itemdb_read_pre; struct HPMHookPoint *HP_itemdb_read_post; struct HPMHookPoint *HP_itemdb_destroy_item_data_pre; @@ -7606,8 +7604,6 @@ struct { int HP_itemdb_readdb_sql_post; int HP_itemdb_unique_id_pre; int HP_itemdb_unique_id_post; - int HP_itemdb_uid_load_pre; - int HP_itemdb_uid_load_post; int HP_itemdb_read_pre; int HP_itemdb_read_post; int HP_itemdb_destroy_item_data_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 8693f6b0f..7f731e727 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -1302,7 +1302,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->readdb_libconfig, HP_itemdb_readdb_libconfig) }, { HP_POP(itemdb->readdb_sql, HP_itemdb_readdb_sql) }, { HP_POP(itemdb->unique_id, HP_itemdb_unique_id) }, - { HP_POP(itemdb->uid_load, HP_itemdb_uid_load) }, { HP_POP(itemdb->read, HP_itemdb_read) }, { HP_POP(itemdb->destroy_item_data, HP_itemdb_destroy_item_data) }, { HP_POP(itemdb->final_sub, HP_itemdb_final_sub) }, 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___; |