summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 4f0877076..b890a4ce6 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -821,13 +821,16 @@ int npc_event (struct map_session_data *sd, const unsigned char *eventname, int
xs=nd->u.scr.xs;
ys=nd->u.scr.ys;
- if (xs>=0 && ys>=0 && (strcmp(((eventname)+strlen(eventname)-6),"Global") != 0) ) {
- if (nd->bl.m >= 0 && nd->bl.m != sd->bl.m )
- return 1;
- if ( xs>0 && (sd->bl.x<nd->bl.x-xs/2 || nd->bl.x+xs/2<sd->bl.x) )
- return 1;
- if ( ys>0 && (sd->bl.y<nd->bl.y-ys/2 || nd->bl.y+ys/2<sd->bl.y) )
- return 1;
+ if (xs>=0 && ys>=0 && (strcmp(((eventname)+strlen(eventname)-6),"Global") != 0) )
+ {
+ if (nd->bl.m >= 0) { //Non-invisible npc
+ if (nd->bl.m != sd->bl.m )
+ return 1;
+ if ( xs>0 && (sd->bl.x<nd->bl.x-xs/2 || nd->bl.x+xs/2<sd->bl.x) )
+ return 1;
+ if ( ys>0 && (sd->bl.y<nd->bl.y-ys/2 || nd->bl.y+ys/2<sd->bl.y) )
+ return 1;
+ }
}
if ( sd->npc_id!=0) {