From 117643f5928631033a195fc3908d57bd883fcb9e Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 1 Apr 2018 22:48:22 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=A9=EB=9E=91=EA=B5=B0=EC=9D=B4=EB=9D=BC?= =?UTF-8?q?=20=EB=8F=84=EC=8B=9C=EA=B0=80=200=EC=9D=BC=EB=95=8C=20?= =?UTF-8?q?=EB=B0=9C=EC=83=9D=ED=95=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_history.php | 2 +- hwe/sammo/Scenario/Nation.php | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/hwe/func_history.php b/hwe/func_history.php index 119f5772..96067e02 100644 --- a/hwe/func_history.php +++ b/hwe/func_history.php @@ -270,7 +270,7 @@ function LogHistory($isFirst=0) { $nationStr .= " {$nation['name']}
"; $powerStr .= "국력 {$nation['power']}
"; $genStr .= "장수 {$nation['gennum']}
"; - $cityStr .= "속령 $citycount
"; + $cityStr .= "속령 $cityCount
"; } if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', contents collected'); diff --git a/hwe/sammo/Scenario/Nation.php b/hwe/sammo/Scenario/Nation.php index 38ee5a62..c071016e 100644 --- a/hwe/sammo/Scenario/Nation.php +++ b/hwe/sammo/Scenario/Nation.php @@ -57,7 +57,13 @@ class Nation{ $cities = array_map(function($cityName){ return \sammo\CityHelper::getCityByName($cityName)['id']; }, $this->cities); - $capital = \sammo\CityHelper::getCityByName($this->capital)['id']; + if($this->capital){ + $capital = \sammo\CityHelper::getCityByName($this->capital)['id']; + } + else{ + $capital = 0; + } + $type = \sammo\NationCharCall($this->type); @@ -85,9 +91,12 @@ class Nation{ 'type'=>$type, ]); - $db->update('city', [ - 'nation'=>$this->id - ], 'city IN %li', $cities); + if($cities){ + $db->update('city', [ + 'nation'=>$this->id + ], 'city IN %li', $cities); + } + $diplomacy = [];