diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2015-12-04 16:48:31 +0100 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2015-12-04 16:48:31 +0100 |
commit | b67c93a32c30690c546846a2a1ee1d035d7f3e24 (patch) | |
tree | 443272ab74d27dfdc0d7b522d822e6cbc89134e7 /src/plugins | |
parent | da6300af9e1529fa2f98cb7481b8a89e17627aa5 (diff) | |
download | hercules-b67c93a32c30690c546846a2a1ee1d035d7f3e24.tar.gz hercules-b67c93a32c30690c546846a2a1ee1d035d7f3e24.tar.bz2 hercules-b67c93a32c30690c546846a2a1ee1d035d7f3e24.tar.xz hercules-b67c93a32c30690c546846a2a1ee1d035d7f3e24.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 26 |
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 c74cc8b7f..39543d1a4 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -4263,6 +4263,8 @@ struct { struct HPMHookPoint *HP_pc_autotrade_final_post; struct HPMHookPoint *HP_pc_check_job_name_pre; struct HPMHookPoint *HP_pc_check_job_name_post; + struct HPMHookPoint *HP_pc_update_idle_time_pre; + struct HPMHookPoint *HP_pc_update_idle_time_post; struct HPMHookPoint *HP_pet_init_pre; struct HPMHookPoint *HP_pet_init_post; struct HPMHookPoint *HP_pet_final_pre; @@ -10042,6 +10044,8 @@ struct { int HP_pc_autotrade_final_post; int HP_pc_check_job_name_pre; int HP_pc_check_job_name_post; + int HP_pc_update_idle_time_pre; + int HP_pc_update_idle_time_post; int HP_pet_init_pre; int HP_pet_init_post; int HP_pet_final_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index a3f7f6b3e..0e8322917 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -2172,6 +2172,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->autotrade_populate, HP_pc_autotrade_populate) }, { HP_POP(pc->autotrade_final, HP_pc_autotrade_final) }, { HP_POP(pc->check_job_name, HP_pc_check_job_name) }, + { HP_POP(pc->update_idle_time, HP_pc_update_idle_time) }, /* pet */ { HP_POP(pet->init, HP_pet_init) }, { HP_POP(pet->final, HP_pet_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index fafa4d748..0adf20592 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -57069,6 +57069,32 @@ int HP_pc_check_job_name(const char *name) { } return retVal___; } +void HP_pc_update_idle_time(struct map_session_data *sd, enum e_battle_config_idletime type) { + int hIndex = 0; + if( HPMHooks.count.HP_pc_update_idle_time_pre ) { + void (*preHookFunc) (struct map_session_data *sd, enum e_battle_config_idletime *type); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_idle_time_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_update_idle_time_pre[hIndex].func; + preHookFunc(sd, &type); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.update_idle_time(sd, type); + } + if( HPMHooks.count.HP_pc_update_idle_time_post ) { + void (*postHookFunc) (struct map_session_data *sd, enum e_battle_config_idletime *type); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_idle_time_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_update_idle_time_post[hIndex].func; + postHookFunc(sd, &type); + } + } + return; +} /* pet */ int HP_pet_init(bool minimal) { int hIndex = 0; |