summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorsmokexyz <sagunkho@hotmail.com>2017-05-22 20:51:25 +0800
committersmokexyz <sagunkho@hotmail.com>2017-05-22 20:51:25 +0800
commitd966a8e6860d418bb3a235e57928436127eba555 (patch)
treee63429ebb90c705fc5c6a823969cd07f0b85e1b8 /src/plugins/HPMHooking
parente8affc41f106503b530abaa7faa20d6e63b727b8 (diff)
downloadhercules-d966a8e6860d418bb3a235e57928436127eba555.tar.gz
hercules-d966a8e6860d418bb3a235e57928436127eba555.tar.bz2
hercules-d966a8e6860d418bb3a235e57928436127eba555.tar.xz
hercules-d966a8e6860d418bb3a235e57928436127eba555.zip
HPM Hook Update follow-up e8affc41f106503b530abaa7faa20d6e63b727b8
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc24
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc24
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc6
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc185
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc16
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc104
7 files changed, 355 insertions, 8 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 7042a43a7..65c7f23b1 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -2962,8 +2962,12 @@ typedef int (*HPMHOOK_pre_inter_quest_parse_frommap) (int *fd);
typedef int (*HPMHOOK_post_inter_quest_parse_frommap) (int retVal___, int fd);
#endif // CHAR_INT_QUEST_H
#ifdef CHAR_INT_STORAGE_H /* inter_storage */
-typedef int (*HPMHOOK_pre_inter_storage_tosql) (int *account_id, struct storage_data **p);
-typedef int (*HPMHOOK_post_inter_storage_tosql) (int retVal___, int account_id, struct storage_data *p);
+typedef struct DBData (*HPMHOOK_pre_inter_storage_ensure_account_storage) (union DBKey *key, va_list args);
+typedef struct DBData (*HPMHOOK_post_inter_storage_ensure_account_storage) (struct DBData retVal___, union DBKey key, va_list args);
+typedef int (*HPMHOOK_pre_inter_storage_clear_account_storage) (union DBKey *key, struct DBData **data, va_list args);
+typedef int (*HPMHOOK_post_inter_storage_clear_account_storage) (int retVal___, union DBKey key, struct DBData *data, va_list args);
+typedef int (*HPMHOOK_pre_inter_storage_tosql) (int *account_id, struct storage_data **cp, const struct storage_data **p);
+typedef int (*HPMHOOK_post_inter_storage_tosql) (int retVal___, int account_id, struct storage_data *cp, 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_guild_storage_tosql) (int *guild_id, const struct guild_storage **p);
@@ -3000,6 +3004,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) (const struct map_session_data **sd);
+typedef void (*HPMHOOK_post_intif_send_account_storage) (const struct map_session_data *sd);
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);
@@ -3130,10 +3138,14 @@ typedef void (*HPMHOOK_pre_intif_pWisToGM) (int *fd);
typedef void (*HPMHOOK_post_intif_pWisToGM) (int fd);
typedef void (*HPMHOOK_pre_intif_pRegisters) (int *fd);
typedef void (*HPMHOOK_post_intif_pRegisters) (int fd);
+typedef void (*HPMHOOK_pre_intif_pAccountStorage) (int *fd);
+typedef void (*HPMHOOK_post_intif_pAccountStorage) (int fd);
typedef void (*HPMHOOK_pre_intif_pChangeNameOk) (int *fd);
typedef void (*HPMHOOK_post_intif_pChangeNameOk) (int fd);
typedef void (*HPMHOOK_pre_intif_pMessageToFD) (int *fd);
typedef void (*HPMHOOK_post_intif_pMessageToFD) (int fd);
+typedef void (*HPMHOOK_pre_intif_pAccountStorageSaveAck) (int *fd);
+typedef void (*HPMHOOK_post_intif_pAccountStorageSaveAck) (int fd);
typedef void (*HPMHOOK_pre_intif_pLoadGuildStorage) (int *fd);
typedef void (*HPMHOOK_post_intif_pLoadGuildStorage) (int fd);
typedef void (*HPMHOOK_pre_intif_pSaveGuildStorage) (int *fd);
@@ -4366,6 +4378,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_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 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 int (*HPMHOOK_pre_mapif_parse_ItemBoundRetrieve_sub) (int *fd);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index eb5583035..5e449a4d1 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -624,6 +624,10 @@ struct {
struct HPMHookPoint *HP_inter_pet_parse_frommap_post;
struct HPMHookPoint *HP_inter_quest_parse_frommap_pre;
struct HPMHookPoint *HP_inter_quest_parse_frommap_post;
+ struct HPMHookPoint *HP_inter_storage_ensure_account_storage_pre;
+ struct HPMHookPoint *HP_inter_storage_ensure_account_storage_post;
+ struct HPMHookPoint *HP_inter_storage_clear_account_storage_pre;
+ struct HPMHookPoint *HP_inter_storage_clear_account_storage_post;
struct HPMHookPoint *HP_inter_storage_tosql_pre;
struct HPMHookPoint *HP_inter_storage_tosql_post;
struct HPMHookPoint *HP_inter_storage_fromsql_pre;
@@ -1104,6 +1108,14 @@ struct {
struct HPMHookPoint *HP_mapif_parse_LoadGuildStorage_post;
struct HPMHookPoint *HP_mapif_parse_SaveGuildStorage_pre;
struct HPMHookPoint *HP_mapif_parse_SaveGuildStorage_post;
+ struct HPMHookPoint *HP_mapif_account_storage_load_pre;
+ struct HPMHookPoint *HP_mapif_account_storage_load_post;
+ struct HPMHookPoint *HP_mapif_pAccountStorageLoad_pre;
+ struct HPMHookPoint *HP_mapif_pAccountStorageLoad_post;
+ struct HPMHookPoint *HP_mapif_pAccountStorageSave_pre;
+ struct HPMHookPoint *HP_mapif_pAccountStorageSave_post;
+ struct HPMHookPoint *HP_mapif_sAccountStorageSaveAck_pre;
+ struct HPMHookPoint *HP_mapif_sAccountStorageSaveAck_post;
struct HPMHookPoint *HP_mapif_itembound_ack_pre;
struct HPMHookPoint *HP_mapif_itembound_ack_post;
struct HPMHookPoint *HP_mapif_parse_ItemBoundRetrieve_sub_pre;
@@ -2101,6 +2113,10 @@ struct {
int HP_inter_pet_parse_frommap_post;
int HP_inter_quest_parse_frommap_pre;
int HP_inter_quest_parse_frommap_post;
+ int HP_inter_storage_ensure_account_storage_pre;
+ int HP_inter_storage_ensure_account_storage_post;
+ int HP_inter_storage_clear_account_storage_pre;
+ int HP_inter_storage_clear_account_storage_post;
int HP_inter_storage_tosql_pre;
int HP_inter_storage_tosql_post;
int HP_inter_storage_fromsql_pre;
@@ -2581,6 +2597,14 @@ struct {
int HP_mapif_parse_LoadGuildStorage_post;
int HP_mapif_parse_SaveGuildStorage_pre;
int HP_mapif_parse_SaveGuildStorage_post;
+ int HP_mapif_account_storage_load_pre;
+ int HP_mapif_account_storage_load_post;
+ int HP_mapif_pAccountStorageLoad_pre;
+ int HP_mapif_pAccountStorageLoad_post;
+ int HP_mapif_pAccountStorageSave_pre;
+ int HP_mapif_pAccountStorageSave_post;
+ int HP_mapif_sAccountStorageSaveAck_pre;
+ int HP_mapif_sAccountStorageSaveAck_post;
int HP_mapif_itembound_ack_pre;
int HP_mapif_itembound_ack_post;
int HP_mapif_parse_ItemBoundRetrieve_sub_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 29720bf40..9b07bdccd 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -344,6 +344,8 @@ struct HookingPointData HookingPoints[] = {
/* inter_quest_interface */
{ HP_POP(inter_quest->parse_frommap, HP_inter_quest_parse_frommap) },
/* inter_storage_interface */
+ { HP_POP(inter_storage->ensure_account_storage, HP_inter_storage_ensure_account_storage) },
+ { HP_POP(inter_storage->clear_account_storage, HP_inter_storage_clear_account_storage) },
{ HP_POP(inter_storage->tosql, HP_inter_storage_tosql) },
{ HP_POP(inter_storage->fromsql, HP_inter_storage_fromsql) },
{ HP_POP(inter_storage->guild_storage_tosql, HP_inter_storage_guild_storage_tosql) },
@@ -587,6 +589,10 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->save_guild_storage_ack, HP_mapif_save_guild_storage_ack) },
{ HP_POP(mapif->parse_LoadGuildStorage, HP_mapif_parse_LoadGuildStorage) },
{ HP_POP(mapif->parse_SaveGuildStorage, HP_mapif_parse_SaveGuildStorage) },
+ { HP_POP(mapif->account_storage_load, HP_mapif_account_storage_load) },
+ { HP_POP(mapif->pAccountStorageLoad, HP_mapif_pAccountStorageLoad) },
+ { HP_POP(mapif->pAccountStorageSave, HP_mapif_pAccountStorageSave) },
+ { HP_POP(mapif->sAccountStorageSaveAck, HP_mapif_sAccountStorageSaveAck) },
{ HP_POP(mapif->itembound_ack, HP_mapif_itembound_ack) },
{ HP_POP(mapif->parse_ItemBoundRetrieve_sub, HP_mapif_parse_ItemBoundRetrieve_sub) },
{ HP_POP(mapif->parse_ItemBoundRetrieve, HP_mapif_parse_ItemBoundRetrieve) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index d2853fcdc..656fd8e07 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -8032,15 +8032,81 @@ int HP_inter_quest_parse_frommap(int fd) {
return retVal___;
}
/* inter_storage_interface */
-int HP_inter_storage_tosql(int account_id, struct storage_data *p) {
+struct DBData HP_inter_storage_ensure_account_storage(union DBKey key, va_list args) {
+ int hIndex = 0;
+ struct DBData retVal___ = { 0 };
+ if (HPMHooks.count.HP_inter_storage_ensure_account_storage_pre > 0) {
+ struct DBData (*preHookFunc) (union DBKey *key, va_list args);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_ensure_account_storage_pre; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_inter_storage_ensure_account_storage_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, args___copy);
+ va_end(args___copy);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.inter_storage.ensure_account_storage(key, args___copy);
+ va_end(args___copy);
+ }
+ if (HPMHooks.count.HP_inter_storage_ensure_account_storage_post > 0) {
+ struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_ensure_account_storage_post; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_inter_storage_ensure_account_storage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, key, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_inter_storage_clear_account_storage(union DBKey key, struct DBData *data, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_inter_storage_clear_account_storage_pre > 0) {
+ int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_clear_account_storage_pre; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_inter_storage_clear_account_storage_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, &data, args___copy);
+ va_end(args___copy);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.inter_storage.clear_account_storage(key, data, args___copy);
+ va_end(args___copy);
+ }
+ if (HPMHooks.count.HP_inter_storage_clear_account_storage_post > 0) {
+ int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list args);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_clear_account_storage_post; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_inter_storage_clear_account_storage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, key, data, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_inter_storage_tosql(int account_id, struct storage_data *cp, 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, struct storage_data **p);
+ int (*preHookFunc) (int *account_id, struct storage_data **cp, 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, &cp, &p);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -8048,13 +8114,13 @@ int HP_inter_storage_tosql(int account_id, struct storage_data *p) {
}
}
{
- retVal___ = HPMHooks.source.inter_storage.tosql(account_id, p);
+ retVal___ = HPMHooks.source.inter_storage.tosql(account_id, cp, p);
}
if (HPMHooks.count.HP_inter_storage_tosql_post > 0) {
- int (*postHookFunc) (int retVal___, int account_id, struct storage_data *p);
+ int (*postHookFunc) (int retVal___, int account_id, struct storage_data *cp, 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, cp, p);
}
}
return retVal___;
@@ -14430,6 +14496,113 @@ int HP_mapif_parse_SaveGuildStorage(int fd) {
}
return retVal___;
}
+int HP_mapif_account_storage_load(int fd, int account_id) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_mapif_account_storage_load_pre > 0) {
+ int (*preHookFunc) (int *fd, int *account_id);
+ *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);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapif.account_storage_load(fd, account_id);
+ }
+ if (HPMHooks.count.HP_mapif_account_storage_load_post > 0) {
+ int (*postHookFunc) (int retVal___, int fd, int account_id);
+ 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);
+ }
+ }
+ return retVal___;
+}
+int HP_mapif_pAccountStorageLoad(int fd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_mapif_pAccountStorageLoad_pre > 0) {
+ int (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageLoad_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mapif_pAccountStorageLoad_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapif.pAccountStorageLoad(fd);
+ }
+ if (HPMHooks.count.HP_mapif_pAccountStorageLoad_post > 0) {
+ int (*postHookFunc) (int retVal___, int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageLoad_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mapif_pAccountStorageLoad_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fd);
+ }
+ }
+ return retVal___;
+}
+int HP_mapif_pAccountStorageSave(int fd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_mapif_pAccountStorageSave_pre > 0) {
+ int (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageSave_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mapif_pAccountStorageSave_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapif.pAccountStorageSave(fd);
+ }
+ if (HPMHooks.count.HP_mapif_pAccountStorageSave_post > 0) {
+ int (*postHookFunc) (int retVal___, int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageSave_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mapif_pAccountStorageSave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fd);
+ }
+ }
+ return retVal___;
+}
+void HP_mapif_sAccountStorageSaveAck(int fd, int account_id, bool save) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mapif_sAccountStorageSaveAck_pre > 0) {
+ void (*preHookFunc) (int *fd, int *account_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);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapif.sAccountStorageSaveAck(fd, account_id, save);
+ }
+ if (HPMHooks.count.HP_mapif_sAccountStorageSaveAck_post > 0) {
+ void (*postHookFunc) (int fd, int account_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);
+ }
+ }
+ return;
+}
int HP_mapif_itembound_ack(int fd, int aid, int guild_id) {
int hIndex = 0;
int retVal___ = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 762acb747..e84a9bd0d 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -2386,6 +2386,10 @@ struct {
struct HPMHookPoint *HP_intif_saveregistry_post;
struct HPMHookPoint *HP_intif_request_registry_pre;
struct HPMHookPoint *HP_intif_request_registry_post;
+ struct HPMHookPoint *HP_intif_request_account_storage_pre;
+ struct HPMHookPoint *HP_intif_request_account_storage_post;
+ struct HPMHookPoint *HP_intif_send_account_storage_pre;
+ struct HPMHookPoint *HP_intif_send_account_storage_post;
struct HPMHookPoint *HP_intif_request_guild_storage_pre;
struct HPMHookPoint *HP_intif_request_guild_storage_post;
struct HPMHookPoint *HP_intif_send_guild_storage_pre;
@@ -2516,10 +2520,14 @@ struct {
struct HPMHookPoint *HP_intif_pWisToGM_post;
struct HPMHookPoint *HP_intif_pRegisters_pre;
struct HPMHookPoint *HP_intif_pRegisters_post;
+ struct HPMHookPoint *HP_intif_pAccountStorage_pre;
+ struct HPMHookPoint *HP_intif_pAccountStorage_post;
struct HPMHookPoint *HP_intif_pChangeNameOk_pre;
struct HPMHookPoint *HP_intif_pChangeNameOk_post;
struct HPMHookPoint *HP_intif_pMessageToFD_pre;
struct HPMHookPoint *HP_intif_pMessageToFD_post;
+ struct HPMHookPoint *HP_intif_pAccountStorageSaveAck_pre;
+ struct HPMHookPoint *HP_intif_pAccountStorageSaveAck_post;
struct HPMHookPoint *HP_intif_pLoadGuildStorage_pre;
struct HPMHookPoint *HP_intif_pLoadGuildStorage_post;
struct HPMHookPoint *HP_intif_pSaveGuildStorage_pre;
@@ -8441,6 +8449,10 @@ struct {
int HP_intif_saveregistry_post;
int HP_intif_request_registry_pre;
int HP_intif_request_registry_post;
+ int HP_intif_request_account_storage_pre;
+ int HP_intif_request_account_storage_post;
+ int HP_intif_send_account_storage_pre;
+ int HP_intif_send_account_storage_post;
int HP_intif_request_guild_storage_pre;
int HP_intif_request_guild_storage_post;
int HP_intif_send_guild_storage_pre;
@@ -8571,10 +8583,14 @@ struct {
int HP_intif_pWisToGM_post;
int HP_intif_pRegisters_pre;
int HP_intif_pRegisters_post;
+ int HP_intif_pAccountStorage_pre;
+ int HP_intif_pAccountStorage_post;
int HP_intif_pChangeNameOk_pre;
int HP_intif_pChangeNameOk_post;
int HP_intif_pMessageToFD_pre;
int HP_intif_pMessageToFD_post;
+ int HP_intif_pAccountStorageSaveAck_pre;
+ int HP_intif_pAccountStorageSaveAck_post;
int HP_intif_pLoadGuildStorage_pre;
int HP_intif_pLoadGuildStorage_post;
int HP_intif_pSaveGuildStorage_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 65cd9ea82..a8ec0b4f5 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1228,6 +1228,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->wis_message_to_gm, HP_intif_wis_message_to_gm) },
{ HP_POP(intif->saveregistry, HP_intif_saveregistry) },
{ HP_POP(intif->request_registry, HP_intif_request_registry) },
+ { HP_POP(intif->request_account_storage, HP_intif_request_account_storage) },
+ { HP_POP(intif->send_account_storage, HP_intif_send_account_storage) },
{ HP_POP(intif->request_guild_storage, HP_intif_request_guild_storage) },
{ HP_POP(intif->send_guild_storage, HP_intif_send_guild_storage) },
{ HP_POP(intif->create_party, HP_intif_create_party) },
@@ -1293,8 +1295,10 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->pWisToGM_sub, HP_intif_pWisToGM_sub) },
{ HP_POP(intif->pWisToGM, HP_intif_pWisToGM) },
{ HP_POP(intif->pRegisters, HP_intif_pRegisters) },
+ { HP_POP(intif->pAccountStorage, HP_intif_pAccountStorage) },
{ HP_POP(intif->pChangeNameOk, HP_intif_pChangeNameOk) },
{ HP_POP(intif->pMessageToFD, HP_intif_pMessageToFD) },
+ { HP_POP(intif->pAccountStorageSaveAck, HP_intif_pAccountStorageSaveAck) },
{ HP_POP(intif->pLoadGuildStorage, HP_intif_pLoadGuildStorage) },
{ HP_POP(intif->pSaveGuildStorage, HP_intif_pSaveGuildStorage) },
{ HP_POP(intif->pPartyCreated, HP_intif_pPartyCreated) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 884e1e920..a13074cb9 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -31323,6 +31323,58 @@ 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) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_intif_request_account_storage_pre > 0) {
+ void (*preHookFunc) (const struct map_session_data **sd);
+ *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);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.request_account_storage(sd);
+ }
+ if (HPMHooks.count.HP_intif_request_account_storage_post > 0) {
+ void (*postHookFunc) (const struct map_session_data *sd);
+ 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);
+ }
+ }
+ return;
+}
+void HP_intif_send_account_storage(const struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_intif_send_account_storage_pre > 0) {
+ void (*preHookFunc) (const struct map_session_data **sd);
+ *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);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.send_account_storage(sd);
+ }
+ if (HPMHooks.count.HP_intif_send_account_storage_post > 0) {
+ void (*postHookFunc) (const struct map_session_data *sd);
+ 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);
+ }
+ }
+ return;
+}
int HP_intif_request_guild_storage(int account_id, int guild_id) {
int hIndex = 0;
int retVal___ = 0;
@@ -33077,6 +33129,32 @@ void HP_intif_pRegisters(int fd) {
}
return;
}
+void HP_intif_pAccountStorage(int fd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_intif_pAccountStorage_pre > 0) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorage_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_intif_pAccountStorage_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pAccountStorage(fd);
+ }
+ if (HPMHooks.count.HP_intif_pAccountStorage_post > 0) {
+ void (*postHookFunc) (int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorage_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_intif_pAccountStorage_post[hIndex].func;
+ postHookFunc(fd);
+ }
+ }
+ return;
+}
void HP_intif_pChangeNameOk(int fd) {
int hIndex = 0;
if (HPMHooks.count.HP_intif_pChangeNameOk_pre > 0) {
@@ -33129,6 +33207,32 @@ void HP_intif_pMessageToFD(int fd) {
}
return;
}
+void HP_intif_pAccountStorageSaveAck(int fd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_intif_pAccountStorageSaveAck_pre > 0) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorageSaveAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_intif_pAccountStorageSaveAck_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pAccountStorageSaveAck(fd);
+ }
+ if (HPMHooks.count.HP_intif_pAccountStorageSaveAck_post > 0) {
+ void (*postHookFunc) (int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorageSaveAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_intif_pAccountStorageSaveAck_post[hIndex].func;
+ postHookFunc(fd);
+ }
+ }
+ return;
+}
void HP_intif_pLoadGuildStorage(int fd) {
int hIndex = 0;
if (HPMHooks.count.HP_intif_pLoadGuildStorage_pre > 0) {