summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2018-04-25 17:23:16 +0200
committerHerculesWSAPI <dev@herc.ws>2018-04-25 17:23:16 +0200
commit611c7db42af28fad06a2b2e56c327403d9af3d6f (patch)
treeb865995b33e1acbc75232ac188ac428d081e2c21 /src
parentd8c6912572f60284d61d819b20031a75f3d9b25f (diff)
downloadhercules-611c7db42af28fad06a2b2e56c327403d9af3d6f.tar.gz
hercules-611c7db42af28fad06a2b2e56c327403d9af3d6f.tar.bz2
hercules-611c7db42af28fad06a2b2e56c327403d9af3d6f.tar.xz
hercules-611c7db42af28fad06a2b2e56c327403d9af3d6f.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc17
2 files changed, 11 insertions, 10 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index d2b03c16c..fe95b7074 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -4286,8 +4286,8 @@ typedef bool (*HPMHOOK_pre_map_iwall_set) (int16 *m, int16 *x, int16 *y, int *si
typedef bool (*HPMHOOK_post_map_iwall_set) (bool retVal___, int16 m, int16 x, int16 y, int size, int8 dir, bool shootable, const char *wall_name);
typedef void (*HPMHOOK_pre_map_iwall_get) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_map_iwall_get) (struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_map_iwall_remove) (const char **wall_name);
-typedef void (*HPMHOOK_post_map_iwall_remove) (const char *wall_name);
+typedef bool (*HPMHOOK_pre_map_iwall_remove) (const char **wall_name);
+typedef bool (*HPMHOOK_post_map_iwall_remove) (bool retVal___, const char *wall_name);
typedef int (*HPMHOOK_pre_map_addmobtolist) (unsigned short *m, struct spawn_data **spawn);
typedef int (*HPMHOOK_post_map_addmobtolist) (int retVal___, unsigned short m, struct spawn_data *spawn);
typedef void (*HPMHOOK_pre_map_spawnmobs) (int16 *m);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 02cf68bd2..ca19685a9 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -44099,31 +44099,32 @@ void HP_map_iwall_get(struct map_session_data *sd) {
}
return;
}
-void HP_map_iwall_remove(const char *wall_name) {
+bool HP_map_iwall_remove(const char *wall_name) {
int hIndex = 0;
+ bool retVal___ = false;
if (HPMHooks.count.HP_map_iwall_remove_pre > 0) {
- void (*preHookFunc) (const char **wall_name);
+ bool (*preHookFunc) (const char **wall_name);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_map_iwall_remove_pre[hIndex].func;
- preHookFunc(&wall_name);
+ retVal___ = preHookFunc(&wall_name);
}
if (*HPMforce_return) {
*HPMforce_return = false;
- return;
+ return retVal___;
}
}
{
- HPMHooks.source.map.iwall_remove(wall_name);
+ retVal___ = HPMHooks.source.map.iwall_remove(wall_name);
}
if (HPMHooks.count.HP_map_iwall_remove_post > 0) {
- void (*postHookFunc) (const char *wall_name);
+ bool (*postHookFunc) (bool retVal___, const char *wall_name);
for (hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_map_iwall_remove_post[hIndex].func;
- postHookFunc(wall_name);
+ retVal___ = postHookFunc(retVal___, wall_name);
}
}
- return;
+ return retVal___;
}
int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) {
int hIndex = 0;