summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
authorIbrahim Zidan <brahem@aotsw.com>2019-05-07 08:12:48 +0200
committerIbrahim Zidan <brahem@aotsw.com>2019-09-22 23:45:41 +0200
commitad19056bfcc1e98129bf25e14b58dcd0d438f9f9 (patch)
tree691dd707e2c2166d6471bdbfddeae6db1c71c6b6 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
parent5d8e006fb85df2b3bbc32f2348bbcaad950546ba (diff)
downloadhercules-ad19056bfcc1e98129bf25e14b58dcd0d438f9f9.tar.gz
hercules-ad19056bfcc1e98129bf25e14b58dcd0d438f9f9.tar.bz2
hercules-ad19056bfcc1e98129bf25e14b58dcd0d438f9f9.tar.xz
hercules-ad19056bfcc1e98129bf25e14b58dcd0d438f9f9.zip
HPM Hooks update
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 247087159..f62cb4733 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -74672,6 +74672,58 @@ void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_
}
return;
}
+void HP_script_run_item_rental_end_script(struct map_session_data *sd, struct item_data *data, int oid) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_script_run_item_rental_end_script_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_end_script_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_script_run_item_rental_end_script_pre[hIndex].func;
+ preHookFunc(&sd, &data, &oid);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_item_rental_end_script(sd, data, oid);
+ }
+ if (HPMHooks.count.HP_script_run_item_rental_end_script_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_end_script_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_script_run_item_rental_end_script_post[hIndex].func;
+ postHookFunc(sd, data, oid);
+ }
+ }
+ return;
+}
+void HP_script_run_item_rental_start_script(struct map_session_data *sd, struct item_data *data, int oid) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_script_run_item_rental_start_script_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_start_script_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_script_run_item_rental_start_script_pre[hIndex].func;
+ preHookFunc(&sd, &data, &oid);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_item_rental_start_script(sd, data, oid);
+ }
+ if (HPMHooks.count.HP_script_run_item_rental_start_script_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_start_script_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_script_run_item_rental_start_script_post[hIndex].func;
+ postHookFunc(sd, data, oid);
+ }
+ }
+ return;
+}
/* searchstore_interface */
bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) {
int hIndex = 0;