summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2017-07-27 10:40:22 +0200
committerHerculesWSAPI <dev@herc.ws>2017-07-27 10:40:22 +0200
commit71d694baa88d2beb6ec0f89fb2f8b733898acea5 (patch)
treea08addf659b4923c9cf400f2e09a05a292f4bb9f
parentb04ce31b952c75d5206fbfec68f2a2712da833c3 (diff)
downloadhercules-71d694baa88d2beb6ec0f89fb2f8b733898acea5.tar.gz
hercules-71d694baa88d2beb6ec0f89fb2f8b733898acea5.tar.bz2
hercules-71d694baa88d2beb6ec0f89fb2f8b733898acea5.tar.xz
hercules-71d694baa88d2beb6ec0f89fb2f8b733898acea5.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc16
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc32
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc214
4 files changed, 270 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 63b4567ed..25e40ec0c 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -6864,6 +6864,22 @@ typedef int (*HPMHOOK_pre_status_change_start) (struct block_list **src, struct
typedef int (*HPMHOOK_post_status_change_start) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag);
typedef int (*HPMHOOK_pre_status_change_end_) (struct block_list **bl, enum sc_type *type, int *tid, const char **file, int *line);
typedef int (*HPMHOOK_post_status_change_end_) (int retVal___, struct block_list *bl, enum sc_type type, int tid, const char *file, int line);
+typedef bool (*HPMHOOK_pre_status_is_immune_to_status) (struct status_change **sc, enum sc_type *type);
+typedef bool (*HPMHOOK_post_status_is_immune_to_status) (bool retVal___, struct status_change *sc, enum sc_type type);
+typedef bool (*HPMHOOK_pre_status_is_boss_resist_sc) (enum sc_type *type);
+typedef bool (*HPMHOOK_post_status_is_boss_resist_sc) (bool retVal___, enum sc_type type);
+typedef bool (*HPMHOOK_pre_status_end_sc_before_start) (struct block_list **bl, struct status_data **st, struct status_change **sc, enum sc_type *type, int *undead_flag, int *val1, int *val2, int *val3, int *val4);
+typedef bool (*HPMHOOK_post_status_end_sc_before_start) (bool retVal___, struct block_list *bl, struct status_data *st, struct status_change *sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4);
+typedef void (*HPMHOOK_pre_status_change_start_stop_action) (struct block_list **bl, enum sc_type *type);
+typedef void (*HPMHOOK_post_status_change_start_stop_action) (struct block_list *bl, enum sc_type type);
+typedef int (*HPMHOOK_pre_status_change_start_set_option) (struct block_list **bl, struct status_change **sc, enum sc_type *type, int *val1, int *val2, int *val3, int *val4);
+typedef int (*HPMHOOK_post_status_change_start_set_option) (int retVal___, struct block_list *bl, struct status_change *sc, enum sc_type type, int val1, int val2, int val3, int val4);
+typedef int (*HPMHOOK_pre_status_get_val_flag) (enum sc_type *type);
+typedef int (*HPMHOOK_post_status_get_val_flag) (int retVal___, enum sc_type type);
+typedef void (*HPMHOOK_pre_status_change_start_display) (struct map_session_data **sd, enum sc_type *type, int *val1, int *val2, int *val3, int *val4);
+typedef void (*HPMHOOK_post_status_change_start_display) (struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4);
+typedef bool (*HPMHOOK_pre_status_change_start_unknown_sc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag);
+typedef bool (*HPMHOOK_post_status_change_start_unknown_sc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag);
typedef int (*HPMHOOK_pre_status_kaahi_heal_timer) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_status_kaahi_heal_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data);
typedef int (*HPMHOOK_pre_status_change_timer) (int *tid, int64 *tick, int *id, intptr_t *data);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index d470a3bd9..794d8e650 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -5638,6 +5638,22 @@ struct {
struct HPMHookPoint *HP_status_change_start_post;
struct HPMHookPoint *HP_status_change_end__pre;
struct HPMHookPoint *HP_status_change_end__post;
+ struct HPMHookPoint *HP_status_is_immune_to_status_pre;
+ struct HPMHookPoint *HP_status_is_immune_to_status_post;
+ struct HPMHookPoint *HP_status_is_boss_resist_sc_pre;
+ struct HPMHookPoint *HP_status_is_boss_resist_sc_post;
+ struct HPMHookPoint *HP_status_end_sc_before_start_pre;
+ struct HPMHookPoint *HP_status_end_sc_before_start_post;
+ struct HPMHookPoint *HP_status_change_start_stop_action_pre;
+ struct HPMHookPoint *HP_status_change_start_stop_action_post;
+ struct HPMHookPoint *HP_status_change_start_set_option_pre;
+ struct HPMHookPoint *HP_status_change_start_set_option_post;
+ struct HPMHookPoint *HP_status_get_val_flag_pre;
+ struct HPMHookPoint *HP_status_get_val_flag_post;
+ struct HPMHookPoint *HP_status_change_start_display_pre;
+ struct HPMHookPoint *HP_status_change_start_display_post;
+ struct HPMHookPoint *HP_status_change_start_unknown_sc_pre;
+ struct HPMHookPoint *HP_status_change_start_unknown_sc_post;
struct HPMHookPoint *HP_status_kaahi_heal_timer_pre;
struct HPMHookPoint *HP_status_kaahi_heal_timer_post;
struct HPMHookPoint *HP_status_change_timer_pre;
@@ -11713,6 +11729,22 @@ struct {
int HP_status_change_start_post;
int HP_status_change_end__pre;
int HP_status_change_end__post;
+ int HP_status_is_immune_to_status_pre;
+ int HP_status_is_immune_to_status_post;
+ int HP_status_is_boss_resist_sc_pre;
+ int HP_status_is_boss_resist_sc_post;
+ int HP_status_end_sc_before_start_pre;
+ int HP_status_end_sc_before_start_post;
+ int HP_status_change_start_stop_action_pre;
+ int HP_status_change_start_stop_action_post;
+ int HP_status_change_start_set_option_pre;
+ int HP_status_change_start_set_option_post;
+ int HP_status_get_val_flag_pre;
+ int HP_status_get_val_flag_post;
+ int HP_status_change_start_display_pre;
+ int HP_status_change_start_display_post;
+ int HP_status_change_start_unknown_sc_pre;
+ int HP_status_change_start_unknown_sc_post;
int HP_status_kaahi_heal_timer_pre;
int HP_status_kaahi_heal_timer_post;
int HP_status_change_timer_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 4f2565740..618765f47 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2885,6 +2885,14 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(status->get_sc_def, HP_status_get_sc_def) },
{ HP_POP(status->change_start, HP_status_change_start) },
{ HP_POP(status->change_end_, HP_status_change_end_) },
+ { HP_POP(status->is_immune_to_status, HP_status_is_immune_to_status) },
+ { HP_POP(status->is_boss_resist_sc, HP_status_is_boss_resist_sc) },
+ { HP_POP(status->end_sc_before_start, HP_status_end_sc_before_start) },
+ { HP_POP(status->change_start_stop_action, HP_status_change_start_stop_action) },
+ { HP_POP(status->change_start_set_option, HP_status_change_start_set_option) },
+ { HP_POP(status->get_val_flag, HP_status_get_val_flag) },
+ { HP_POP(status->change_start_display, HP_status_change_start_display) },
+ { HP_POP(status->change_start_unknown_sc, HP_status_change_start_unknown_sc) },
{ HP_POP(status->kaahi_heal_timer, HP_status_kaahi_heal_timer) },
{ HP_POP(status->change_timer, HP_status_change_timer) },
{ HP_POP(status->change_timer_sub, HP_status_change_timer_sub) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 3bde41022..ef3bb4b90 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -75529,6 +75529,220 @@ int HP_status_change_end_(struct block_list *bl, enum sc_type type, int tid, con
}
return retVal___;
}
+bool HP_status_is_immune_to_status(struct status_change *sc, enum sc_type type) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_status_is_immune_to_status_pre > 0) {
+ bool (*preHookFunc) (struct status_change **sc, enum sc_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_immune_to_status_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_status_is_immune_to_status_pre[hIndex].func;
+ retVal___ = preHookFunc(&sc, &type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.is_immune_to_status(sc, type);
+ }
+ if (HPMHooks.count.HP_status_is_immune_to_status_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct status_change *sc, enum sc_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_immune_to_status_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_status_is_immune_to_status_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sc, type);
+ }
+ }
+ return retVal___;
+}
+bool HP_status_is_boss_resist_sc(enum sc_type type) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_status_is_boss_resist_sc_pre > 0) {
+ bool (*preHookFunc) (enum sc_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_boss_resist_sc_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_status_is_boss_resist_sc_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.is_boss_resist_sc(type);
+ }
+ if (HPMHooks.count.HP_status_is_boss_resist_sc_post > 0) {
+ bool (*postHookFunc) (bool retVal___, enum sc_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_boss_resist_sc_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_status_is_boss_resist_sc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, type);
+ }
+ }
+ return retVal___;
+}
+bool HP_status_end_sc_before_start(struct block_list *bl, struct status_data *st, struct status_change *sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_status_end_sc_before_start_pre > 0) {
+ bool (*preHookFunc) (struct block_list **bl, struct status_data **st, struct status_change **sc, enum sc_type *type, int *undead_flag, int *val1, int *val2, int *val3, int *val4);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_end_sc_before_start_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_status_end_sc_before_start_pre[hIndex].func;
+ retVal___ = preHookFunc(&bl, &st, &sc, &type, &undead_flag, &val1, &val2, &val3, &val4);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.end_sc_before_start(bl, st, sc, type, undead_flag, val1, val2, val3, val4);
+ }
+ if (HPMHooks.count.HP_status_end_sc_before_start_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct status_data *st, struct status_change *sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_end_sc_before_start_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_status_end_sc_before_start_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, st, sc, type, undead_flag, val1, val2, val3, val4);
+ }
+ }
+ return retVal___;
+}
+void HP_status_change_start_stop_action(struct block_list *bl, enum sc_type type) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_status_change_start_stop_action_pre > 0) {
+ void (*preHookFunc) (struct block_list **bl, enum sc_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_stop_action_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_status_change_start_stop_action_pre[hIndex].func;
+ preHookFunc(&bl, &type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.change_start_stop_action(bl, type);
+ }
+ if (HPMHooks.count.HP_status_change_start_stop_action_post > 0) {
+ void (*postHookFunc) (struct block_list *bl, enum sc_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_stop_action_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_status_change_start_stop_action_post[hIndex].func;
+ postHookFunc(bl, type);
+ }
+ }
+ return;
+}
+int HP_status_change_start_set_option(struct block_list *bl, struct status_change *sc, enum sc_type type, int val1, int val2, int val3, int val4) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_status_change_start_set_option_pre > 0) {
+ int (*preHookFunc) (struct block_list **bl, struct status_change **sc, enum sc_type *type, int *val1, int *val2, int *val3, int *val4);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_set_option_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_status_change_start_set_option_pre[hIndex].func;
+ retVal___ = preHookFunc(&bl, &sc, &type, &val1, &val2, &val3, &val4);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.change_start_set_option(bl, sc, type, val1, val2, val3, val4);
+ }
+ if (HPMHooks.count.HP_status_change_start_set_option_post > 0) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, enum sc_type type, int val1, int val2, int val3, int val4);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_set_option_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_status_change_start_set_option_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, type, val1, val2, val3, val4);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_val_flag(enum sc_type type) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_status_get_val_flag_pre > 0) {
+ int (*preHookFunc) (enum sc_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_val_flag_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_status_get_val_flag_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_val_flag(type);
+ }
+ if (HPMHooks.count.HP_status_get_val_flag_post > 0) {
+ int (*postHookFunc) (int retVal___, enum sc_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_val_flag_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_status_get_val_flag_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, type);
+ }
+ }
+ return retVal___;
+}
+void HP_status_change_start_display(struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_status_change_start_display_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum sc_type *type, int *val1, int *val2, int *val3, int *val4);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_display_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_status_change_start_display_pre[hIndex].func;
+ preHookFunc(&sd, &type, &val1, &val2, &val3, &val4);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.change_start_display(sd, type, val1, val2, val3, val4);
+ }
+ if (HPMHooks.count.HP_status_change_start_display_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_display_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_status_change_start_display_post[hIndex].func;
+ postHookFunc(sd, type, val1, val2, val3, val4);
+ }
+ }
+ return;
+}
+bool HP_status_change_start_unknown_sc(struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_status_change_start_unknown_sc_pre > 0) {
+ bool (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_unknown_sc_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_status_change_start_unknown_sc_pre[hIndex].func;
+ retVal___ = preHookFunc(&src, &bl, &type, &calc_flag, &rate, &val1, &val2, &val3, &val4, &tick, &flag);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.change_start_unknown_sc(src, bl, type, calc_flag, rate, val1, val2, val3, val4, tick, flag);
+ }
+ if (HPMHooks.count.HP_status_change_start_unknown_sc_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_unknown_sc_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_status_change_start_unknown_sc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, type, calc_flag, rate, val1, val2, val3, val4, tick, flag);
+ }
+ }
+ return retVal___;
+}
int HP_status_kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;