diff options
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Defs.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 17 |
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; |