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 = [];