summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking.Hooks.inc
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-01-09 17:25:53 -0200
committershennetsind <ind@henn.et>2014-01-09 17:25:53 -0200
commit56649bda4b2f62cf42847830546b5856234b3178 (patch)
tree1ccf6f09b6620d95a177468bbee9cd0d428c1218 /src/plugins/HPMHooking/HPMHooking.Hooks.inc
parentb79a9d7efa9213e3c791ec356bf21b712878d1aa (diff)
parent763102b807239809d318add3fae5629bfd50a78b (diff)
downloadhercules-56649bda4b2f62cf42847830546b5856234b3178.tar.gz
hercules-56649bda4b2f62cf42847830546b5856234b3178.tar.bz2
hercules-56649bda4b2f62cf42847830546b5856234b3178.tar.xz
hercules-56649bda4b2f62cf42847830546b5856234b3178.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc42
1 files changed, 34 insertions, 8 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index 72b212b9e..e5aa3bd4a 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -43314,6 +43314,31 @@ void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) {
}
return;
}
+void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_market_delfromsql_sub_pre ) {
+ void (*preHookFunc) (const char *npcname, unsigned short *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_pre[hIndex].func;
+ preHookFunc(npcname, &index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.market_delfromsql_sub(npcname, index);
+ }
+ if( HPMHooks.count.HP_npc_market_delfromsql_sub_post ) {
+ void (*postHookFunc) (const char *npcname, unsigned short *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_post[hIndex].func;
+ postHookFunc(npcname, &index);
+ }
+ }
+ return;
+}
int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
@@ -51956,30 +51981,31 @@ struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op typ
}
return retVal___;
}
-void HP_script_get_val(struct script_state *st, struct script_data *data) {
+struct script_data* HP_script_get_val(struct script_state *st, struct script_data *data) {
int hIndex = 0;
+ struct script_data* retVal___ = NULL;
if( HPMHooks.count.HP_script_get_val_pre ) {
- void (*preHookFunc) (struct script_state *st, struct script_data *data);
+ struct script_data* (*preHookFunc) (struct script_state *st, struct script_data *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_get_val_pre[hIndex].func;
- preHookFunc(st, data);
+ retVal___ = preHookFunc(st, data);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return;
+ return retVal___;
}
}
{
- HPMHooks.source.script.get_val(st, data);
+ retVal___ = HPMHooks.source.script.get_val(st, data);
}
if( HPMHooks.count.HP_script_get_val_post ) {
- void (*postHookFunc) (struct script_state *st, struct script_data *data);
+ struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_state *st, struct script_data *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_script_get_val_post[hIndex].func;
- postHookFunc(st, data);
+ retVal___ = postHookFunc(retVal___, st, data);
}
}
- return;
+ return retVal___;
}
void* HP_script_get_val2(struct script_state *st, int uid, struct DBMap **ref) {
int hIndex = 0;