CityHelper에서 getAllNationCities가 올바르게 동작하지 않던 버그 해결
This commit is contained in:
@@ -29,13 +29,14 @@ class CityHelper{
|
|||||||
foreach (DB::db()->query('SELECT `city` as `id`, `name`, `level`, `nation` from city') as $city) {
|
foreach (DB::db()->query('SELECT `city` as `id`, `name`, `level`, `nation` from city') as $city) {
|
||||||
$id = $city['id'];
|
$id = $city['id'];
|
||||||
$name = $city['name'];
|
$name = $city['name'];
|
||||||
|
$nationID = $city['nation'];
|
||||||
$list[$id] = $city;
|
$list[$id] = $city;
|
||||||
$listInv[$city['name']] = $city;
|
$listInv[$city['name']] = $city;
|
||||||
|
|
||||||
if(!key_exists($id, $listByNation)){
|
if(!key_exists($nationID, $listByNation)){
|
||||||
$listByNation[$id] = [];
|
$listByNation[$nationID] = [];
|
||||||
}
|
}
|
||||||
$listByNation[$id][] = $city;
|
$listByNation[$nationID][] = $city;
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$list = $list;
|
self::$list = $list;
|
||||||
|
|||||||
@@ -312,6 +312,8 @@ class Scenario{
|
|||||||
|
|
||||||
$nation->build($env);
|
$nation->build($env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refreshNationStaticInfo();
|
||||||
CityHelper::flushCache();
|
CityHelper::flushCache();
|
||||||
|
|
||||||
$remainGenerals = $this->buildGenerals($env);
|
$remainGenerals = $this->buildGenerals($env);
|
||||||
|
|||||||
Reference in New Issue
Block a user