Explorar el Código

* Fixed a typo in npc_touchnext_areanpc (NPC's map being used as it's x-coordinate), which caused ::OnTouch_ invokation to affect different area than intended (bugreport:4814, since r14097).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14743 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei hace 14 años
padre
commit
44294eb3b1
Se han modificado 2 ficheros con 3 adiciones y 1 borrados
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/npc.c

+ 2 - 0
Changelog-Trunk.txt

@@ -1,5 +1,7 @@
 Date	Added
 
+2011/03/14
+	* Fixed a typo in npc_touchnext_areanpc (NPC's map being used as it's x-coordinate), which caused ::OnTouch_ invokation to affect different area than intended (bugreport:4814, since r14097). [Ai4rei]
 2011/03/13
 	* Script commands documentation updates. [Ai4rei]
 	- Added missing description for script command 'cooking' provided by Masao (bugreport:3372, follow up to r13628).

+ 1 - 1
src/map/npc.c

@@ -813,7 +813,7 @@ int npc_touchnext_areanpc(struct map_session_data* sd, bool leavemap)
 
 		nd->touching_id = sd->touching_id = 0;
 		snprintf(name, ARRAYLENGTH(name), "%s::%s", nd->exname, script_config.ontouch_name);
-		map_forcountinarea(npc_touch_areanpc_sub,nd->bl.m,nd->bl.m - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,nd->bl.id,name);
+		map_forcountinarea(npc_touch_areanpc_sub,nd->bl.m,nd->bl.x - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,nd->bl.id,name);
 	}
 	return 0;
 }