summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2018-08-26 17:01:42 +0200
committerHerculesWSAPI <dev@herc.ws>2018-08-26 17:01:42 +0200
commit1455dab58a381479b196c73b50b42990b9aff580 (patch)
tree500ac64004780198087be16d13ce79c54a3219f9 /src/plugins
parent0630ea01ef687ba22f4600a2f32fb4d3e448dcb8 (diff)
downloadhercules-1455dab58a381479b196c73b50b42990b9aff580.tar.gz
hercules-1455dab58a381479b196c73b50b42990b9aff580.tar.bz2
hercules-1455dab58a381479b196c73b50b42990b9aff580.tar.xz
hercules-1455dab58a381479b196c73b50b42990b9aff580.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.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 c5de44fa9..94ca75f6e 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -4430,6 +4430,8 @@ typedef void (*HPMHOOK_pre_map_zone_change) (int *m, struct map_zone_data **zone
typedef void (*HPMHOOK_post_map_zone_change) (int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath);
typedef void (*HPMHOOK_pre_map_zone_change2) (int *m, struct map_zone_data **zone);
typedef void (*HPMHOOK_post_map_zone_change2) (int m, struct map_zone_data *zone);
+typedef void (*HPMHOOK_pre_map_zone_reload) (void);
+typedef void (*HPMHOOK_post_map_zone_reload) (void);
typedef int (*HPMHOOK_pre_map_getcell) (int16 *m, const struct block_list **bl, int16 *x, int16 *y, cell_chk *cellchk);
typedef int (*HPMHOOK_post_map_getcell) (int retVal___, int16 m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk);
typedef void (*HPMHOOK_pre_map_setgatcell) (int16 *m, int16 *x, int16 *y, int *gat);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index d875ab6e2..3b598cd0d 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -3360,6 +3360,8 @@ struct {
struct HPMHookPoint *HP_map_zone_change_post;
struct HPMHookPoint *HP_map_zone_change2_pre;
struct HPMHookPoint *HP_map_zone_change2_post;
+ struct HPMHookPoint *HP_map_zone_reload_pre;
+ struct HPMHookPoint *HP_map_zone_reload_post;
struct HPMHookPoint *HP_map_getcell_pre;
struct HPMHookPoint *HP_map_getcell_post;
struct HPMHookPoint *HP_map_setgatcell_pre;
@@ -9921,6 +9923,8 @@ struct {
int HP_map_zone_change_post;
int HP_map_zone_change2_pre;
int HP_map_zone_change2_post;
+ int HP_map_zone_reload_pre;
+ int HP_map_zone_reload_post;
int HP_map_getcell_pre;
int HP_map_getcell_post;
int HP_map_setgatcell_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 0088847b1..70ea54928 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1723,6 +1723,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(map->zone_apply, HP_map_zone_apply) },
{ HP_POP(map->zone_change, HP_map_zone_change) },
{ HP_POP(map->zone_change2, HP_map_zone_change2) },
+ { HP_POP(map->zone_reload, HP_map_zone_reload) },
{ HP_POP(map->getcell, HP_map_getcell) },
{ HP_POP(map->setgatcell, HP_map_setgatcell) },
{ HP_POP(map->cellfromcache, HP_map_cellfromcache) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 3b21eb3e6..4231eedb7 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -44259,6 +44259,32 @@ void HP_map_zone_change2(int m, struct map_zone_data *zone) {
}
return;
}
+void HP_map_zone_reload(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_map_zone_reload_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_reload_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_map_zone_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.zone_reload();
+ }
+ if (HPMHooks.count.HP_map_zone_reload_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_reload_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_map_zone_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
int HP_map_getcell(int16 m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk) {
int hIndex = 0;
int retVal___ = 0;