summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2015-08-11 02:37:15 +0200
committerHerculesWSAPI <Hercules@efficiently.awesome>2015-08-11 02:37:15 +0200
commit909bb005837aba3017870a529b106135e3b84b5b (patch)
tree6656a90f947f6a73f764c801f57326de7c9f0d24 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
parente556fc1b65905ad186de70a9774b8b0aceee9bc0 (diff)
downloadhercules-909bb005837aba3017870a529b106135e3b84b5b.tar.gz
hercules-909bb005837aba3017870a529b106135e3b84b5b.tar.bz2
hercules-909bb005837aba3017870a529b106135e3b84b5b.tar.xz
hercules-909bb005837aba3017870a529b106135e3b84b5b.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc130
1 files changed, 130 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index b8dd9db2f..402f146ba 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -55686,6 +55686,58 @@ void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) {
}
return;
}
+void HP_script_run_npc(struct script_code *rootscript, int pos, int rid, int oid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_npc_pre ) {
+ void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_npc_pre[hIndex].func;
+ preHookFunc(rootscript, &pos, &rid, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_npc(rootscript, pos, rid, oid);
+ }
+ if( HPMHooks.count.HP_script_run_npc_post ) {
+ void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_npc_post[hIndex].func;
+ postHookFunc(rootscript, &pos, &rid, &oid);
+ }
+ }
+ return;
+}
+void HP_script_run_pet(struct script_code *rootscript, int pos, int rid, int oid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_pet_pre ) {
+ void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_pet_pre[hIndex].func;
+ preHookFunc(rootscript, &pos, &rid, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_pet(rootscript, pos, rid, oid);
+ }
+ if( HPMHooks.count.HP_script_run_pet_post ) {
+ void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_pet_post[hIndex].func;
+ postHookFunc(rootscript, &pos, &rid, &oid);
+ }
+ }
+ return;
+}
void HP_script_run_main(struct script_state *st) {
int hIndex = 0;
if( HPMHooks.count.HP_script_run_main_pre ) {
@@ -58915,6 +58967,84 @@ void HP_script_parser_clean_leftovers(void) {
}
return;
}
+void HP_script_run_use_script(struct map_session_data *sd, struct item_data *data, int oid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_use_script_pre ) {
+ 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_use_script_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_use_script_pre[hIndex].func;
+ preHookFunc(sd, data, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_use_script(sd, data, oid);
+ }
+ if( HPMHooks.count.HP_script_run_use_script_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_use_script_post[hIndex].func;
+ postHookFunc(sd, data, &oid);
+ }
+ }
+ return;
+}
+void HP_script_run_item_equip_script(struct map_session_data *sd, struct item_data *data, int oid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_item_equip_script_pre ) {
+ 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_equip_script_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_item_equip_script_pre[hIndex].func;
+ preHookFunc(sd, data, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_item_equip_script(sd, data, oid);
+ }
+ if( HPMHooks.count.HP_script_run_item_equip_script_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_item_equip_script_post[hIndex].func;
+ postHookFunc(sd, data, &oid);
+ }
+ }
+ return;
+}
+void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_data *data, int oid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_item_unequip_script_pre ) {
+ 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_unequip_script_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_pre[hIndex].func;
+ preHookFunc(sd, data, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_item_unequip_script(sd, data, oid);
+ }
+ if( HPMHooks.count.HP_script_run_item_unequip_script_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_post[hIndex].func;
+ postHookFunc(sd, data, &oid);
+ }
+ }
+ return;
+}
/* searchstore */
bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) {
int hIndex = 0;