summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2017-05-31 02:57:51 +0200
committerHerculesWSAPI <dev@herc.ws>2017-05-31 02:57:51 +0200
commitf30edc7f02fb0c290d302d9abc77d970bb05fb62 (patch)
tree374e06542915156d118c5f2810d32d022cc8d9e5 /src/plugins/HPMHooking
parent47a1e679cd35dc2e524fbeb31891d85e497821ce (diff)
downloadhercules-f30edc7f02fb0c290d302d9abc77d970bb05fb62.tar.gz
hercules-f30edc7f02fb0c290d302d9abc77d970bb05fb62.tar.bz2
hercules-f30edc7f02fb0c290d302d9abc77d970bb05fb62.tar.xz
hercules-f30edc7f02fb0c290d302d9abc77d970bb05fb62.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc10
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc3
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc104
4 files changed, 8 insertions, 121 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 608d38c6a..1a2e7a2d5 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -2962,12 +2962,8 @@ 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 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_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_guild_storage_tosql) (int *guild_id, const struct guild_storage **p);
@@ -2980,8 +2976,6 @@ 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 a03d771e2..21e136c2f 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -624,10 +624,6 @@ 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;
@@ -642,8 +638,6 @@ 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;
@@ -2115,10 +2109,6 @@ 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;
@@ -2133,8 +2123,6 @@ 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 1d063603a..639cdbdd2 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -344,8 +344,6 @@ 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) },
@@ -353,7 +351,6 @@ 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 c6a7ee191..96e068903 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -8032,81 +8032,15 @@ int HP_inter_quest_parse_frommap(int fd) {
return retVal___;
}
/* inter_storage_interface */
-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 HP_inter_storage_tosql(int account_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, struct storage_data **cp, const struct storage_data **p);
+ int (*preHookFunc) (int *account_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, &cp, &p);
+ retVal___ = preHookFunc(&account_id, &p);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -8114,13 +8048,13 @@ int HP_inter_storage_tosql(int account_id, struct storage_data *cp, const struct
}
}
{
- retVal___ = HPMHooks.source.inter_storage.tosql(account_id, cp, p);
+ retVal___ = HPMHooks.source.inter_storage.tosql(account_id, p);
}
if (HPMHooks.count.HP_inter_storage_tosql_post > 0) {
- int (*postHookFunc) (int retVal___, int account_id, struct storage_data *cp, const struct storage_data *p);
+ int (*postHookFunc) (int retVal___, int account_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, cp, p);
+ retVal___ = postHookFunc(retVal___, account_id, p);
}
}
return retVal___;
@@ -8286,32 +8220,6 @@ 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;