summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2013-11-02 21:03:43 +0100
committerHerculesWSAPI <Hercules@efficiently.awesome>2013-11-02 21:03:43 +0100
commit991b6593df172fb8e7166a22b0c8176cb0a96626 (patch)
treee08cbacec5cc8709407459c6a12929f4923a9dd1 /src/plugins
parent84e4e6ee1dcaf37d73ec6f590c675ce4b17352b9 (diff)
downloadhercules-991b6593df172fb8e7166a22b0c8176cb0a96626.tar.gz
hercules-991b6593df172fb8e7166a22b0c8176cb0a96626.tar.bz2
hercules-991b6593df172fb8e7166a22b0c8176cb0a96626.tar.xz
hercules-991b6593df172fb8e7166a22b0c8176cb0a96626.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc52
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;