From b055baa7d31b229a80e6740cd2195bc8a857b70b Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 12 Apr 2018 03:26:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=9C=EB=B3=91=EC=8B=9C=20=EC=9D=B8?= =?UTF-8?q?=EC=A0=91=20=EB=8F=84=EC=8B=9C=20=EC=B2=B4=ED=81=AC=20=EB=A3=B0?= =?UTF-8?q?=EC=9D=84=20DB=EA=B0=80=20=EC=95=84=EB=8B=88=EB=9D=BC=20CityCon?= =?UTF-8?q?st=EC=97=90=20=EA=B8=B0=EB=B0=98=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_process.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hwe/func_process.php b/hwe/func_process.php index d16d3632..f10e6ff4 100644 --- a/hwe/func_process.php +++ b/hwe/func_process.php @@ -1253,11 +1253,10 @@ function process_16(&$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select path,nation,supply from city where city='{$general['city']}'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $path = explode("|", $city['path']); $command = DecodeCommand($general['turn0']); $destination = $command[1]; @@ -1273,15 +1272,18 @@ function process_16(&$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - for($i=0; $i < count($path); $i++) { - if($path[$i] == $destination) { $valid = 1; } + if(key_exists($destination, CityConst::byID($general['city'])->path)){ + $nearCity = true; + } + else{ + $nearCity = false; } if($admin['year'] < $admin['startyear']+3) { $log[] = "●{$admin['month']}월:현재 초반 제한중입니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; // } elseif($city['supply'] == 0) { // $log[] = "●{$admin['month']}월:고립된 도시입니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; - } elseif(!$valid) { + } elseif(!$nearCity) { $log[] = "●{$admin['month']}월:인접도시가 아닙니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; } elseif($general['level'] == 0) { $log[] = "●{$admin['month']}월:재야입니다. {$destcity['name']}(으)로 출병 실패. <1>$date";