summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-28 23:35:36 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-28 23:35:36 +0300
commit147b4a940387abb9cb5e0f1c13124168036968d7 (patch)
treeaa86b138217b034c12cd5ee32e69f8359d27b78b /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
parent674092152236dca6784081e5e93540069b54549e (diff)
downloadhercules-147b4a940387abb9cb5e0f1c13124168036968d7.tar.gz
hercules-147b4a940387abb9cb5e0f1c13124168036968d7.tar.bz2
hercules-147b4a940387abb9cb5e0f1c13124168036968d7.tar.xz
hercules-147b4a940387abb9cb5e0f1c13124168036968d7.zip
Update HPM hooks.
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 6822d68e8..2e1c95573 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -44115,6 +44115,33 @@ bool HP_npc_viewisid(const char *viewid) {
}
return retVal___;
}
+struct npc_data* HP_npc_create_npc(int m, int x, int y) {
+ int hIndex = 0;
+ struct npc_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_create_npc_pre ) {
+ struct npc_data* (*preHookFunc) (int *m, int *x, int *y);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_create_npc_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.create_npc(m, x, y);
+ }
+ if( HPMHooks.count.HP_npc_create_npc_post ) {
+ struct npc_data* (*postHookFunc) (struct npc_data* retVal___, int *m, int *x, int *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_create_npc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, &x, &y);
+ }
+ }
+ return retVal___;
+}
struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y) {
int hIndex = 0;
struct npc_data* retVal___ = NULL;