浏览代码

PCs/Mobs/NPCs now block Leap(TK_HIGHJUMP) and sprint(TK_RUN). (bugreport:1155)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12485 54d463be-8e91-2dee-dedb-b68131a5f0ec
Kevin 17 年之前
父节点
当前提交
1a5d1c8780
共有 3 个文件被更改,包括 7 次插入1 次删除
  1. 1 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/skill.c
  3. 5 0
      src/map/unit.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2008/04/04
+	* PCs/Mobs/NPCs now block Leap(TK_HIGHJUMP) and sprint(TK_RUN). (r12485) [Kevin]
 	* Disconnect user when receive select egg packet with no menu open. (r12484) [Kevin]
 	* Fixed @rura between maps on more then one map server. (r12483) [Kevin]
 	* Update to Auth Glitch fix: moved unit_free_pc back to where it was

+ 1 - 1
src/map/skill.c

@@ -4257,7 +4257,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 			}
 			
 			clif_skill_nodamage(src,bl,TK_HIGHJUMP,skilllv,1);
-			if(map_getcell(src->m,x,y,CELL_CHKPASS)) {
+			if(map_count_oncell(src->m,x,y,BL_PC|BL_NPC|BL_MOB)) {
 				clif_slide(src,x,y);
 				unit_movepos(src, x, y, 1, 0);
 			}

+ 5 - 0
src/map/unit.c

@@ -420,6 +420,11 @@ int unit_run(struct block_list *bl)
 	{
 		if(!map_getcell(bl->m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS))
 			break;
+
+		//if sprinting and there's a PC/Mob/NPC, block the path [Kevin]
+		if(sc->data[SC_RUN] && map_count_oncell(bl->m, to_x+dir_x, to_y+dir_y, BL_PC|BL_MOB|BL_NPC))
+			break;
+			
 		to_x += dir_x;
 		to_y += dir_y;
 	}