diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2014-07-10 07:03:41 +0200 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2014-07-10 07:03:41 +0200 |
commit | 8e3b160fa7f62246fd19bb973f544b387d42eeb2 (patch) | |
tree | 82f7397bec37de0756a9de5b770e9f57691ea7c8 /src/plugins/HPMHooking/HPMHooking.Hooks.inc | |
parent | 9dd6ee636b783f1cd57b1be3d02fcc9782ebe2c3 (diff) | |
download | hercules-8e3b160fa7f62246fd19bb973f544b387d42eeb2.tar.gz hercules-8e3b160fa7f62246fd19bb973f544b387d42eeb2.tar.bz2 hercules-8e3b160fa7f62246fd19bb973f544b387d42eeb2.tar.xz hercules-8e3b160fa7f62246fd19bb973f544b387d42eeb2.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 78139fb61..84f1f6dc9 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -46911,6 +46911,60 @@ bool HP_pc_can_give_bound_items(struct map_session_data *sd) { } return retVal___; } +bool HP_pc_can_talk(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_pc_can_talk_pre ) { + bool (*preHookFunc) (struct map_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_talk_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.can_talk(sd); + } + if( HPMHooks.count.HP_pc_can_talk_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_talk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +bool HP_pc_can_attack(struct map_session_data *sd, int target_id) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_pc_can_attack_pre ) { + bool (*preHookFunc) (struct map_session_data *sd, int *target_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pc_can_attack_pre[hIndex].func; + retVal___ = preHookFunc(sd, &target_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.can_attack(sd, target_id); + } + if( HPMHooks.count.HP_pc_can_attack_post ) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *target_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pc_can_attack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, &target_id); + } + } + return retVal___; +} bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { int hIndex = 0; bool retVal___ = false; |