summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-29 16:59:08 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-29 16:59:08 +0000
commitbd28a6d4b623ee8cc80d39fe1e7bfcf32c8c81ee (patch)
tree7a2ad7b67d80aea507602b19a6951758c3afd77f /src/map/npc.c
parenta664daa20732c695d1f17f09ccf22fc1c343f147 (diff)
downloadhercules-bd28a6d4b623ee8cc80d39fe1e7bfcf32c8c81ee.tar.gz
hercules-bd28a6d4b623ee8cc80d39fe1e7bfcf32c8c81ee.tar.bz2
hercules-bd28a6d4b623ee8cc80d39fe1e7bfcf32c8c81ee.tar.xz
hercules-bd28a6d4b623ee8cc80d39fe1e7bfcf32c8c81ee.zip
- Applied a fix to not do xs/ys checks on npc_doevent when the npc is not on a map.
- You can't return to egg a pet that has run away now. - Added ers support to the delayed mob drops. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5800 54d463be-8e91-2dee-dedb-b68131a5f0ec
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) {