Ver código fonte

- Fixed npc_event doing a map-check when the npc is not on any map.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5473 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 anos atrás
pai
commit
b9b3055897
2 arquivos alterados com 3 adições e 1 exclusões
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/npc.c

+ 2 - 0
Changelog-Trunk.txt

@@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EV
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
 2006/03/06
+	* Fixed npc_event doing a map-check when the npc is not on any map.
+	  [Skotlex]
 	* Fixed a debug message showing up on skill castend nodamage id when using
 	  a guild skill. [Skotlex]
 	* Fixed #save not working on maps not in the current map server. [Skotlex]

+ 1 - 1
src/map/npc.c

@@ -822,7 +822,7 @@ 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 != sd->bl.m )
+		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;