summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking.Hooks.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc54
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;