diff options
author | Hercules.ws <dev@herc.ws> | 2018-10-22 03:39:42 +0200 |
---|---|---|
committer | HerculesWSAPI <dev@herc.ws> | 2018-10-22 03:39:42 +0200 |
commit | 1fa79a5242a7bc41ef912dfba2dbc17ee4dcc776 (patch) | |
tree | eb3caf67522651b280246c7051d2a331981ee1db /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | |
parent | 58afe047cd566fd58a2f8c9ca04ac4d76aa3e102 (diff) | |
download | hercules-1fa79a5242a7bc41ef912dfba2dbc17ee4dcc776.tar.gz hercules-1fa79a5242a7bc41ef912dfba2dbc17ee4dcc776.tar.bz2 hercules-1fa79a5242a7bc41ef912dfba2dbc17ee4dcc776.tar.xz hercules-1fa79a5242a7bc41ef912dfba2dbc17ee4dcc776.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index b177c12c0..fa80a68fd 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -28965,6 +28965,32 @@ void HP_clif_camera_change(struct map_session_data *sd, float range, float rotat } return; } +void HP_clif_item_preview(struct map_session_data *sd, int n) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_item_preview_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_preview_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_item_preview_pre[hIndex].func; + preHookFunc(&sd, &n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_preview(sd, n); + } + if (HPMHooks.count.HP_clif_item_preview_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_preview_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_item_preview_post[hIndex].func; + postHookFunc(sd, n); + } + } + return; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; @@ -66735,6 +66761,33 @@ bool HP_quest_questinfo_validate_quests(struct map_session_data *sd, struct ques } return retVal___; } +bool HP_quest_questinfo_validate_mercenary_class(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_mercenary_class_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_mercenary_class(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_mercenary_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} void HP_quest_questinfo_vector_clear(int m) { int hIndex = 0; if (HPMHooks.count.HP_quest_questinfo_vector_clear_pre > 0) { |