summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/HPMDataCheck.h1
-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
5 files changed, 34 insertions, 0 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 994586c41..72ae64525 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -858,6 +858,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#define MAP_PC_GROUPS_H
#endif // MAP_PC_GROUPS_H
#ifdef MAP_PC_H
+ { "autocast_data", sizeof(struct autocast_data), SERVER_TYPE_MAP },
{ "autotrade_vending", sizeof(struct autotrade_vending), SERVER_TYPE_MAP },
{ "class_exp_group", sizeof(struct class_exp_group), SERVER_TYPE_MAP },
{ "class_exp_tables", sizeof(struct class_exp_tables), SERVER_TYPE_MAP },
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index dc516c355..3beaa33d3 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -7386,6 +7386,8 @@ typedef int (*HPMHOOK_pre_skill_not_ok_hom_unknown) (uint16 *skill_id, struct ho
typedef int (*HPMHOOK_post_skill_not_ok_hom_unknown) (int retVal___, uint16 skill_id, struct homun_data *hd);
typedef int (*HPMHOOK_pre_skill_not_ok_mercenary) (uint16 *skill_id, struct mercenary_data **md);
typedef int (*HPMHOOK_post_skill_not_ok_mercenary) (int retVal___, uint16 skill_id, struct mercenary_data *md);
+typedef void (*HPMHOOK_pre_skill_validate_autocast_data) (struct map_session_data **sd, int *skill_id, int *skill_lv);
+typedef void (*HPMHOOK_post_skill_validate_autocast_data) (struct map_session_data *sd, int skill_id, int skill_lv);
typedef int (*HPMHOOK_pre_skill_chastle_mob_changetarget) (struct block_list **bl, va_list ap);
typedef int (*HPMHOOK_post_skill_chastle_mob_changetarget) (int retVal___, struct block_list *bl, va_list ap);
typedef int (*HPMHOOK_pre_skill_can_produce_mix) (struct map_session_data **sd, int *nameid, int *trigger, int *qty);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 5047ae64d..8bf628a53 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -5910,6 +5910,8 @@ struct {
struct HPMHookPoint *HP_skill_not_ok_hom_unknown_post;
struct HPMHookPoint *HP_skill_not_ok_mercenary_pre;
struct HPMHookPoint *HP_skill_not_ok_mercenary_post;
+ struct HPMHookPoint *HP_skill_validate_autocast_data_pre;
+ struct HPMHookPoint *HP_skill_validate_autocast_data_post;
struct HPMHookPoint *HP_skill_chastle_mob_changetarget_pre;
struct HPMHookPoint *HP_skill_chastle_mob_changetarget_post;
struct HPMHookPoint *HP_skill_can_produce_mix_pre;
@@ -12787,6 +12789,8 @@ struct {
int HP_skill_not_ok_hom_unknown_post;
int HP_skill_not_ok_mercenary_pre;
int HP_skill_not_ok_mercenary_post;
+ int HP_skill_validate_autocast_data_pre;
+ int HP_skill_validate_autocast_data_post;
int HP_skill_chastle_mob_changetarget_pre;
int HP_skill_chastle_mob_changetarget_post;
int HP_skill_can_produce_mix_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 4c3b1b720..1ba2358ef 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -3024,6 +3024,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->not_ok_hom, HP_skill_not_ok_hom) },
{ HP_POP(skill->not_ok_hom_unknown, HP_skill_not_ok_hom_unknown) },
{ HP_POP(skill->not_ok_mercenary, HP_skill_not_ok_mercenary) },
+ { HP_POP(skill->validate_autocast_data, HP_skill_validate_autocast_data) },
{ HP_POP(skill->chastle_mob_changetarget, HP_skill_chastle_mob_changetarget) },
{ HP_POP(skill->can_produce_mix, HP_skill_can_produce_mix) },
{ HP_POP(skill->produce_mix, HP_skill_produce_mix) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index af3f355b3..c319a283d 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -78892,6 +78892,32 @@ int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) {
}
return retVal___;
}
+void HP_skill_validate_autocast_data(struct map_session_data *sd, int skill_id, int skill_lv) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_skill_validate_autocast_data_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *skill_lv);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_autocast_data_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_skill_validate_autocast_data_pre[hIndex].func;
+ preHookFunc(&sd, &skill_id, &skill_lv);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.validate_autocast_data(sd, skill_id, skill_lv);
+ }
+ if (HPMHooks.count.HP_skill_validate_autocast_data_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int skill_id, int skill_lv);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_autocast_data_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_skill_validate_autocast_data_post[hIndex].func;
+ postHookFunc(sd, skill_id, skill_lv);
+ }
+ }
+ return;
+}
int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) {
int hIndex = 0;
int retVal___ = 0;