diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 8 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HookingPoints.inc | 2 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 52 |
3 files changed, 62 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index 87d169e1c..9c4c5bc55 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -3251,6 +3251,10 @@ struct { struct HPMHookPoint *HP_npc_delsrcfile_post; struct HPMHookPoint *HP_npc_parsename_pre; struct HPMHookPoint *HP_npc_parsename_post; + struct HPMHookPoint *HP_npc_parseview_pre; + struct HPMHookPoint *HP_npc_parseview_post; + struct HPMHookPoint *HP_npc_viewisid_pre; + struct HPMHookPoint *HP_npc_viewisid_post; struct HPMHookPoint *HP_npc_add_warp_pre; struct HPMHookPoint *HP_npc_add_warp_post; struct HPMHookPoint *HP_npc_parse_warp_pre; @@ -8150,6 +8154,10 @@ struct { int HP_npc_delsrcfile_post; int HP_npc_parsename_pre; int HP_npc_parsename_post; + int HP_npc_parseview_pre; + int HP_npc_parseview_post; + int HP_npc_viewisid_pre; + int HP_npc_viewisid_post; int HP_npc_add_warp_pre; int HP_npc_add_warp_post; int HP_npc_parse_warp_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 97761842e..75fcdac54 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -1652,6 +1652,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->addsrcfile, HP_npc_addsrcfile) }, { HP_POP(npc->delsrcfile, HP_npc_delsrcfile) }, { HP_POP(npc->parsename, HP_npc_parsename) }, + { HP_POP(npc->parseview, HP_npc_parseview) }, + { HP_POP(npc->viewisid, HP_npc_viewisid) }, { 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) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index 7ba95face..178369035 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -41845,6 +41845,58 @@ void HP_npc_parsename(struct npc_data *nd, const char *name, const char *start, } return; } +int HP_npc_parseview(const char *w4, const char *start, const char *buffer, const char *filepath) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_npc_parseview_pre ) { + int (*preHookFunc) (const char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_parseview_pre[hIndex].func; + retVal___ = preHookFunc(w4, start, buffer, filepath); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.parseview(w4, start, buffer, filepath); + } + if( HPMHooks.count.HP_npc_parseview_post ) { + int (*postHookFunc) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_parseview_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w4, start, buffer, filepath); + } + } + return retVal___; +} +bool HP_npc_viewisid(const char *viewid) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_npc_viewisid_pre ) { + bool (*preHookFunc) (const char *viewid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_npc_viewisid_pre[hIndex].func; + retVal___ = preHookFunc(viewid); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.viewisid(viewid); + } + if( HPMHooks.count.HP_npc_viewisid_post ) { + bool (*postHookFunc) (bool retVal___, const char *viewid); + for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_npc_viewisid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, viewid); + } + } + 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; |