summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2014-10-13 17:52:46 +0200
committerHerculesWSAPI <Hercules@efficiently.awesome>2014-10-13 17:52:46 +0200
commit9ab4f84a2892d5fe82ffc63ea73f5f1b0080515e (patch)
treeae4d6f59ef70a3c5c22837152e0f712e845519a6 /src/plugins/HPMHooking
parentb5a92f944f126e920442307bebd3c2b53c9b0d54 (diff)
downloadhercules-9ab4f84a2892d5fe82ffc63ea73f5f1b0080515e.tar.gz
hercules-9ab4f84a2892d5fe82ffc63ea73f5f1b0080515e.tar.bz2
hercules-9ab4f84a2892d5fe82ffc63ea73f5f1b0080515e.tar.xz
hercules-9ab4f84a2892d5fe82ffc63ea73f5f1b0080515e.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc16
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc132
3 files changed, 139 insertions, 13 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index db4a8e5b2..0e15eec93 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -3471,6 +3471,10 @@ struct {
struct HPMHookPoint *HP_path_check_distance_post;
struct HPMHookPoint *HP_path_distance_pre;
struct HPMHookPoint *HP_path_distance_post;
+ struct HPMHookPoint *HP_path_check_distance_client_pre;
+ struct HPMHookPoint *HP_path_check_distance_client_post;
+ struct HPMHookPoint *HP_path_distance_client_pre;
+ struct HPMHookPoint *HP_path_distance_client_post;
struct HPMHookPoint *HP_pcg_init_pre;
struct HPMHookPoint *HP_pcg_init_post;
struct HPMHookPoint *HP_pcg_final_pre;
@@ -4973,6 +4977,10 @@ struct {
struct HPMHookPoint *HP_unit_stop_walking_post;
struct HPMHookPoint *HP_unit_skilluse_id_pre;
struct HPMHookPoint *HP_unit_skilluse_id_post;
+ struct HPMHookPoint *HP_unit_step_timer_pre;
+ struct HPMHookPoint *HP_unit_step_timer_post;
+ struct HPMHookPoint *HP_unit_stop_stepaction_pre;
+ struct HPMHookPoint *HP_unit_stop_stepaction_post;
struct HPMHookPoint *HP_unit_is_walking_pre;
struct HPMHookPoint *HP_unit_is_walking_post;
struct HPMHookPoint *HP_unit_can_move_pre;
@@ -8508,6 +8516,10 @@ struct {
int HP_path_check_distance_post;
int HP_path_distance_pre;
int HP_path_distance_post;
+ int HP_path_check_distance_client_pre;
+ int HP_path_check_distance_client_post;
+ int HP_path_distance_client_pre;
+ int HP_path_distance_client_post;
int HP_pcg_init_pre;
int HP_pcg_init_post;
int HP_pcg_final_pre;
@@ -10010,6 +10022,10 @@ struct {
int HP_unit_stop_walking_post;
int HP_unit_skilluse_id_pre;
int HP_unit_skilluse_id_post;
+ int HP_unit_step_timer_pre;
+ int HP_unit_step_timer_post;
+ int HP_unit_stop_stepaction_pre;
+ int HP_unit_stop_stepaction_post;
int HP_unit_is_walking_pre;
int HP_unit_is_walking_post;
int HP_unit_can_move_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 69913405a..083e50cd8 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -1764,6 +1764,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(path->search_long, HP_path_search_long) },
{ HP_POP(path->check_distance, HP_path_check_distance) },
{ HP_POP(path->distance, HP_path_distance) },
+ { HP_POP(path->check_distance_client, HP_path_check_distance_client) },
+ { HP_POP(path->distance_client, HP_path_distance_client) },
/* pcg */
{ HP_POP(pcg->init, HP_pcg_init) },
{ HP_POP(pcg->final, HP_pcg_final) },
@@ -2526,6 +2528,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(unit->warp, HP_unit_warp) },
{ 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) },
+ { HP_POP(unit->stop_stepaction, HP_unit_stop_stepaction) },
{ HP_POP(unit->is_walking, HP_unit_is_walking) },
{ HP_POP(unit->can_move, HP_unit_can_move) },
{ HP_POP(unit->resume_running, HP_unit_resume_running) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index c4935ea1b..f3b149d83 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -46374,11 +46374,11 @@ bool HP_path_search_long(struct shootpath_data *spd, int16 m, int16 x0, int16 y0
}
return retVal___;
}
-int HP_path_check_distance(int dx, int dy, int distance) {
+bool HP_path_check_distance(int dx, int dy, int distance) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_path_check_distance_pre ) {
- int (*preHookFunc) (int *dx, int *dy, int *distance);
+ bool (*preHookFunc) (int *dx, int *dy, int *distance);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_path_check_distance_pre[hIndex].func;
@@ -46393,7 +46393,7 @@ int HP_path_check_distance(int dx, int dy, int distance) {
retVal___ = HPMHooks.source.path.check_distance(dx, dy, distance);
}
if( HPMHooks.count.HP_path_check_distance_post ) {
- int (*postHookFunc) (int retVal___, int *dx, int *dy, int *distance);
+ bool (*postHookFunc) (bool retVal___, int *dx, int *dy, int *distance);
for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_path_check_distance_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &dx, &dy, &distance);
@@ -46428,6 +46428,60 @@ unsigned int HP_path_distance(int dx, int dy) {
}
return retVal___;
}
+bool HP_path_check_distance_client(int dx, int dy, int distance) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_path_check_distance_client_pre ) {
+ bool (*preHookFunc) (int *dx, int *dy, int *distance);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_path_check_distance_client_pre[hIndex].func;
+ retVal___ = preHookFunc(&dx, &dy, &distance);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.path.check_distance_client(dx, dy, distance);
+ }
+ if( HPMHooks.count.HP_path_check_distance_client_post ) {
+ bool (*postHookFunc) (bool retVal___, int *dx, int *dy, int *distance);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_path_check_distance_client_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &dx, &dy, &distance);
+ }
+ }
+ return retVal___;
+}
+int HP_path_distance_client(int dx, int dy) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_path_distance_client_pre ) {
+ int (*preHookFunc) (int *dx, int *dy);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_path_distance_client_pre[hIndex].func;
+ retVal___ = preHookFunc(&dx, &dy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.path.distance_client(dx, dy);
+ }
+ if( HPMHooks.count.HP_path_distance_client_post ) {
+ int (*postHookFunc) (int retVal___, int *dx, int *dy);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_path_distance_client_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &dx, &dy);
+ }
+ }
+ return retVal___;
+}
/* pcg */
void HP_pcg_init(void) {
int hIndex = 0;
@@ -66919,6 +66973,59 @@ int HP_unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id,
}
return retVal___;
}
+int HP_unit_step_timer(int tid, int64 tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_unit_step_timer_pre ) {
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_step_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.step_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_unit_step_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_step_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_unit_stop_stepaction(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_unit_stop_stepaction_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_stop_stepaction_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.unit.stop_stepaction(bl);
+ }
+ if( HPMHooks.count.HP_unit_stop_stepaction_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_stop_stepaction_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
int HP_unit_is_walking(struct block_list *bl) {
int hIndex = 0;
int retVal___ = 0;
@@ -67135,32 +67242,31 @@ int HP_unit_set_target(struct unit_data *ud, int target_id) {
}
return retVal___;
}
-int HP_unit_stop_attack(struct block_list *bl) {
+void HP_unit_stop_attack(struct block_list *bl) {
int hIndex = 0;
- int retVal___ = 0;
if( HPMHooks.count.HP_unit_stop_attack_pre ) {
- int (*preHookFunc) (struct block_list *bl);
+ void (*preHookFunc) (struct block_list *bl);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_unit_stop_attack_pre[hIndex].func;
- retVal___ = preHookFunc(bl);
+ preHookFunc(bl);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return retVal___;
+ return;
}
}
{
- retVal___ = HPMHooks.source.unit.stop_attack(bl);
+ HPMHooks.source.unit.stop_attack(bl);
}
if( HPMHooks.count.HP_unit_stop_attack_post ) {
- int (*postHookFunc) (int retVal___, struct block_list *bl);
+ void (*postHookFunc) (struct block_list *bl);
for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_unit_stop_attack_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, bl);
+ postHookFunc(bl);
}
}
- return retVal___;
+ return;
}
int HP_unit_unattackable(struct block_list *bl) {
int hIndex = 0;