diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index a8c7747bb3c..5c137873fea 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -391,7 +391,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "script_reg_str", sizeof(struct script_reg_str), SERVER_TYPE_ALL }, { "status_change_data", sizeof(struct status_change_data), SERVER_TYPE_ALL }, { "storage_data", sizeof(struct storage_data), SERVER_TYPE_ALL }, - { "storage_settings", sizeof(struct storage_settings), SERVER_TYPE_ALL }, #else #define COMMON_MMO_H #endif // COMMON_MMO_H @@ -1240,6 +1239,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { #ifdef MAP_STORAGE_H { "guild_storage_interface", sizeof(struct guild_storage_interface), SERVER_TYPE_MAP }, { "storage_interface", sizeof(struct storage_interface), SERVER_TYPE_MAP }, + { "storage_settings", sizeof(struct storage_settings), SERVER_TYPE_MAP }, #else #define MAP_STORAGE_H #endif // MAP_STORAGE_H diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 3a76ef5b5d8..b1281acb826 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -4380,8 +4380,8 @@ typedef int (*HPMHOOK_post_inter_rodex_getitems) (int retVal___, int64 mail_id, #ifdef CHAR_INT_STORAGE_H /* inter_storage */ typedef int (*HPMHOOK_pre_inter_storage_tosql) (int *account_id, int *storage_id, const struct storage_data **p); typedef int (*HPMHOOK_post_inter_storage_tosql) (int retVal___, int account_id, int storage_id, const struct storage_data *p); -typedef int (*HPMHOOK_pre_inter_storage_fromsql) (int *account_id, int *storage_id, struct storage_data **p, int *storage_size); -typedef int (*HPMHOOK_post_inter_storage_fromsql) (int retVal___, int account_id, int storage_id, struct storage_data *p, int storage_size); +typedef int (*HPMHOOK_pre_inter_storage_fromsql) (int *account_id, int *storage_id, struct storage_data **p); +typedef int (*HPMHOOK_post_inter_storage_fromsql) (int retVal___, int account_id, int storage_id, struct storage_data *p); typedef bool (*HPMHOOK_pre_inter_storage_guild_storage_tosql) (int *guild_id, const struct guild_storage **gstor); typedef bool (*HPMHOOK_post_inter_storage_guild_storage_tosql) (bool retVal___, int guild_id, const struct guild_storage *gstor); typedef int (*HPMHOOK_pre_inter_storage_guild_storage_fromsql) (int *guild_id, struct guild_storage **gstor); @@ -9376,8 +9376,8 @@ typedef const struct storage_settings * (*HPMHOOK_pre_storage_get_settings) (int typedef const struct storage_settings * (*HPMHOOK_post_storage_get_settings) (const struct storage_settings * retVal___, int storage_id); typedef int (*HPMHOOK_pre_storage_delitem) (struct map_session_data **sd, struct storage_data **stor, int *n, int *amount); typedef int (*HPMHOOK_post_storage_delitem) (int retVal___, struct map_session_data *sd, struct storage_data *stor, int n, int amount); -typedef int (*HPMHOOK_pre_storage_open) (struct map_session_data **sd, struct storage_data **stor); -typedef int (*HPMHOOK_post_storage_open) (int retVal___, struct map_session_data *sd, struct storage_data *stor); +typedef int (*HPMHOOK_pre_storage_open) (struct map_session_data **sd, struct storage_data **stor, enum storage_access_modes *mode); +typedef int (*HPMHOOK_post_storage_open) (int retVal___, struct map_session_data *sd, struct storage_data *stor, enum storage_access_modes mode); typedef int (*HPMHOOK_pre_storage_add) (struct map_session_data **sd, struct storage_data **stor, int *index, int *amount); typedef int (*HPMHOOK_post_storage_add) (int retVal___, struct map_session_data *sd, struct storage_data *stor, int index, int amount); typedef int (*HPMHOOK_pre_storage_get) (struct map_session_data **sd, struct storage_data **stor, int *index, int *amount); diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index d082fd08300..35787b9043b 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -11075,15 +11075,15 @@ int HP_inter_storage_tosql(int account_id, int storage_id, const struct storage_ } return retVal___; } -int HP_inter_storage_fromsql(int account_id, int storage_id, struct storage_data *p, int storage_size) { +int HP_inter_storage_fromsql(int account_id, int storage_id, struct storage_data *p) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_inter_storage_fromsql_pre > 0) { - int (*preHookFunc) (int *account_id, int *storage_id, struct storage_data **p, int *storage_size); + int (*preHookFunc) (int *account_id, int *storage_id, struct storage_data **p); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&account_id, &storage_id, &p, &storage_size); + retVal___ = preHookFunc(&account_id, &storage_id, &p); } if (*HPMforce_return) { *HPMforce_return = false; @@ -11091,13 +11091,13 @@ int HP_inter_storage_fromsql(int account_id, int storage_id, struct storage_data } } { - retVal___ = HPMHooks.source.inter_storage.fromsql(account_id, storage_id, p, storage_size); + retVal___ = HPMHooks.source.inter_storage.fromsql(account_id, storage_id, p); } if (HPMHooks.count.HP_inter_storage_fromsql_post > 0) { - int (*postHookFunc) (int retVal___, int account_id, int storage_id, struct storage_data *p, int storage_size); + int (*postHookFunc) (int retVal___, int account_id, int storage_id, struct storage_data *p); for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, account_id, storage_id, p, storage_size); + retVal___ = postHookFunc(retVal___, account_id, storage_id, p); } } return retVal___; diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 891e28a8a31..a761c1a00ee 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -97442,15 +97442,15 @@ int HP_storage_delitem(struct map_session_data *sd, struct storage_data *stor, i } return retVal___; } -int HP_storage_open(struct map_session_data *sd, struct storage_data *stor) { +int HP_storage_open(struct map_session_data *sd, struct storage_data *stor, enum storage_access_modes mode) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_storage_open_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd, struct storage_data **stor); + int (*preHookFunc) (struct map_session_data **sd, struct storage_data **stor, enum storage_access_modes *mode); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_storage_open_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &stor); + retVal___ = preHookFunc(&sd, &stor, &mode); } if (*HPMforce_return) { *HPMforce_return = false; @@ -97458,13 +97458,13 @@ int HP_storage_open(struct map_session_data *sd, struct storage_data *stor) { } } { - retVal___ = HPMHooks.source.storage.open(sd, stor); + retVal___ = HPMHooks.source.storage.open(sd, stor, mode); } if (HPMHooks.count.HP_storage_open_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct storage_data *stor); + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct storage_data *stor, enum storage_access_modes mode); for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_storage_open_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, stor); + retVal___ = postHookFunc(retVal___, sd, stor, mode); } } return retVal___;