summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2016-04-27 01:41:09 +0200
committerHerculesWSAPI <Hercules@efficiently.awesome>2016-04-27 01:41:09 +0200
commitcb0513e8aeb81a33995a37843ec45216de720264 (patch)
tree2dacce5a5d11beb662084514bf1b135552f3012a /src
parentcd86cccaefd4ecd13c68d95d7967f0d8f4f890ff (diff)
downloadhercules-cb0513e8aeb81a33995a37843ec45216de720264.tar.gz
hercules-cb0513e8aeb81a33995a37843ec45216de720264.tar.bz2
hercules-cb0513e8aeb81a33995a37843ec45216de720264.tar.xz
hercules-cb0513e8aeb81a33995a37843ec45216de720264.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src')
-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
3 files changed, 31 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 9fe5dbd58..1de0b6077 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -5812,6 +5812,8 @@ struct {
struct HPMHookPoint *HP_unit_bl2ud_post;
struct HPMHookPoint *HP_unit_bl2ud2_pre;
struct HPMHookPoint *HP_unit_bl2ud2_post;
+ struct HPMHookPoint *HP_unit_init_ud_pre;
+ struct HPMHookPoint *HP_unit_init_ud_post;
struct HPMHookPoint *HP_unit_attack_timer_pre;
struct HPMHookPoint *HP_unit_attack_timer_post;
struct HPMHookPoint *HP_unit_walktoxy_timer_pre;
@@ -11707,6 +11709,8 @@ struct {
int HP_unit_bl2ud_post;
int HP_unit_bl2ud2_pre;
int HP_unit_bl2ud2_post;
+ int HP_unit_init_ud_pre;
+ int HP_unit_init_ud_post;
int HP_unit_attack_timer_pre;
int HP_unit_attack_timer_post;
int HP_unit_walktoxy_timer_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 35f057def..b7a9fddd5 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2974,6 +2974,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(unit->final, HP_unit_final) },
{ HP_POP(unit->bl2ud, HP_unit_bl2ud) },
{ HP_POP(unit->bl2ud2, HP_unit_bl2ud2) },
+ { HP_POP(unit->init_ud, HP_unit_init_ud) },
{ HP_POP(unit->attack_timer, HP_unit_attack_timer) },
{ HP_POP(unit->walktoxy_timer, HP_unit_walktoxy_timer) },
{ HP_POP(unit->walktoxy_sub, HP_unit_walktoxy_sub) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index bd9be84bd..7a63a2afc 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -77927,6 +77927,32 @@ struct unit_data* HP_unit_bl2ud2(struct block_list *bl) {
}
return retVal___;
}
+void HP_unit_init_ud(struct unit_data *ud) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_unit_init_ud_pre ) {
+ void (*preHookFunc) (struct unit_data *ud);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_ud_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_init_ud_pre[hIndex].func;
+ preHookFunc(ud);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.unit.init_ud(ud);
+ }
+ if( HPMHooks.count.HP_unit_init_ud_post ) {
+ void (*postHookFunc) (struct unit_data *ud);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_ud_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_init_ud_post[hIndex].func;
+ postHookFunc(ud);
+ }
+ }
+ return;
+}
int HP_unit_attack_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;