summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc26
4 files changed, 33 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 65c7f23b1..608d38c6a 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -2980,6 +2980,8 @@ typedef void (*HPMHOOK_pre_inter_storage_sql_final) (void);
typedef void (*HPMHOOK_post_inter_storage_sql_final) (void);
typedef int (*HPMHOOK_pre_inter_storage_delete_) (int *account_id);
typedef int (*HPMHOOK_post_inter_storage_delete_) (int retVal___, int account_id);
+typedef void (*HPMHOOK_pre_inter_storage_delete_account_storage) (int *account_id);
+typedef void (*HPMHOOK_post_inter_storage_delete_account_storage) (int account_id);
typedef int (*HPMHOOK_pre_inter_storage_guild_storage_delete) (int *guild_id);
typedef int (*HPMHOOK_post_inter_storage_guild_storage_delete) (int retVal___, int guild_id);
typedef int (*HPMHOOK_pre_inter_storage_parse_frommap) (int *fd);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index 5e449a4d1..a03d771e2 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -642,6 +642,8 @@ struct {
struct HPMHookPoint *HP_inter_storage_sql_final_post;
struct HPMHookPoint *HP_inter_storage_delete__pre;
struct HPMHookPoint *HP_inter_storage_delete__post;
+ struct HPMHookPoint *HP_inter_storage_delete_account_storage_pre;
+ struct HPMHookPoint *HP_inter_storage_delete_account_storage_post;
struct HPMHookPoint *HP_inter_storage_guild_storage_delete_pre;
struct HPMHookPoint *HP_inter_storage_guild_storage_delete_post;
struct HPMHookPoint *HP_inter_storage_parse_frommap_pre;
@@ -2131,6 +2133,8 @@ struct {
int HP_inter_storage_sql_final_post;
int HP_inter_storage_delete__pre;
int HP_inter_storage_delete__post;
+ int HP_inter_storage_delete_account_storage_pre;
+ int HP_inter_storage_delete_account_storage_post;
int HP_inter_storage_guild_storage_delete_pre;
int HP_inter_storage_guild_storage_delete_post;
int HP_inter_storage_parse_frommap_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 9b07bdccd..1d063603a 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -353,6 +353,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(inter_storage->sql_init, HP_inter_storage_sql_init) },
{ HP_POP(inter_storage->sql_final, HP_inter_storage_sql_final) },
{ HP_POP(inter_storage->delete_, HP_inter_storage_delete_) },
+ { HP_POP(inter_storage->delete_account_storage, HP_inter_storage_delete_account_storage) },
{ HP_POP(inter_storage->guild_storage_delete, HP_inter_storage_guild_storage_delete) },
{ HP_POP(inter_storage->parse_frommap, HP_inter_storage_parse_frommap) },
/* libconfig_interface */
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index 656fd8e07..c6a7ee191 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -8286,6 +8286,32 @@ int HP_inter_storage_delete_(int account_id) {
}
return retVal___;
}
+void HP_inter_storage_delete_account_storage(int account_id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_inter_storage_delete_account_storage_pre > 0) {
+ void (*preHookFunc) (int *account_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete_account_storage_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_inter_storage_delete_account_storage_pre[hIndex].func;
+ preHookFunc(&account_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.inter_storage.delete_account_storage(account_id);
+ }
+ if (HPMHooks.count.HP_inter_storage_delete_account_storage_post > 0) {
+ void (*postHookFunc) (int account_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete_account_storage_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_inter_storage_delete_account_storage_post[hIndex].func;
+ postHookFunc(account_id);
+ }
+ }
+ return;
+}
int HP_inter_storage_guild_storage_delete(int guild_id) {
int hIndex = 0;
int retVal___ = 0;