summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-03-08 11:45:01 -0300
committerJesusaves <cpntb1@ymail.com>2021-03-08 11:45:01 -0300
commit05c1c0552fe6c94d8835a58f4608d0402614ce39 (patch)
tree25c6cddf9cd1767835266171d26d86d04882fdee /src/plugins
parent36b0aad136e42687ed5f5383f8d93128d73c398b (diff)
downloadhercules-05c1c0552fe6c94d8835a58f4608d0402614ce39.tar.gz
hercules-05c1c0552fe6c94d8835a58f4608d0402614ce39.tar.bz2
hercules-05c1c0552fe6c94d8835a58f4608d0402614ce39.tar.xz
hercules-05c1c0552fe6c94d8835a58f4608d0402614ce39.zip
[TMW2] Hercules Ultimate Storage System
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc70
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc48
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc28
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc7
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc306
5 files changed, 347 insertions, 112 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 83bbae1bf..4d9638494 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1690,8 +1690,8 @@ typedef void (*HPMHOOK_pre_clif_storageList) (struct map_session_data **sd, stru
typedef void (*HPMHOOK_post_clif_storageList) (struct map_session_data *sd, struct item *items, int items_length);
typedef void (*HPMHOOK_pre_clif_guildStorageList) (struct map_session_data **sd, struct item **items, int *items_length);
typedef void (*HPMHOOK_post_clif_guildStorageList) (struct map_session_data *sd, struct item *items, int items_length);
-typedef void (*HPMHOOK_pre_clif_storageItems) (struct map_session_data **sd, enum inventory_type *type, struct item **items, int *items_length);
-typedef void (*HPMHOOK_post_clif_storageItems) (struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length);
+typedef void (*HPMHOOK_pre_clif_storageItems) (struct map_session_data **sd, enum inventory_type *type, struct item **items, int *items_length, const char **name);
+typedef void (*HPMHOOK_post_clif_storageItems) (struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length, const char *name);
typedef void (*HPMHOOK_pre_clif_inventoryStart) (struct map_session_data **sd, enum inventory_type *type, const char **name);
typedef void (*HPMHOOK_post_clif_inventoryStart) (struct map_session_data *sd, enum inventory_type type, const char *name);
typedef void (*HPMHOOK_pre_clif_inventoryEnd) (struct map_session_data **sd, enum inventory_type *type);
@@ -3614,10 +3614,10 @@ typedef int (*HPMHOOK_pre_inter_rodex_getitems) (int64 *mail_id, struct rodex_it
typedef int (*HPMHOOK_post_inter_rodex_getitems) (int retVal___, int64 mail_id, struct rodex_item *items);
#endif // CHAR_INT_RODEX_H
#ifdef CHAR_INT_STORAGE_H /* inter_storage */
-typedef int (*HPMHOOK_pre_inter_storage_tosql) (int *account_id, const struct storage_data **p);
-typedef int (*HPMHOOK_post_inter_storage_tosql) (int retVal___, int account_id, const struct storage_data *p);
-typedef int (*HPMHOOK_pre_inter_storage_fromsql) (int *account_id, struct storage_data **p);
-typedef int (*HPMHOOK_post_inter_storage_fromsql) (int retVal___, int account_id, struct storage_data *p);
+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 bool (*HPMHOOK_pre_inter_storage_guild_storage_tosql) (int *guild_id, const struct guild_storage **p);
typedef bool (*HPMHOOK_post_inter_storage_guild_storage_tosql) (bool retVal___, int guild_id, const struct guild_storage *p);
typedef int (*HPMHOOK_pre_inter_storage_guild_storage_fromsql) (int *guild_id, struct guild_storage **p);
@@ -3644,10 +3644,10 @@ typedef int (*HPMHOOK_pre_intif_saveregistry) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_intif_saveregistry) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_intif_request_registry) (struct map_session_data **sd, int *flag);
typedef int (*HPMHOOK_post_intif_request_registry) (int retVal___, struct map_session_data *sd, int flag);
-typedef void (*HPMHOOK_pre_intif_request_account_storage) (const struct map_session_data **sd);
-typedef void (*HPMHOOK_post_intif_request_account_storage) (const struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_intif_send_account_storage) (struct map_session_data **sd);
-typedef void (*HPMHOOK_post_intif_send_account_storage) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_intif_request_account_storage) (const struct map_session_data **sd, int *storage_id);
+typedef void (*HPMHOOK_post_intif_request_account_storage) (const struct map_session_data *sd, int storage_id);
+typedef void (*HPMHOOK_pre_intif_send_account_storage) (struct map_session_data **sd, int *storage_id);
+typedef void (*HPMHOOK_post_intif_send_account_storage) (struct map_session_data *sd, int storage_id);
typedef int (*HPMHOOK_pre_intif_request_guild_storage) (int *account_id, int *guild_id);
typedef int (*HPMHOOK_post_intif_request_guild_storage) (int retVal___, int account_id, int guild_id);
typedef int (*HPMHOOK_pre_intif_send_guild_storage) (int *account_id, struct guild_storage **gstor);
@@ -5118,14 +5118,14 @@ typedef int (*HPMHOOK_pre_mapif_parse_LoadGuildStorage) (int *fd);
typedef int (*HPMHOOK_post_mapif_parse_LoadGuildStorage) (int retVal___, int fd);
typedef int (*HPMHOOK_pre_mapif_parse_SaveGuildStorage) (int *fd);
typedef int (*HPMHOOK_post_mapif_parse_SaveGuildStorage) (int retVal___, int fd);
-typedef int (*HPMHOOK_pre_mapif_account_storage_load) (int *fd, int *account_id);
-typedef int (*HPMHOOK_post_mapif_account_storage_load) (int retVal___, int fd, int account_id);
+typedef int (*HPMHOOK_pre_mapif_account_storage_load) (int *fd, int *account_id, int *storage_id, int *storage_size);
+typedef int (*HPMHOOK_post_mapif_account_storage_load) (int retVal___, int fd, int account_id, int storage_id, int storage_size);
typedef int (*HPMHOOK_pre_mapif_pAccountStorageLoad) (int *fd);
typedef int (*HPMHOOK_post_mapif_pAccountStorageLoad) (int retVal___, int fd);
typedef int (*HPMHOOK_pre_mapif_pAccountStorageSave) (int *fd);
typedef int (*HPMHOOK_post_mapif_pAccountStorageSave) (int retVal___, int fd);
-typedef void (*HPMHOOK_pre_mapif_sAccountStorageSaveAck) (int *fd, int *account_id, bool *save);
-typedef void (*HPMHOOK_post_mapif_sAccountStorageSaveAck) (int fd, int account_id, bool save);
+typedef void (*HPMHOOK_pre_mapif_sAccountStorageSaveAck) (int *fd, int *account_id, int *storage_id, bool *save);
+typedef void (*HPMHOOK_post_mapif_sAccountStorageSaveAck) (int fd, int account_id, int storage_id, bool save);
typedef int (*HPMHOOK_pre_mapif_itembound_ack) (int *fd, int *aid, int *guild_id);
typedef int (*HPMHOOK_post_mapif_itembound_ack) (int retVal___, int fd, int aid, int guild_id);
typedef void (*HPMHOOK_pre_mapif_parse_ItemBoundRetrieve) (int *fd);
@@ -8008,22 +8008,36 @@ typedef int (*HPMHOOK_pre_status_base_matk_max) (const struct status_data **st);
typedef int (*HPMHOOK_post_status_base_matk_max) (int retVal___, const struct status_data *st);
#endif // MAP_STATUS_H
#ifdef MAP_STORAGE_H /* storage */
+typedef void (*HPMHOOK_pre_storage_init) (bool *minimal);
+typedef void (*HPMHOOK_post_storage_init) (bool minimal);
+typedef void (*HPMHOOK_pre_storage_final) (void);
+typedef void (*HPMHOOK_post_storage_final) (void);
typedef void (*HPMHOOK_pre_storage_reconnect) (void);
typedef void (*HPMHOOK_post_storage_reconnect) (void);
-typedef int (*HPMHOOK_pre_storage_delitem) (struct map_session_data **sd, int *n, int *amount);
-typedef int (*HPMHOOK_post_storage_delitem) (int retVal___, struct map_session_data *sd, int n, int amount);
-typedef int (*HPMHOOK_pre_storage_open) (struct map_session_data **sd);
-typedef int (*HPMHOOK_post_storage_open) (int retVal___, struct map_session_data *sd);
-typedef int (*HPMHOOK_pre_storage_add) (struct map_session_data **sd, int *index, int *amount);
-typedef int (*HPMHOOK_post_storage_add) (int retVal___, struct map_session_data *sd, int index, int amount);
-typedef int (*HPMHOOK_pre_storage_get) (struct map_session_data **sd, int *index, int *amount);
-typedef int (*HPMHOOK_post_storage_get) (int retVal___, struct map_session_data *sd, int index, int amount);
-typedef int (*HPMHOOK_pre_storage_additem) (struct map_session_data **sd, struct item **item_data, int *amount);
-typedef int (*HPMHOOK_post_storage_additem) (int retVal___, struct map_session_data *sd, struct item *item_data, int amount);
-typedef int (*HPMHOOK_pre_storage_addfromcart) (struct map_session_data **sd, int *index, int *amount);
-typedef int (*HPMHOOK_post_storage_addfromcart) (int retVal___, struct map_session_data *sd, int index, int amount);
-typedef int (*HPMHOOK_pre_storage_gettocart) (struct map_session_data **sd, int *index, int *amount);
-typedef int (*HPMHOOK_post_storage_gettocart) (int retVal___, struct map_session_data *sd, int index, int amount);
+typedef bool (*HPMHOOK_pre_storage_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_storage_config_read) (bool retVal___, const char *filename, bool imported);
+typedef void (*HPMHOOK_pre_storage_config_read_additional_fields) (struct config_setting_t **t, struct storage_settings **s_conf, const char **filename);
+typedef void (*HPMHOOK_post_storage_config_read_additional_fields) (struct config_setting_t *t, struct storage_settings *s_conf, const char *filename);
+typedef int (*HPMHOOK_pre_storage_get_id_by_name) (const char **storage_name);
+typedef int (*HPMHOOK_post_storage_get_id_by_name) (int retVal___, const char *storage_name);
+typedef struct storage_data* (*HPMHOOK_pre_storage_ensure) (struct map_session_data **sd, int *storage_id);
+typedef struct storage_data* (*HPMHOOK_post_storage_ensure) (struct storage_data* retVal___, struct map_session_data *sd, int storage_id);
+typedef const struct storage_settings* (*HPMHOOK_pre_storage_get_settings) (int *storage_id);
+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_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);
+typedef int (*HPMHOOK_post_storage_get) (int retVal___, struct map_session_data *sd, struct storage_data *stor, int index, int amount);
+typedef int (*HPMHOOK_pre_storage_additem) (struct map_session_data **sd, struct storage_data **stor, struct item **item_data, int *amount);
+typedef int (*HPMHOOK_post_storage_additem) (int retVal___, struct map_session_data *sd, struct storage_data *stor, struct item *item_data, int amount);
+typedef int (*HPMHOOK_pre_storage_addfromcart) (struct map_session_data **sd, struct storage_data **stor, int *index, int *amount);
+typedef int (*HPMHOOK_post_storage_addfromcart) (int retVal___, struct map_session_data *sd, struct storage_data *stor, int index, int amount);
+typedef int (*HPMHOOK_pre_storage_gettocart) (struct map_session_data **sd, struct storage_data **stor, int *index, int *amount);
+typedef int (*HPMHOOK_post_storage_gettocart) (int retVal___, struct map_session_data *sd, struct storage_data *stor, int index, int amount);
typedef void (*HPMHOOK_pre_storage_close) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_storage_close) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_storage_pc_quit) (struct map_session_data **sd, int *flag);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index b25025b1d..7552ef1f9 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -9846,15 +9846,15 @@ int HP_inter_rodex_getitems(int64 mail_id, struct rodex_item *items) {
return retVal___;
}
/* inter_storage_interface */
-int HP_inter_storage_tosql(int account_id, const struct storage_data *p) {
+int HP_inter_storage_tosql(int account_id, int storage_id, const struct storage_data *p) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_inter_storage_tosql_pre > 0) {
- int (*preHookFunc) (int *account_id, const struct storage_data **p);
+ int (*preHookFunc) (int *account_id, int *storage_id, const struct storage_data **p);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_inter_storage_tosql_pre[hIndex].func;
- retVal___ = preHookFunc(&account_id, &p);
+ retVal___ = preHookFunc(&account_id, &storage_id, &p);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -9862,26 +9862,26 @@ int HP_inter_storage_tosql(int account_id, const struct storage_data *p) {
}
}
{
- retVal___ = HPMHooks.source.inter_storage.tosql(account_id, p);
+ retVal___ = HPMHooks.source.inter_storage.tosql(account_id, storage_id, p);
}
if (HPMHooks.count.HP_inter_storage_tosql_post > 0) {
- int (*postHookFunc) (int retVal___, int account_id, const struct storage_data *p);
+ int (*postHookFunc) (int retVal___, int account_id, int storage_id, const struct storage_data *p);
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_inter_storage_tosql_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, account_id, p);
+ retVal___ = postHookFunc(retVal___, account_id, storage_id, p);
}
}
return retVal___;
}
-int HP_inter_storage_fromsql(int account_id, struct storage_data *p) {
+int HP_inter_storage_fromsql(int account_id, int storage_id, struct storage_data *p, int storage_size) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_inter_storage_fromsql_pre > 0) {
- int (*preHookFunc) (int *account_id, struct storage_data **p);
+ int (*preHookFunc) (int *account_id, int *storage_id, struct storage_data **p, int *storage_size);
*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, &p);
+ retVal___ = preHookFunc(&account_id, &storage_id, &p, &storage_size);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -9889,13 +9889,13 @@ int HP_inter_storage_fromsql(int account_id, struct storage_data *p) {
}
}
{
- retVal___ = HPMHooks.source.inter_storage.fromsql(account_id, p);
+ retVal___ = HPMHooks.source.inter_storage.fromsql(account_id, storage_id, p, storage_size);
}
if (HPMHooks.count.HP_inter_storage_fromsql_post > 0) {
- int (*postHookFunc) (int retVal___, int account_id, struct storage_data *p);
+ int (*postHookFunc) (int retVal___, int account_id, int storage_id, struct storage_data *p, int storage_size);
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, p);
+ retVal___ = postHookFunc(retVal___, account_id, storage_id, p, storage_size);
}
}
return retVal___;
@@ -16065,15 +16065,15 @@ int HP_mapif_parse_SaveGuildStorage(int fd) {
}
return retVal___;
}
-int HP_mapif_account_storage_load(int fd, int account_id) {
+int HP_mapif_account_storage_load(int fd, int account_id, int storage_id, int storage_size) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_mapif_account_storage_load_pre > 0) {
- int (*preHookFunc) (int *fd, int *account_id);
+ int (*preHookFunc) (int *fd, int *account_id, int *storage_id, int *storage_size);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_storage_load_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_mapif_account_storage_load_pre[hIndex].func;
- retVal___ = preHookFunc(&fd, &account_id);
+ retVal___ = preHookFunc(&fd, &account_id, &storage_id, &storage_size);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -16081,13 +16081,13 @@ int HP_mapif_account_storage_load(int fd, int account_id) {
}
}
{
- retVal___ = HPMHooks.source.mapif.account_storage_load(fd, account_id);
+ retVal___ = HPMHooks.source.mapif.account_storage_load(fd, account_id, storage_id, storage_size);
}
if (HPMHooks.count.HP_mapif_account_storage_load_post > 0) {
- int (*postHookFunc) (int retVal___, int fd, int account_id);
+ int (*postHookFunc) (int retVal___, int fd, int account_id, int storage_id, int storage_size);
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_storage_load_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_mapif_account_storage_load_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, fd, account_id);
+ retVal___ = postHookFunc(retVal___, fd, account_id, storage_id, storage_size);
}
}
return retVal___;
@@ -16146,14 +16146,14 @@ int HP_mapif_pAccountStorageSave(int fd) {
}
return retVal___;
}
-void HP_mapif_sAccountStorageSaveAck(int fd, int account_id, bool save) {
+void HP_mapif_sAccountStorageSaveAck(int fd, int account_id, int storage_id, bool save) {
int hIndex = 0;
if (HPMHooks.count.HP_mapif_sAccountStorageSaveAck_pre > 0) {
- void (*preHookFunc) (int *fd, int *account_id, bool *save);
+ void (*preHookFunc) (int *fd, int *account_id, int *storage_id, bool *save);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sAccountStorageSaveAck_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_mapif_sAccountStorageSaveAck_pre[hIndex].func;
- preHookFunc(&fd, &account_id, &save);
+ preHookFunc(&fd, &account_id, &storage_id, &save);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -16161,13 +16161,13 @@ void HP_mapif_sAccountStorageSaveAck(int fd, int account_id, bool save) {
}
}
{
- HPMHooks.source.mapif.sAccountStorageSaveAck(fd, account_id, save);
+ HPMHooks.source.mapif.sAccountStorageSaveAck(fd, account_id, storage_id, save);
}
if (HPMHooks.count.HP_mapif_sAccountStorageSaveAck_post > 0) {
- void (*postHookFunc) (int fd, int account_id, bool save);
+ void (*postHookFunc) (int fd, int account_id, int storage_id, bool save);
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sAccountStorageSaveAck_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_mapif_sAccountStorageSaveAck_post[hIndex].func;
- postHookFunc(fd, account_id, save);
+ postHookFunc(fd, account_id, storage_id, save);
}
}
return;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 1196e3a99..fff6c6481 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -6528,8 +6528,22 @@ struct {
struct HPMHookPoint *HP_status_base_matk_min_post;
struct HPMHookPoint *HP_status_base_matk_max_pre;
struct HPMHookPoint *HP_status_base_matk_max_post;
+ struct HPMHookPoint *HP_storage_init_pre;
+ struct HPMHookPoint *HP_storage_init_post;
+ struct HPMHookPoint *HP_storage_final_pre;
+ struct HPMHookPoint *HP_storage_final_post;
struct HPMHookPoint *HP_storage_reconnect_pre;
struct HPMHookPoint *HP_storage_reconnect_post;
+ struct HPMHookPoint *HP_storage_config_read_pre;
+ struct HPMHookPoint *HP_storage_config_read_post;
+ struct HPMHookPoint *HP_storage_config_read_additional_fields_pre;
+ struct HPMHookPoint *HP_storage_config_read_additional_fields_post;
+ struct HPMHookPoint *HP_storage_get_id_by_name_pre;
+ struct HPMHookPoint *HP_storage_get_id_by_name_post;
+ struct HPMHookPoint *HP_storage_ensure_pre;
+ struct HPMHookPoint *HP_storage_ensure_post;
+ struct HPMHookPoint *HP_storage_get_settings_pre;
+ struct HPMHookPoint *HP_storage_get_settings_post;
struct HPMHookPoint *HP_storage_delitem_pre;
struct HPMHookPoint *HP_storage_delitem_post;
struct HPMHookPoint *HP_storage_open_pre;
@@ -13357,8 +13371,22 @@ struct {
int HP_status_base_matk_min_post;
int HP_status_base_matk_max_pre;
int HP_status_base_matk_max_post;
+ int HP_storage_init_pre;
+ int HP_storage_init_post;
+ int HP_storage_final_pre;
+ int HP_storage_final_post;
int HP_storage_reconnect_pre;
int HP_storage_reconnect_post;
+ int HP_storage_config_read_pre;
+ int HP_storage_config_read_post;
+ int HP_storage_config_read_additional_fields_pre;
+ int HP_storage_config_read_additional_fields_post;
+ int HP_storage_get_id_by_name_pre;
+ int HP_storage_get_id_by_name_post;
+ int HP_storage_ensure_pre;
+ int HP_storage_ensure_post;
+ int HP_storage_get_settings_pre;
+ int HP_storage_get_settings_post;
int HP_storage_delitem_pre;
int HP_storage_delitem_post;
int HP_storage_open_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index da72b688a..fd83e6100 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -3337,7 +3337,14 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(status->base_matk_min, HP_status_base_matk_min) },
{ HP_POP(status->base_matk_max, HP_status_base_matk_max) },
/* storage_interface */
+ { HP_POP(storage->init, HP_storage_init) },
+ { HP_POP(storage->final, HP_storage_final) },
{ HP_POP(storage->reconnect, HP_storage_reconnect) },
+ { HP_POP(storage->config_read, HP_storage_config_read) },
+ { HP_POP(storage->config_read_additional_fields, HP_storage_config_read_additional_fields) },
+ { HP_POP(storage->get_id_by_name, HP_storage_get_id_by_name) },
+ { HP_POP(storage->ensure, HP_storage_ensure) },
+ { HP_POP(storage->get_settings, HP_storage_get_settings) },
{ HP_POP(storage->delitem, HP_storage_delitem) },
{ HP_POP(storage->open, HP_storage_open) },
{ HP_POP(storage->add, HP_storage_add) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index a93d1e42e..8abbe934a 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -16694,14 +16694,14 @@ void HP_clif_guildStorageList(struct map_session_data *sd, struct item *items, i
}
return;
}
-void HP_clif_storageItems(struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length) {
+void HP_clif_storageItems(struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length, const char *name) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_storageItems_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type, struct item **items, int *items_length);
+ void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type, struct item **items, int *items_length, const char **name);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageItems_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_storageItems_pre[hIndex].func;
- preHookFunc(&sd, &type, &items, &items_length);
+ preHookFunc(&sd, &type, &items, &items_length, &name);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -16709,13 +16709,13 @@ void HP_clif_storageItems(struct map_session_data *sd, enum inventory_type type,
}
}
{
- HPMHooks.source.clif.storageItems(sd, type, items, items_length);
+ HPMHooks.source.clif.storageItems(sd, type, items, items_length, name);
}
if (HPMHooks.count.HP_clif_storageItems_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length);
+ void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length, const char *name);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageItems_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_storageItems_post[hIndex].func;
- postHookFunc(sd, type, items, items_length);
+ postHookFunc(sd, type, items, items_length, name);
}
}
return;
@@ -37338,14 +37338,14 @@ int HP_intif_request_registry(struct map_session_data *sd, int flag) {
}
return retVal___;
}
-void HP_intif_request_account_storage(const struct map_session_data *sd) {
+void HP_intif_request_account_storage(const struct map_session_data *sd, int storage_id) {
int hIndex = 0;
if (HPMHooks.count.HP_intif_request_account_storage_pre > 0) {
- void (*preHookFunc) (const struct map_session_data **sd);
+ void (*preHookFunc) (const struct map_session_data **sd, int *storage_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_account_storage_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_intif_request_account_storage_pre[hIndex].func;
- preHookFunc(&sd);
+ preHookFunc(&sd, &storage_id);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -37353,25 +37353,25 @@ void HP_intif_request_account_storage(const struct map_session_data *sd) {
}
}
{
- HPMHooks.source.intif.request_account_storage(sd);
+ HPMHooks.source.intif.request_account_storage(sd, storage_id);
}
if (HPMHooks.count.HP_intif_request_account_storage_post > 0) {
- void (*postHookFunc) (const struct map_session_data *sd);
+ void (*postHookFunc) (const struct map_session_data *sd, int storage_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_account_storage_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_intif_request_account_storage_post[hIndex].func;
- postHookFunc(sd);
+ postHookFunc(sd, storage_id);
}
}
return;
}
-void HP_intif_send_account_storage(struct map_session_data *sd) {
+void HP_intif_send_account_storage(struct map_session_data *sd, int storage_id) {
int hIndex = 0;
if (HPMHooks.count.HP_intif_send_account_storage_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd);
+ void (*preHookFunc) (struct map_session_data **sd, int *storage_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_account_storage_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_intif_send_account_storage_pre[hIndex].func;
- preHookFunc(&sd);
+ preHookFunc(&sd, &storage_id);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -37379,13 +37379,13 @@ void HP_intif_send_account_storage(struct map_session_data *sd) {
}
}
{
- HPMHooks.source.intif.send_account_storage(sd);
+ HPMHooks.source.intif.send_account_storage(sd, storage_id);
}
if (HPMHooks.count.HP_intif_send_account_storage_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd);
+ void (*postHookFunc) (struct map_session_data *sd, int storage_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_account_storage_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_intif_send_account_storage_post[hIndex].func;
- postHookFunc(sd);
+ postHookFunc(sd, storage_id);
}
}
return;
@@ -87343,6 +87343,58 @@ int HP_status_base_matk_max(const struct status_data *st) {
return retVal___;
}
/* storage_interface */
+void HP_storage_init(bool minimal) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_storage_init_pre > 0) {
+ void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_storage_init_pre[hIndex].func;
+ preHookFunc(&minimal);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.storage.init(minimal);
+ }
+ if (HPMHooks.count.HP_storage_init_post > 0) {
+ void (*postHookFunc) (bool minimal);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_storage_init_post[hIndex].func;
+ postHookFunc(minimal);
+ }
+ }
+ return;
+}
+void HP_storage_final(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_storage_final_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_final_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_storage_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.storage.final();
+ }
+ if (HPMHooks.count.HP_storage_final_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_final_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_storage_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
void HP_storage_reconnect(void) {
int hIndex = 0;
if (HPMHooks.count.HP_storage_reconnect_pre > 0) {
@@ -87369,15 +87421,149 @@ void HP_storage_reconnect(void) {
}
return;
}
-int HP_storage_delitem(struct map_session_data *sd, int n, int amount) {
+bool HP_storage_config_read(const char *filename, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_storage_config_read_pre > 0) {
+ bool (*preHookFunc) (const char **filename, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_config_read_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_storage_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.config_read(filename, imported);
+ }
+ if (HPMHooks.count.HP_storage_config_read_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_config_read_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_storage_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, imported);
+ }
+ }
+ return retVal___;
+}
+void HP_storage_config_read_additional_fields(struct config_setting_t *t, struct storage_settings *s_conf, const char *filename) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_storage_config_read_additional_fields_pre > 0) {
+ void (*preHookFunc) (struct config_setting_t **t, struct storage_settings **s_conf, const char **filename);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_config_read_additional_fields_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_storage_config_read_additional_fields_pre[hIndex].func;
+ preHookFunc(&t, &s_conf, &filename);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.storage.config_read_additional_fields(t, s_conf, filename);
+ }
+ if (HPMHooks.count.HP_storage_config_read_additional_fields_post > 0) {
+ void (*postHookFunc) (struct config_setting_t *t, struct storage_settings *s_conf, const char *filename);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_config_read_additional_fields_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_storage_config_read_additional_fields_post[hIndex].func;
+ postHookFunc(t, s_conf, filename);
+ }
+ }
+ return;
+}
+int HP_storage_get_id_by_name(const char *storage_name) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_storage_get_id_by_name_pre > 0) {
+ int (*preHookFunc) (const char **storage_name);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_id_by_name_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_storage_get_id_by_name_pre[hIndex].func;
+ retVal___ = preHookFunc(&storage_name);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.get_id_by_name(storage_name);
+ }
+ if (HPMHooks.count.HP_storage_get_id_by_name_post > 0) {
+ int (*postHookFunc) (int retVal___, const char *storage_name);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_id_by_name_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_storage_get_id_by_name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, storage_name);
+ }
+ }
+ return retVal___;
+}
+struct storage_data* HP_storage_ensure(struct map_session_data *sd, int storage_id) {
+ int hIndex = 0;
+ struct storage_data* retVal___ = NULL;
+ if (HPMHooks.count.HP_storage_ensure_pre > 0) {
+ struct storage_data* (*preHookFunc) (struct map_session_data **sd, int *storage_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_ensure_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_storage_ensure_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &storage_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.ensure(sd, storage_id);
+ }
+ if (HPMHooks.count.HP_storage_ensure_post > 0) {
+ struct storage_data* (*postHookFunc) (struct storage_data* retVal___, struct map_session_data *sd, int storage_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_ensure_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_storage_ensure_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, storage_id);
+ }
+ }
+ return retVal___;
+}
+const struct storage_settings* HP_storage_get_settings(int storage_id) {
+ int hIndex = 0;
+ const struct storage_settings* retVal___ = NULL;
+ if (HPMHooks.count.HP_storage_get_settings_pre > 0) {
+ const struct storage_settings* (*preHookFunc) (int *storage_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_settings_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_storage_get_settings_pre[hIndex].func;
+ retVal___ = preHookFunc(&storage_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.get_settings(storage_id);
+ }
+ if (HPMHooks.count.HP_storage_get_settings_post > 0) {
+ const struct storage_settings* (*postHookFunc) (const struct storage_settings* retVal___, int storage_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_settings_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_storage_get_settings_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, storage_id);
+ }
+ }
+ return retVal___;
+}
+int HP_storage_delitem(struct map_session_data *sd, struct storage_data *stor, int n, int amount) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_storage_delitem_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, int *n, int *amount);
+ int (*preHookFunc) (struct map_session_data **sd, struct storage_data **stor, int *n, int *amount);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_storage_delitem_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &n, &amount);
+ retVal___ = preHookFunc(&sd, &stor, &n, &amount);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -87385,26 +87571,26 @@ int HP_storage_delitem(struct map_session_data *sd, int n, int amount) {
}
}
{
- retVal___ = HPMHooks.source.storage.delitem(sd, n, amount);
+ retVal___ = HPMHooks.source.storage.delitem(sd, stor, n, amount);
}
if (HPMHooks.count.HP_storage_delitem_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int n, int amount);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct storage_data *stor, int n, int amount);
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_storage_delitem_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, n, amount);
+ retVal___ = postHookFunc(retVal___, sd, stor, n, amount);
}
}
return retVal___;
}
-int HP_storage_open(struct map_session_data *sd) {
+int HP_storage_open(struct map_session_data *sd, struct storage_data *stor) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_storage_open_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd);
+ int (*preHookFunc) (struct map_session_data **sd, struct storage_data **stor);
*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);
+ retVal___ = preHookFunc(&sd, &stor);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -87412,26 +87598,26 @@ int HP_storage_open(struct map_session_data *sd) {
}
}
{
- retVal___ = HPMHooks.source.storage.open(sd);
+ retVal___ = HPMHooks.source.storage.open(sd, stor);
}
if (HPMHooks.count.HP_storage_open_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct storage_data *stor);
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_storage_open_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd);
+ retVal___ = postHookFunc(retVal___, sd, stor);
}
}
return retVal___;
}
-int HP_storage_add(struct map_session_data *sd, int index, int amount) {
+int HP_storage_add(struct map_session_data *sd, struct storage_data *stor, int index, int amount) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_storage_add_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount);
+ int (*preHookFunc) (struct map_session_data **sd, struct storage_data **stor, int *index, int *amount);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_storage_add_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &index, &amount);
+ retVal___ = preHookFunc(&sd, &stor, &index, &amount);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -87439,26 +87625,26 @@ int HP_storage_add(struct map_session_data *sd, int index, int amount) {
}
}
{
- retVal___ = HPMHooks.source.storage.add(sd, index, amount);
+ retVal___ = HPMHooks.source.storage.add(sd, stor, index, amount);
}
if (HPMHooks.count.HP_storage_add_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct storage_data *stor, int index, int amount);
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_storage_add_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, index, amount);
+ retVal___ = postHookFunc(retVal___, sd, stor, index, amount);
}
}
return retVal___;
}
-int HP_storage_get(struct map_session_data *sd, int index, int amount) {
+int HP_storage_get(struct map_session_data *sd, struct storage_data *stor, int index, int amount) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_storage_get_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount);
+ int (*preHookFunc) (struct map_session_data **sd, struct storage_data **stor, int *index, int *amount);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_storage_get_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &index, &amount);
+ retVal___ = preHookFunc(&sd, &stor, &index, &amount);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -87466,26 +87652,26 @@ int HP_storage_get(struct map_session_data *sd, int index, int amount) {
}
}
{
- retVal___ = HPMHooks.source.storage.get(sd, index, amount);
+ retVal___ = HPMHooks.source.storage.get(sd, stor, index, amount);
}
if (HPMHooks.count.HP_storage_get_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct storage_data *stor, int index, int amount);
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_storage_get_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, index, amount);
+ retVal___ = postHookFunc(retVal___, sd, stor, index, amount);
}
}
return retVal___;
}
-int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int amount) {
+int HP_storage_additem(struct map_session_data *sd, struct storage_data *stor, struct item *item_data, int amount) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_storage_additem_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, struct item **item_data, int *amount);
+ int (*preHookFunc) (struct map_session_data **sd, struct storage_data **stor, struct item **item_data, int *amount);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_storage_additem_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &item_data, &amount);
+ retVal___ = preHookFunc(&sd, &stor, &item_data, &amount);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -87493,26 +87679,26 @@ int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int
}
}
{
- retVal___ = HPMHooks.source.storage.additem(sd, item_data, amount);
+ retVal___ = HPMHooks.source.storage.additem(sd, stor, item_data, amount);
}
if (HPMHooks.count.HP_storage_additem_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int amount);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct storage_data *stor, struct item *item_data, int amount);
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_storage_additem_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, item_data, amount);
+ retVal___ = postHookFunc(retVal___, sd, stor, item_data, amount);
}
}
return retVal___;
}
-int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) {
+int HP_storage_addfromcart(struct map_session_data *sd, struct storage_data *stor, int index, int amount) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_storage_addfromcart_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount);
+ int (*preHookFunc) (struct map_session_data **sd, struct storage_data **stor, int *index, int *amount);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_storage_addfromcart_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &index, &amount);
+ retVal___ = preHookFunc(&sd, &stor, &index, &amount);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -87520,26 +87706,26 @@ int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) {
}
}
{
- retVal___ = HPMHooks.source.storage.addfromcart(sd, index, amount);
+ retVal___ = HPMHooks.source.storage.addfromcart(sd, stor, index, amount);
}
if (HPMHooks.count.HP_storage_addfromcart_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct storage_data *stor, int index, int amount);
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_storage_addfromcart_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, index, amount);
+ retVal___ = postHookFunc(retVal___, sd, stor, index, amount);
}
}
return retVal___;
}
-int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) {
+int HP_storage_gettocart(struct map_session_data *sd, struct storage_data *stor, int index, int amount) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_storage_gettocart_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount);
+ int (*preHookFunc) (struct map_session_data **sd, struct storage_data **stor, int *index, int *amount);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_storage_gettocart_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &index, &amount);
+ retVal___ = preHookFunc(&sd, &stor, &index, &amount);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -87547,13 +87733,13 @@ int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) {
}
}
{
- retVal___ = HPMHooks.source.storage.gettocart(sd, index, amount);
+ retVal___ = HPMHooks.source.storage.gettocart(sd, stor, index, amount);
}
if (HPMHooks.count.HP_storage_gettocart_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct storage_data *stor, int index, int amount);
for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_storage_gettocart_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, index, amount);
+ retVal___ = postHookFunc(retVal___, sd, stor, index, amount);
}
}
return retVal___;