summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2020-05-31 23:35:11 +0200
committerHerculesWSAPI <dev@herc.ws>2020-05-31 23:35:11 +0200
commit0a2097d8e295a329ad3d0e732fb74e77707dc2bb (patch)
tree9108c49dd1e9233380890d802607414049eb161f /src/plugins
parentb3189b88eafd5a159780000845bacef79310a22c (diff)
downloadhercules-0a2097d8e295a329ad3d0e732fb74e77707dc2bb.tar.gz
hercules-0a2097d8e295a329ad3d0e732fb74e77707dc2bb.tar.bz2
hercules-0a2097d8e295a329ad3d0e732fb74e77707dc2bb.tar.xz
hercules-0a2097d8e295a329ad3d0e732fb74e77707dc2bb.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc6
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc3
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc78
4 files changed, 99 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 107d0cc33..50e64e53c 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -6216,8 +6216,14 @@ typedef int (*HPMHOOK_pre_pc_checkitem) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_pc_checkitem) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_pc_useitem) (struct map_session_data **sd, int *n);
typedef int (*HPMHOOK_post_pc_useitem) (int retVal___, struct map_session_data *sd, int n);
+typedef void (*HPMHOOK_pre_pc_autocast_clear_current) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_pc_autocast_clear_current) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_pc_autocast_clear) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_pc_autocast_clear) (struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_pc_autocast_set_current) (struct map_session_data **sd, int *skill_id);
+typedef void (*HPMHOOK_post_pc_autocast_set_current) (struct map_session_data *sd, int skill_id);
+typedef void (*HPMHOOK_pre_pc_autocast_remove) (struct map_session_data **sd, enum autocast_type *type, int *skill_id, int *skill_lv);
+typedef void (*HPMHOOK_post_pc_autocast_remove) (struct map_session_data *sd, enum autocast_type type, int skill_id, int skill_lv);
typedef int (*HPMHOOK_pre_pc_skillatk_bonus) (struct map_session_data **sd, uint16 *skill_id);
typedef int (*HPMHOOK_post_pc_skillatk_bonus) (int retVal___, struct map_session_data *sd, uint16 skill_id);
typedef int (*HPMHOOK_pre_pc_skillheal_bonus) (struct map_session_data **sd, uint16 *skill_id);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index df3a28bcb..0c245dee3 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -4796,8 +4796,14 @@ struct {
struct HPMHookPoint *HP_pc_checkitem_post;
struct HPMHookPoint *HP_pc_useitem_pre;
struct HPMHookPoint *HP_pc_useitem_post;
+ struct HPMHookPoint *HP_pc_autocast_clear_current_pre;
+ struct HPMHookPoint *HP_pc_autocast_clear_current_post;
struct HPMHookPoint *HP_pc_autocast_clear_pre;
struct HPMHookPoint *HP_pc_autocast_clear_post;
+ struct HPMHookPoint *HP_pc_autocast_set_current_pre;
+ struct HPMHookPoint *HP_pc_autocast_set_current_post;
+ struct HPMHookPoint *HP_pc_autocast_remove_pre;
+ struct HPMHookPoint *HP_pc_autocast_remove_post;
struct HPMHookPoint *HP_pc_skillatk_bonus_pre;
struct HPMHookPoint *HP_pc_skillatk_bonus_post;
struct HPMHookPoint *HP_pc_skillheal_bonus_pre;
@@ -11715,8 +11721,14 @@ struct {
int HP_pc_checkitem_post;
int HP_pc_useitem_pre;
int HP_pc_useitem_post;
+ int HP_pc_autocast_clear_current_pre;
+ int HP_pc_autocast_clear_current_post;
int HP_pc_autocast_clear_pre;
int HP_pc_autocast_clear_post;
+ int HP_pc_autocast_set_current_pre;
+ int HP_pc_autocast_set_current_post;
+ int HP_pc_autocast_remove_pre;
+ int HP_pc_autocast_remove_post;
int HP_pc_skillatk_bonus_pre;
int HP_pc_skillatk_bonus_post;
int HP_pc_skillheal_bonus_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 3720e8a51..2d35608f0 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2456,7 +2456,10 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->unequipitem_pos, HP_pc_unequipitem_pos) },
{ HP_POP(pc->checkitem, HP_pc_checkitem) },
{ HP_POP(pc->useitem, HP_pc_useitem) },
+ { HP_POP(pc->autocast_clear_current, HP_pc_autocast_clear_current) },
{ HP_POP(pc->autocast_clear, HP_pc_autocast_clear) },
+ { HP_POP(pc->autocast_set_current, HP_pc_autocast_set_current) },
+ { HP_POP(pc->autocast_remove, HP_pc_autocast_remove) },
{ HP_POP(pc->skillatk_bonus, HP_pc_skillatk_bonus) },
{ HP_POP(pc->skillheal_bonus, HP_pc_skillheal_bonus) },
{ HP_POP(pc->skillheal2_bonus, HP_pc_skillheal2_bonus) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 97997f7b8..08d807f1c 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -63781,6 +63781,32 @@ int HP_pc_useitem(struct map_session_data *sd, int n) {
}
return retVal___;
}
+void HP_pc_autocast_clear_current(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_pc_autocast_clear_current_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autocast_clear_current_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_pc_autocast_clear_current_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.autocast_clear_current(sd);
+ }
+ if (HPMHooks.count.HP_pc_autocast_clear_current_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autocast_clear_current_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_pc_autocast_clear_current_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
void HP_pc_autocast_clear(struct map_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_pc_autocast_clear_pre > 0) {
@@ -63807,6 +63833,58 @@ void HP_pc_autocast_clear(struct map_session_data *sd) {
}
return;
}
+void HP_pc_autocast_set_current(struct map_session_data *sd, int skill_id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_pc_autocast_set_current_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *skill_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autocast_set_current_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_pc_autocast_set_current_pre[hIndex].func;
+ preHookFunc(&sd, &skill_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.autocast_set_current(sd, skill_id);
+ }
+ if (HPMHooks.count.HP_pc_autocast_set_current_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int skill_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autocast_set_current_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_pc_autocast_set_current_post[hIndex].func;
+ postHookFunc(sd, skill_id);
+ }
+ }
+ return;
+}
+void HP_pc_autocast_remove(struct map_session_data *sd, enum autocast_type type, int skill_id, int skill_lv) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_pc_autocast_remove_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, enum autocast_type *type, int *skill_id, int *skill_lv);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autocast_remove_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_pc_autocast_remove_pre[hIndex].func;
+ preHookFunc(&sd, &type, &skill_id, &skill_lv);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.autocast_remove(sd, type, skill_id, skill_lv);
+ }
+ if (HPMHooks.count.HP_pc_autocast_remove_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, enum autocast_type type, int skill_id, int skill_lv);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autocast_remove_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_pc_autocast_remove_post[hIndex].func;
+ postHookFunc(sd, type, skill_id, skill_lv);
+ }
+ }
+ return;
+}
int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) {
int hIndex = 0;
int retVal___ = 0;