summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc44
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc120
4 files changed, 88 insertions, 86 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 7996a59f9..4be3accf8 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -4734,10 +4734,10 @@ typedef uint32 (*HPMHOOK_pre_map_race_id2mask) (int *race);
typedef uint32 (*HPMHOOK_post_map_race_id2mask) (uint32 retVal___, int race);
typedef void (*HPMHOOK_pre_map_reloadnpc) (bool *clear);
typedef void (*HPMHOOK_post_map_reloadnpc) (bool clear);
-typedef int (*HPMHOOK_pre_map_check_dir) (int *s_dir, int *t_dir);
-typedef int (*HPMHOOK_post_map_check_dir) (int retVal___, int s_dir, int t_dir);
-typedef uint8 (*HPMHOOK_pre_map_calc_dir) (struct block_list **src, int16 *x, int16 *y);
-typedef uint8 (*HPMHOOK_post_map_calc_dir) (uint8 retVal___, struct block_list *src, int16 x, int16 y);
+typedef int (*HPMHOOK_pre_map_check_dir) (enum unit_dir *s_dir, enum unit_dir *t_dir);
+typedef int (*HPMHOOK_post_map_check_dir) (int retVal___, enum unit_dir s_dir, enum unit_dir t_dir);
+typedef enum unit_dir (*HPMHOOK_pre_map_calc_dir) (struct block_list **src, int16 *x, int16 *y);
+typedef enum unit_dir (*HPMHOOK_post_map_calc_dir) (enum unit_dir retVal___, struct block_list *src, int16 x, int16 y);
typedef int (*HPMHOOK_pre_map_random_dir) (struct block_list **bl, short **x, short **y);
typedef int (*HPMHOOK_post_map_random_dir) (int retVal___, struct block_list *bl, short *x, short *y);
typedef int (*HPMHOOK_pre_map_cleanup_sub) (struct block_list **bl, va_list ap);
@@ -5708,8 +5708,8 @@ typedef int (*HPMHOOK_pre_npc_parseview) (const char **w4, const char **start, c
typedef int (*HPMHOOK_post_npc_parseview) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath);
typedef bool (*HPMHOOK_pre_npc_viewisid) (const char **viewid);
typedef bool (*HPMHOOK_post_npc_viewisid) (bool retVal___, const char *viewid);
-typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_);
-typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_);
+typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, enum unit_dir *dir, int *class_);
+typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_);
typedef struct npc_data* (*HPMHOOK_pre_npc_add_warp) (char **name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y);
typedef struct npc_data* (*HPMHOOK_post_npc_add_warp) (struct npc_data* retVal___, char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y);
typedef const char* (*HPMHOOK_pre_npc_parse_warp) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval);
@@ -7298,8 +7298,8 @@ typedef int (*HPMHOOK_pre_skill_additional_effect) (struct block_list **src, str
typedef int (*HPMHOOK_post_skill_additional_effect) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 tick);
typedef int (*HPMHOOK_pre_skill_counter_additional_effect) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick);
typedef int (*HPMHOOK_post_skill_counter_additional_effect) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick);
-typedef int (*HPMHOOK_pre_skill_blown) (struct block_list **src, struct block_list **target, int *count, int8 *dir, int *flag);
-typedef int (*HPMHOOK_post_skill_blown) (int retVal___, struct block_list *src, struct block_list *target, int count, int8 dir, int flag);
+typedef int (*HPMHOOK_pre_skill_blown) (struct block_list **src, struct block_list **target, int *count, enum unit_dir *dir, int *flag);
+typedef int (*HPMHOOK_post_skill_blown) (int retVal___, struct block_list *src, struct block_list *target, int count, enum unit_dir dir, int flag);
typedef int (*HPMHOOK_pre_skill_break_equip) (struct block_list **bl, unsigned short *where, int *rate, int *flag);
typedef int (*HPMHOOK_post_skill_break_equip) (int retVal___, struct block_list *bl, unsigned short where, int rate, int flag);
typedef int (*HPMHOOK_pre_skill_strip_equip) (struct block_list **bl, unsigned short *where, int *rate, int *lv, int *time);
@@ -7464,10 +7464,10 @@ typedef int (*HPMHOOK_pre_skill_check_condition_char_sub) (struct block_list **b
typedef int (*HPMHOOK_post_skill_check_condition_char_sub) (int retVal___, struct block_list *bl, va_list ap);
typedef int (*HPMHOOK_pre_skill_check_condition_mob_master_sub) (struct block_list **bl, va_list ap);
typedef int (*HPMHOOK_post_skill_check_condition_mob_master_sub) (int retVal___, struct block_list *bl, va_list ap);
-typedef void (*HPMHOOK_pre_skill_brandishspear_first) (struct square **tc, uint8 *dir, int16 *x, int16 *y);
-typedef void (*HPMHOOK_post_skill_brandishspear_first) (struct square *tc, uint8 dir, int16 x, int16 y);
-typedef void (*HPMHOOK_pre_skill_brandishspear_dir) (struct square **tc, uint8 *dir, int *are);
-typedef void (*HPMHOOK_post_skill_brandishspear_dir) (struct square *tc, uint8 dir, int are);
+typedef void (*HPMHOOK_pre_skill_brandishspear_first) (struct square **tc, enum unit_dir *dir, int16 *x, int16 *y);
+typedef void (*HPMHOOK_post_skill_brandishspear_first) (struct square *tc, enum unit_dir dir, int16 x, int16 y);
+typedef void (*HPMHOOK_pre_skill_brandishspear_dir) (struct square **tc, enum unit_dir *dir, int *are);
+typedef void (*HPMHOOK_post_skill_brandishspear_dir) (struct square *tc, enum unit_dir dir, int are);
typedef int (*HPMHOOK_pre_skill_get_fixed_cast) (int *skill_id, int *skill_lv);
typedef int (*HPMHOOK_post_skill_get_fixed_cast) (int retVal___, int skill_id, int skill_lv);
typedef int (*HPMHOOK_pre_skill_sit_count) (struct block_list **bl, va_list ap);
@@ -7606,10 +7606,8 @@ typedef void (*HPMHOOK_pre_skill_attack_display_unknown) (int **attack_type, str
typedef void (*HPMHOOK_post_skill_attack_display_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage);
typedef int (*HPMHOOK_pre_skill_attack_copy_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag);
typedef int (*HPMHOOK_post_skill_attack_copy_unknown) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
-typedef int (*HPMHOOK_pre_skill_attack_dir_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag);
-typedef int (*HPMHOOK_post_skill_attack_dir_unknown) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
-typedef void (*HPMHOOK_pre_skill_attack_blow_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage, int8 **dir);
-typedef void (*HPMHOOK_post_skill_attack_blow_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir);
+typedef void (*HPMHOOK_pre_skill_attack_blow_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage, enum unit_dir **dir);
+typedef void (*HPMHOOK_post_skill_attack_blow_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, enum unit_dir *dir);
typedef void (*HPMHOOK_pre_skill_attack_post_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag);
typedef void (*HPMHOOK_post_skill_attack_post_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
typedef bool (*HPMHOOK_pre_skill_timerskill_dead_unknown) (struct block_list **src, struct unit_data **ud, struct skill_timerskill **skl);
@@ -8314,14 +8312,16 @@ typedef int (*HPMHOOK_pre_unit_escape) (struct block_list **bl, struct block_lis
typedef int (*HPMHOOK_post_unit_escape) (int retVal___, struct block_list *bl, struct block_list *target, short dist);
typedef int (*HPMHOOK_pre_unit_movepos) (struct block_list **bl, short *dst_x, short *dst_y, int *easy, bool *checkpath);
typedef int (*HPMHOOK_post_unit_movepos) (int retVal___, struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath);
-typedef int (*HPMHOOK_pre_unit_setdir) (struct block_list **bl, unsigned char *dir);
-typedef int (*HPMHOOK_post_unit_setdir) (int retVal___, struct block_list *bl, unsigned char dir);
-typedef uint8 (*HPMHOOK_pre_unit_getdir) (struct block_list **bl);
-typedef uint8 (*HPMHOOK_post_unit_getdir) (uint8 retVal___, struct block_list *bl);
+typedef int (*HPMHOOK_pre_unit_setdir) (struct block_list **bl, enum unit_dir *dir);
+typedef int (*HPMHOOK_post_unit_setdir) (int retVal___, struct block_list *bl, enum unit_dir dir);
+typedef enum unit_dir (*HPMHOOK_pre_unit_getdir) (struct block_list **bl);
+typedef enum unit_dir (*HPMHOOK_post_unit_getdir) (enum unit_dir retVal___, struct block_list *bl);
typedef int (*HPMHOOK_pre_unit_blown) (struct block_list **bl, int *dx, int *dy, int *count, int *flag);
typedef int (*HPMHOOK_post_unit_blown) (int retVal___, struct block_list *bl, int dx, int dy, int count, int flag);
typedef int (*HPMHOOK_pre_unit_warp) (struct block_list **bl, short *m, short *x, short *y, enum clr_type *type);
typedef int (*HPMHOOK_post_unit_warp) (int retVal___, struct block_list *bl, short m, short x, short y, enum clr_type type);
+typedef int (*HPMHOOK_pre_unit_warpto_master) (struct block_list **master_bl, struct block_list **slave_bl);
+typedef int (*HPMHOOK_post_unit_warpto_master) (int retVal___, struct block_list *master_bl, struct block_list *slave_bl);
typedef int (*HPMHOOK_pre_unit_stop_walking) (struct block_list **bl, int *type);
typedef int (*HPMHOOK_post_unit_stop_walking) (int retVal___, struct block_list *bl, int type);
typedef int (*HPMHOOK_pre_unit_skilluse_id) (struct block_list **src, int *target_id, uint16 *skill_id, uint16 *skill_lv);
@@ -8358,8 +8358,8 @@ typedef bool (*HPMHOOK_pre_unit_can_reach_pos) (struct block_list **bl, int *x,
typedef bool (*HPMHOOK_post_unit_can_reach_pos) (bool retVal___, struct block_list *bl, int x, int y, int easy);
typedef bool (*HPMHOOK_pre_unit_can_reach_bl) (struct block_list **bl, struct block_list **tbl, int *range, int *easy, short **x, short **y);
typedef bool (*HPMHOOK_post_unit_can_reach_bl) (bool retVal___, struct block_list *bl, struct block_list *tbl, int range, int easy, short *x, short *y);
-typedef int (*HPMHOOK_pre_unit_calc_pos) (struct block_list **bl, int *tx, int *ty, uint8 *dir);
-typedef int (*HPMHOOK_post_unit_calc_pos) (int retVal___, struct block_list *bl, int tx, int ty, uint8 dir);
+typedef int (*HPMHOOK_pre_unit_calc_pos) (struct block_list **bl, int *tx, int *ty, enum unit_dir *dir);
+typedef int (*HPMHOOK_post_unit_calc_pos) (int retVal___, struct block_list *bl, int tx, int ty, enum unit_dir dir);
typedef int (*HPMHOOK_pre_unit_attack_timer_sub) (struct block_list **src, int *tid, int64 *tick);
typedef int (*HPMHOOK_post_unit_attack_timer_sub) (int retVal___, struct block_list *src, int tid, int64 tick);
typedef int (*HPMHOOK_pre_unit_skillcastcancel) (struct block_list **bl, int *type);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 6d8776f18..3e1b8af78 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -6130,8 +6130,6 @@ struct {
struct HPMHookPoint *HP_skill_attack_display_unknown_post;
struct HPMHookPoint *HP_skill_attack_copy_unknown_pre;
struct HPMHookPoint *HP_skill_attack_copy_unknown_post;
- struct HPMHookPoint *HP_skill_attack_dir_unknown_pre;
- struct HPMHookPoint *HP_skill_attack_dir_unknown_post;
struct HPMHookPoint *HP_skill_attack_blow_unknown_pre;
struct HPMHookPoint *HP_skill_attack_blow_unknown_post;
struct HPMHookPoint *HP_skill_attack_post_unknown_pre;
@@ -6820,6 +6818,8 @@ struct {
struct HPMHookPoint *HP_unit_blown_post;
struct HPMHookPoint *HP_unit_warp_pre;
struct HPMHookPoint *HP_unit_warp_post;
+ struct HPMHookPoint *HP_unit_warpto_master_pre;
+ struct HPMHookPoint *HP_unit_warpto_master_post;
struct HPMHookPoint *HP_unit_stop_walking_pre;
struct HPMHookPoint *HP_unit_stop_walking_post;
struct HPMHookPoint *HP_unit_skilluse_id_pre;
@@ -13001,8 +13001,6 @@ struct {
int HP_skill_attack_display_unknown_post;
int HP_skill_attack_copy_unknown_pre;
int HP_skill_attack_copy_unknown_post;
- int HP_skill_attack_dir_unknown_pre;
- int HP_skill_attack_dir_unknown_post;
int HP_skill_attack_blow_unknown_pre;
int HP_skill_attack_blow_unknown_post;
int HP_skill_attack_post_unknown_pre;
@@ -13691,6 +13689,8 @@ struct {
int HP_unit_blown_post;
int HP_unit_warp_pre;
int HP_unit_warp_post;
+ int HP_unit_warpto_master_pre;
+ int HP_unit_warpto_master_post;
int HP_unit_stop_walking_pre;
int HP_unit_stop_walking_post;
int HP_unit_skilluse_id_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 672b94dd8..2ec13f3ab 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -3134,7 +3134,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->attack_combo2_unknown, HP_skill_attack_combo2_unknown) },
{ HP_POP(skill->attack_display_unknown, HP_skill_attack_display_unknown) },
{ HP_POP(skill->attack_copy_unknown, HP_skill_attack_copy_unknown) },
- { HP_POP(skill->attack_dir_unknown, HP_skill_attack_dir_unknown) },
{ HP_POP(skill->attack_blow_unknown, HP_skill_attack_blow_unknown) },
{ HP_POP(skill->attack_post_unknown, HP_skill_attack_post_unknown) },
{ HP_POP(skill->timerskill_dead_unknown, HP_skill_timerskill_dead_unknown) },
@@ -3492,6 +3491,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(unit->getdir, HP_unit_getdir) },
{ HP_POP(unit->blown, HP_unit_blown) },
{ HP_POP(unit->warp, HP_unit_warp) },
+ { HP_POP(unit->warpto_master, HP_unit_warpto_master) },
{ HP_POP(unit->stop_walking, HP_unit_stop_walking) },
{ HP_POP(unit->skilluse_id, HP_unit_skilluse_id) },
{ HP_POP(unit->step_timer, HP_unit_step_timer) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 423490182..1623cadb6 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -48284,11 +48284,11 @@ void HP_map_reloadnpc(bool clear) {
}
return;
}
-int HP_map_check_dir(int s_dir, int t_dir) {
+int HP_map_check_dir(enum unit_dir s_dir, enum unit_dir t_dir) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_map_check_dir_pre > 0) {
- int (*preHookFunc) (int *s_dir, int *t_dir);
+ int (*preHookFunc) (enum unit_dir *s_dir, enum unit_dir *t_dir);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_map_check_dir_pre[hIndex].func;
@@ -48303,7 +48303,7 @@ int HP_map_check_dir(int s_dir, int t_dir) {
retVal___ = HPMHooks.source.map.check_dir(s_dir, t_dir);
}
if (HPMHooks.count.HP_map_check_dir_post > 0) {
- int (*postHookFunc) (int retVal___, int s_dir, int t_dir);
+ int (*postHookFunc) (int retVal___, enum unit_dir s_dir, enum unit_dir t_dir);
for (hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_map_check_dir_post[hIndex].func;
retVal___ = postHookFunc(retVal___, s_dir, t_dir);
@@ -48311,11 +48311,12 @@ int HP_map_check_dir(int s_dir, int t_dir) {
}
return retVal___;
}
-uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) {
+enum unit_dir HP_map_calc_dir(struct block_list *src, int16 x, int16 y) {
+/* Unknown return type 'enum unit_dir'. Initializing to '0'. */
int hIndex = 0;
- uint8 retVal___ = 0;
+ enum unit_dir retVal___ = 0;
if (HPMHooks.count.HP_map_calc_dir_pre > 0) {
- uint8 (*preHookFunc) (struct block_list **src, int16 *x, int16 *y);
+ enum unit_dir (*preHookFunc) (struct block_list **src, int16 *x, int16 *y);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_map_calc_dir_pre[hIndex].func;
@@ -48330,7 +48331,7 @@ uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) {
retVal___ = HPMHooks.source.map.calc_dir(src, x, y);
}
if (HPMHooks.count.HP_map_calc_dir_post > 0) {
- uint8 (*postHookFunc) (uint8 retVal___, struct block_list *src, int16 x, int16 y);
+ enum unit_dir (*postHookFunc) (enum unit_dir retVal___, struct block_list *src, int16 x, int16 y);
for (hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_map_calc_dir_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, x, y);
@@ -57108,11 +57109,11 @@ bool HP_npc_viewisid(const char *viewid) {
}
return retVal___;
}
-struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_) {
+struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_) {
int hIndex = 0;
struct npc_data* retVal___ = NULL;
if (HPMHooks.count.HP_npc_create_npc_pre > 0) {
- struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_);
+ struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, enum unit_dir *dir, int *class_);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_npc_create_npc_pre[hIndex].func;
@@ -57127,7 +57128,7 @@ struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y
retVal___ = HPMHooks.source.npc.create_npc(subtype, m, x, y, dir, class_);
}
if (HPMHooks.count.HP_npc_create_npc_post > 0) {
- struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_);
+ struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_);
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_npc_create_npc_post[hIndex].func;
retVal___ = postHookFunc(retVal___, subtype, m, x, y, dir, class_);
@@ -77704,11 +77705,11 @@ int HP_skill_counter_additional_effect(struct block_list *src, struct block_list
}
return retVal___;
}
-int HP_skill_blown(struct block_list *src, struct block_list *target, int count, int8 dir, int flag) {
+int HP_skill_blown(struct block_list *src, struct block_list *target, int count, enum unit_dir dir, int flag) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_blown_pre > 0) {
- int (*preHookFunc) (struct block_list **src, struct block_list **target, int *count, int8 *dir, int *flag);
+ int (*preHookFunc) (struct block_list **src, struct block_list **target, int *count, enum unit_dir *dir, int *flag);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_blown_pre[hIndex].func;
@@ -77723,7 +77724,7 @@ int HP_skill_blown(struct block_list *src, struct block_list *target, int count,
retVal___ = HPMHooks.source.skill.blown(src, target, count, dir, flag);
}
if (HPMHooks.count.HP_skill_blown_post > 0) {
- int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int count, int8 dir, int flag);
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int count, enum unit_dir dir, int flag);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_blown_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, target, count, dir, flag);
@@ -80034,10 +80035,10 @@ int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y) {
+void HP_skill_brandishspear_first(struct square *tc, enum unit_dir dir, int16 x, int16 y) {
int hIndex = 0;
if (HPMHooks.count.HP_skill_brandishspear_first_pre > 0) {
- void (*preHookFunc) (struct square **tc, uint8 *dir, int16 *x, int16 *y);
+ void (*preHookFunc) (struct square **tc, enum unit_dir *dir, int16 *x, int16 *y);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_brandishspear_first_pre[hIndex].func;
@@ -80052,7 +80053,7 @@ void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y
HPMHooks.source.skill.brandishspear_first(tc, dir, x, y);
}
if (HPMHooks.count.HP_skill_brandishspear_first_post > 0) {
- void (*postHookFunc) (struct square *tc, uint8 dir, int16 x, int16 y);
+ void (*postHookFunc) (struct square *tc, enum unit_dir dir, int16 x, int16 y);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_brandishspear_first_post[hIndex].func;
postHookFunc(tc, dir, x, y);
@@ -80060,10 +80061,10 @@ void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y
}
return;
}
-void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) {
+void HP_skill_brandishspear_dir(struct square *tc, enum unit_dir dir, int are) {
int hIndex = 0;
if (HPMHooks.count.HP_skill_brandishspear_dir_pre > 0) {
- void (*preHookFunc) (struct square **tc, uint8 *dir, int *are);
+ void (*preHookFunc) (struct square **tc, enum unit_dir *dir, int *are);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_pre[hIndex].func;
@@ -80078,7 +80079,7 @@ void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) {
HPMHooks.source.skill.brandishspear_dir(tc, dir, are);
}
if (HPMHooks.count.HP_skill_brandishspear_dir_post > 0) {
- void (*postHookFunc) (struct square *tc, uint8 dir, int are);
+ void (*postHookFunc) (struct square *tc, enum unit_dir dir, int are);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_post[hIndex].func;
postHookFunc(tc, dir, are);
@@ -81968,37 +81969,10 @@ int HP_skill_attack_copy_unknown(int *attack_type, struct block_list *src, struc
}
return retVal___;
}
-int HP_skill_attack_dir_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) {
- int hIndex = 0;
- int retVal___ = 0;
- if (HPMHooks.count.HP_skill_attack_dir_unknown_pre > 0) {
- int (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_skill_attack_dir_unknown_pre[hIndex].func;
- retVal___ = preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.skill.attack_dir_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag);
- }
- if (HPMHooks.count.HP_skill_attack_dir_unknown_post > 0) {
- int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_skill_attack_dir_unknown_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag);
- }
- }
- return retVal___;
-}
-void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir) {
+void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, enum unit_dir *dir) {
int hIndex = 0;
if (HPMHooks.count.HP_skill_attack_blow_unknown_pre > 0) {
- void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage, int8 **dir);
+ void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage, enum unit_dir **dir);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_pre[hIndex].func;
@@ -82013,7 +81987,7 @@ void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, stru
HPMHooks.source.skill.attack_blow_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir);
}
if (HPMHooks.count.HP_skill_attack_blow_unknown_post > 0) {
- void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir);
+ void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, enum unit_dir *dir);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_post[hIndex].func;
postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir);
@@ -91155,11 +91129,11 @@ int HP_unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, b
}
return retVal___;
}
-int HP_unit_setdir(struct block_list *bl, unsigned char dir) {
+int HP_unit_setdir(struct block_list *bl, enum unit_dir dir) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_unit_setdir_pre > 0) {
- int (*preHookFunc) (struct block_list **bl, unsigned char *dir);
+ int (*preHookFunc) (struct block_list **bl, enum unit_dir *dir);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_unit_setdir_pre[hIndex].func;
@@ -91174,7 +91148,7 @@ int HP_unit_setdir(struct block_list *bl, unsigned char dir) {
retVal___ = HPMHooks.source.unit.setdir(bl, dir);
}
if (HPMHooks.count.HP_unit_setdir_post > 0) {
- int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned char dir);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, enum unit_dir dir);
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_unit_setdir_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, dir);
@@ -91182,11 +91156,12 @@ int HP_unit_setdir(struct block_list *bl, unsigned char dir) {
}
return retVal___;
}
-uint8 HP_unit_getdir(struct block_list *bl) {
+enum unit_dir HP_unit_getdir(struct block_list *bl) {
+/* Unknown return type 'enum unit_dir'. Initializing to '0'. */
int hIndex = 0;
- uint8 retVal___ = 0;
+ enum unit_dir retVal___ = 0;
if (HPMHooks.count.HP_unit_getdir_pre > 0) {
- uint8 (*preHookFunc) (struct block_list **bl);
+ enum unit_dir (*preHookFunc) (struct block_list **bl);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_unit_getdir_pre[hIndex].func;
@@ -91201,7 +91176,7 @@ uint8 HP_unit_getdir(struct block_list *bl) {
retVal___ = HPMHooks.source.unit.getdir(bl);
}
if (HPMHooks.count.HP_unit_getdir_post > 0) {
- uint8 (*postHookFunc) (uint8 retVal___, struct block_list *bl);
+ enum unit_dir (*postHookFunc) (enum unit_dir retVal___, struct block_list *bl);
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_unit_getdir_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl);
@@ -91263,6 +91238,33 @@ int HP_unit_warp(struct block_list *bl, short m, short x, short y, enum clr_type
}
return retVal___;
}
+int HP_unit_warpto_master(struct block_list *master_bl, struct block_list *slave_bl) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_unit_warpto_master_pre > 0) {
+ int (*preHookFunc) (struct block_list **master_bl, struct block_list **slave_bl);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_warpto_master_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_unit_warpto_master_pre[hIndex].func;
+ retVal___ = preHookFunc(&master_bl, &slave_bl);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.warpto_master(master_bl, slave_bl);
+ }
+ if (HPMHooks.count.HP_unit_warpto_master_post > 0) {
+ int (*postHookFunc) (int retVal___, struct block_list *master_bl, struct block_list *slave_bl);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_warpto_master_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_unit_warpto_master_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, master_bl, slave_bl);
+ }
+ }
+ return retVal___;
+}
int HP_unit_stop_walking(struct block_list *bl, int type) {
int hIndex = 0;
int retVal___ = 0;
@@ -91747,11 +91749,11 @@ bool HP_unit_can_reach_bl(struct block_list *bl, struct block_list *tbl, int ran
}
return retVal___;
}
-int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) {
+int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, enum unit_dir dir) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_unit_calc_pos_pre > 0) {
- int (*preHookFunc) (struct block_list **bl, int *tx, int *ty, uint8 *dir);
+ int (*preHookFunc) (struct block_list **bl, int *tx, int *ty, enum unit_dir *dir);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_calc_pos_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_unit_calc_pos_pre[hIndex].func;
@@ -91766,7 +91768,7 @@ int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) {
retVal___ = HPMHooks.source.unit.calc_pos(bl, tx, ty, dir);
}
if (HPMHooks.count.HP_unit_calc_pos_post > 0) {
- int (*postHookFunc) (int retVal___, struct block_list *bl, int tx, int ty, uint8 dir);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int tx, int ty, enum unit_dir dir);
for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_calc_pos_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_unit_calc_pos_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, tx, ty, dir);