summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2014-12-16 21:05:23 +0100
committerHerculesWSAPI <Hercules@efficiently.awesome>2014-12-16 21:05:23 +0100
commit445bb7d0595832b3fed3ad3218073c4f6b6bb207 (patch)
tree1d9e289d7c5bd1a43ec7f2441c760f1b6bc1c9f9 /src
parent2678d34cc2494f6abc53195e85bc65c9fdc382aa (diff)
downloadhercules-445bb7d0595832b3fed3ad3218073c4f6b6bb207.tar.gz
hercules-445bb7d0595832b3fed3ad3218073c4f6b6bb207.tar.bz2
hercules-445bb7d0595832b3fed3ad3218073c4f6b6bb207.tar.xz
hercules-445bb7d0595832b3fed3ad3218073c4f6b6bb207.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc54
3 files changed, 64 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 74e765cee..a68afc9ed 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -3205,6 +3205,8 @@ struct {
struct HPMHookPoint *HP_npc_ontouch_event_post;
struct HPMHookPoint *HP_npc_ontouch2_event_pre;
struct HPMHookPoint *HP_npc_ontouch2_event_post;
+ struct HPMHookPoint *HP_npc_onuntouch_event_pre;
+ struct HPMHookPoint *HP_npc_onuntouch_event_post;
struct HPMHookPoint *HP_npc_enable_sub_pre;
struct HPMHookPoint *HP_npc_enable_sub_post;
struct HPMHookPoint *HP_npc_enable_pre;
@@ -3253,6 +3255,8 @@ struct {
struct HPMHookPoint *HP_npc_touchnext_areanpc_post;
struct HPMHookPoint *HP_npc_touch_areanpc_pre;
struct HPMHookPoint *HP_npc_touch_areanpc_post;
+ struct HPMHookPoint *HP_npc_untouch_areanpc_pre;
+ struct HPMHookPoint *HP_npc_untouch_areanpc_post;
struct HPMHookPoint *HP_npc_touch_areanpc2_pre;
struct HPMHookPoint *HP_npc_touch_areanpc2_post;
struct HPMHookPoint *HP_npc_check_areanpc_pre;
@@ -8276,6 +8280,8 @@ struct {
int HP_npc_ontouch_event_post;
int HP_npc_ontouch2_event_pre;
int HP_npc_ontouch2_event_post;
+ int HP_npc_onuntouch_event_pre;
+ int HP_npc_onuntouch_event_post;
int HP_npc_enable_sub_pre;
int HP_npc_enable_sub_post;
int HP_npc_enable_pre;
@@ -8324,6 +8330,8 @@ struct {
int HP_npc_touchnext_areanpc_post;
int HP_npc_touch_areanpc_pre;
int HP_npc_touch_areanpc_post;
+ int HP_npc_untouch_areanpc_pre;
+ int HP_npc_untouch_areanpc_post;
int HP_npc_touch_areanpc2_pre;
int HP_npc_touch_areanpc2_post;
int HP_npc_check_areanpc_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 5d0545f82..e615b9767 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1629,6 +1629,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(npc->isnear, HP_npc_isnear) },
{ HP_POP(npc->ontouch_event, HP_npc_ontouch_event) },
{ HP_POP(npc->ontouch2_event, HP_npc_ontouch2_event) },
+ { HP_POP(npc->onuntouch_event, HP_npc_onuntouch_event) },
{ HP_POP(npc->enable_sub, HP_npc_enable_sub) },
{ HP_POP(npc->enable, HP_npc_enable) },
{ HP_POP(npc->name2id, HP_npc_name2id) },
@@ -1653,6 +1654,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(npc->touch_areanpc_sub, HP_npc_touch_areanpc_sub) },
{ HP_POP(npc->touchnext_areanpc, HP_npc_touchnext_areanpc) },
{ HP_POP(npc->touch_areanpc, HP_npc_touch_areanpc) },
+ { HP_POP(npc->untouch_areanpc, HP_npc_untouch_areanpc) },
{ HP_POP(npc->touch_areanpc2, HP_npc_touch_areanpc2) },
{ HP_POP(npc->check_areanpc, HP_npc_check_areanpc) },
{ HP_POP(npc->checknear, HP_npc_checknear) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 0169d43c7..cf4e0e871 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -42784,6 +42784,33 @@ int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) {
}
return retVal___;
}
+int HP_npc_onuntouch_event(struct map_session_data *sd, struct npc_data *nd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_npc_onuntouch_event_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_onuntouch_event_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.onuntouch_event(sd, nd);
+ }
+ if( HPMHooks.count.HP_npc_onuntouch_event_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_onuntouch_event_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, nd);
+ }
+ }
+ return retVal___;
+}
int HP_npc_enable_sub(struct block_list *bl, va_list ap) {
int hIndex = 0;
int retVal___ = 0;
@@ -43454,6 +43481,33 @@ int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y)
}
return retVal___;
}
+int HP_npc_untouch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_npc_untouch_areanpc_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &m, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.untouch_areanpc(sd, m, x, y);
+ }
+ if( HPMHooks.count.HP_npc_untouch_areanpc_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &m, &x, &y);
+ }
+ }
+ return retVal___;
+}
int HP_npc_touch_areanpc2(struct mob_data *md) {
int hIndex = 0;
int retVal___ = 0;