From 388afe6fb45ce4236a54ff8ebf2b352053c663fa Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 24 Apr 2018 01:15:05 +0900 Subject: [PATCH] =?UTF-8?q?CityHelper=EC=97=90=EC=84=9C=20getAllNationCiti?= =?UTF-8?q?es=EA=B0=80=20=EC=98=AC=EB=B0=94=EB=A5=B4=EA=B2=8C=20=EB=8F=99?= =?UTF-8?q?=EC=9E=91=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8D=98=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/CityHelper.php | 7 ++++--- hwe/sammo/Scenario.php | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hwe/sammo/CityHelper.php b/hwe/sammo/CityHelper.php index 1bad62bb..de664322 100644 --- a/hwe/sammo/CityHelper.php +++ b/hwe/sammo/CityHelper.php @@ -29,13 +29,14 @@ class CityHelper{ foreach (DB::db()->query('SELECT `city` as `id`, `name`, `level`, `nation` from city') as $city) { $id = $city['id']; $name = $city['name']; + $nationID = $city['nation']; $list[$id] = $city; $listInv[$city['name']] = $city; - if(!key_exists($id, $listByNation)){ - $listByNation[$id] = []; + if(!key_exists($nationID, $listByNation)){ + $listByNation[$nationID] = []; } - $listByNation[$id][] = $city; + $listByNation[$nationID][] = $city; } self::$list = $list; diff --git a/hwe/sammo/Scenario.php b/hwe/sammo/Scenario.php index b3cad337..deb28cdd 100644 --- a/hwe/sammo/Scenario.php +++ b/hwe/sammo/Scenario.php @@ -312,6 +312,8 @@ class Scenario{ $nation->build($env); } + + refreshNationStaticInfo(); CityHelper::flushCache(); $remainGenerals = $this->buildGenerals($env);