浏览代码

Fixed hunter traps so that they MAY hit their owner in pvp areas, bugreport:5228

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15451 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 年之前
父节点
当前提交
2b204f1123
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      src/map/battle.c

+ 6 - 5
src/map/battle.c

@@ -4152,13 +4152,14 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
 		case BL_SKILL:
 		{
 			struct skill_unit *su = (struct skill_unit *)src;
+			int inf2;
 			if (!su->group)
 				return 0;
-
-			if (su->group->src_id == target->id)
-			{
-				int inf2;
-				inf2 = skill_get_inf2(su->group->skill_id);
+			if( battle_config.vs_traps_bctall &&
+				(inf2 = skill_get_inf2(su->group->skill_id))&INF2_TRAP &&
+					map_flag_vs(src->m) )
+				return 1;//traps may target everyone
+			if (su->group->src_id == target->id) {
 				if (inf2&INF2_NO_TARGET_SELF)
 					return -1;
 				if (inf2&INF2_TARGET_SELF)