diff options
author | gumi <git@gumi.ca> | 2018-11-13 13:07:16 -0500 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-11-13 13:07:16 -0500 |
commit | afc68b65ad3a2a05eccd578acc2fe71a5f42655a (patch) | |
tree | efb1b7ba094243713ab062f16a0011ee33c4dfcd /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | c964aa4b43de4e534e1ea421841ee090cc71e6e8 (diff) | |
download | hercules-afc68b65ad3a2a05eccd578acc2fe71a5f42655a.tar.gz hercules-afc68b65ad3a2a05eccd578acc2fe71a5f42655a.tar.bz2 hercules-afc68b65ad3a2a05eccd578acc2fe71a5f42655a.tar.xz hercules-afc68b65ad3a2a05eccd578acc2fe71a5f42655a.zip |
update HPM hooks, for map_zone_remove_all
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index fa80a68fd..d8f515444 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -44624,6 +44624,32 @@ void HP_map_zone_remove(int m) { } return; } +void HP_map_zone_remove_all(int m) { + int hIndex = 0; + if (HPMHooks.count.HP_map_zone_remove_all_pre > 0) { + void (*preHookFunc) (int *m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_all_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_map_zone_remove_all_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.map.zone_remove_all(m); + } + if (HPMHooks.count.HP_map_zone_remove_all_post > 0) { + void (*postHookFunc) (int m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_all_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_map_zone_remove_all_post[hIndex].func; + postHookFunc(m); + } + } + return; +} void HP_map_zone_apply(int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath) { int hIndex = 0; if (HPMHooks.count.HP_map_zone_apply_pre > 0) { |