diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-16 14:03:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-27 11:23:04 +0300 |
commit | 6c7a70a59ef7b074730e68f1c25fb89f1ee74a77 (patch) | |
tree | 9518bb475a36485931b0b747bf1e63c96295e9a1 /src/plugins | |
parent | d59df7395f890f1b0e3322238726464980f0c4fd (diff) | |
download | hercules-6c7a70a59ef7b074730e68f1c25fb89f1ee74a77.tar.gz hercules-6c7a70a59ef7b074730e68f1c25fb89f1ee74a77.tar.bz2 hercules-6c7a70a59ef7b074730e68f1c25fb89f1ee74a77.tar.xz hercules-6c7a70a59ef7b074730e68f1c25fb89f1ee74a77.zip |
update HPM hooks.
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc | 8 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 2 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 53 |
3 files changed, 63 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 6e982bb70..e1a98e510 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -3307,6 +3307,8 @@ struct { struct HPMHookPoint *HP_npc_parse_warp_post; struct HPMHookPoint *HP_npc_parse_shop_pre; struct HPMHookPoint *HP_npc_parse_shop_post; + struct HPMHookPoint *HP_npc_parse_unknown_object_pre; + struct HPMHookPoint *HP_npc_parse_unknown_object_post; struct HPMHookPoint *HP_npc_convertlabel_db_pre; struct HPMHookPoint *HP_npc_convertlabel_db_post; struct HPMHookPoint *HP_npc_skip_script_pre; @@ -3339,6 +3341,8 @@ struct { struct HPMHookPoint *HP_npc_parse_mob_post; struct HPMHookPoint *HP_npc_parse_mapflag_pre; struct HPMHookPoint *HP_npc_parse_mapflag_post; + struct HPMHookPoint *HP_npc_parse_unknown_mapflag_pre; + struct HPMHookPoint *HP_npc_parse_unknown_mapflag_post; struct HPMHookPoint *HP_npc_parsesrcfile_pre; struct HPMHookPoint *HP_npc_parsesrcfile_post; struct HPMHookPoint *HP_npc_script_event_pre; @@ -8366,6 +8370,8 @@ struct { int HP_npc_parse_warp_post; int HP_npc_parse_shop_pre; int HP_npc_parse_shop_post; + int HP_npc_parse_unknown_object_pre; + int HP_npc_parse_unknown_object_post; int HP_npc_convertlabel_db_pre; int HP_npc_convertlabel_db_post; int HP_npc_skip_script_pre; @@ -8398,6 +8404,8 @@ struct { int HP_npc_parse_mob_post; int HP_npc_parse_mapflag_pre; int HP_npc_parse_mapflag_post; + int HP_npc_parse_unknown_mapflag_pre; + int HP_npc_parse_unknown_mapflag_post; int HP_npc_parsesrcfile_pre; int HP_npc_parsesrcfile_post; int HP_npc_script_event_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 00bd82f94..f33f9868b 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -1680,6 +1680,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->add_warp, HP_npc_add_warp) }, { HP_POP(npc->parse_warp, HP_npc_parse_warp) }, { HP_POP(npc->parse_shop, HP_npc_parse_shop) }, + { HP_POP(npc->parse_unknown_object, HP_npc_parse_unknown_object) }, { HP_POP(npc->convertlabel_db, HP_npc_convertlabel_db) }, { HP_POP(npc->skip_script, HP_npc_skip_script) }, { HP_POP(npc->parse_script, HP_npc_parse_script) }, @@ -1696,6 +1697,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->parse_mob2, HP_npc_parse_mob2) }, { HP_POP(npc->parse_mob, HP_npc_parse_mob) }, { HP_POP(npc->parse_mapflag, HP_npc_parse_mapflag) }, + { HP_POP(npc->parse_unknown_mapflag, HP_npc_parse_unknown_mapflag) }, { HP_POP(npc->parsesrcfile, HP_npc_parsesrcfile) }, { HP_POP(npc->script_event, HP_npc_script_event) }, { HP_POP(npc->read_event_script, HP_npc_read_event_script) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 57a609024..6822d68e8 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -44196,6 +44196,33 @@ const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char } return retVal___; } +const char* HP_npc_parse_unknown_object(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { + int hIndex = 0; + const char* retVal___ = NULL; + if( HPMHooks.count.HP_npc_parse_unknown_object_pre ) { + const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.parse_unknown_object(w1, w2, w3, w4, start, buffer, filepath, retval); + } + if( HPMHooks.count.HP_npc_parse_unknown_object_post ) { + const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); + } + } + return retVal___; +} void HP_npc_convertlabel_db(struct npc_label_list *label_list, const char *filepath) { int hIndex = 0; if( HPMHooks.count.HP_npc_convertlabel_db_pre ) { @@ -44627,6 +44654,32 @@ const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const c } return retVal___; } +void HP_npc_parse_unknown_mapflag(const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { + int hIndex = 0; + if( HPMHooks.count.HP_npc_parse_unknown_mapflag_pre ) { + void (*preHookFunc) (const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_pre[hIndex].func; + preHookFunc(name, w3, w4, start, buffer, filepath, retval); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.parse_unknown_mapflag(name, w3, w4, start, buffer, filepath, retval); + } + if( HPMHooks.count.HP_npc_parse_unknown_mapflag_post ) { + void (*postHookFunc) (const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_post[hIndex].func; + postHookFunc(name, w3, w4, start, buffer, filepath, retval); + } + } + return; +} int HP_npc_parsesrcfile(const char *filepath, bool runOnInit) { int hIndex = 0; int retVal___ = 0; |