From 4e988db50f40a9e487f8999d9c1c1e7ea07761fb Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 6 Oct 2019 16:14:41 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/a_kingdomList.php | 8 ++++++-- hwe/sammo/General.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hwe/a_kingdomList.php b/hwe/a_kingdomList.php index 824a7e80..fcf9a9d6 100644 --- a/hwe/a_kingdomList.php +++ b/hwe/a_kingdomList.php @@ -44,8 +44,11 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); } $nations = getAllNationStaticInfo(); uasort($nations, function($lhs, $rhs){return $rhs['power']<=>$lhs['power'];}); +$nations[0] = getNationStaticInfo(0); + foreach($db->query('SELECT npc,name,city,nation,level,penalty,permission FROM general ORDER BY dedication DESC') as $general){ $nationID = $general['nation']; + if(!key_exists('generals', $nations[$nationID])){ $nations[$nationID]['generals'] = []; } @@ -61,6 +64,7 @@ foreach ($db->queryAllLists('SELECT city, name, nation FROM city') as [$cityID, foreach ($nations as $nation) { if ($nation['nation'] == 0) { + //재야 도시, 장수 continue; } $generals = $nation['generals']; @@ -159,11 +163,11 @@ echo " 장 수 ".count($nations[0]['generals'])." 속 령 - ".count($nations[0]['cities'])." + ".count($nations[0]['cities']??[])." 속령 일람 : "; -foreach($nations[0]['cities'] as $cityName) { +foreach($nations[0]['cities']??[] as $cityName) { echo "{$cityName}, "; } echo" diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php index af06178e..33211b9d 100644 --- a/hwe/sammo/General.php +++ b/hwe/sammo/General.php @@ -645,7 +645,7 @@ class General implements iAction{ 'personal', 'special', 'special2', 'defence_train', 'tnmt', 'npc', 'npc_org', 'deadyear', 'npcmsg', 'dex0', 'dex10', 'dex20', 'dex30', 'dex40', 'warnum', 'firenum', 'killnum', 'deathnum', 'killcrew', 'deathcrew', 'recwar', 'last_turn', 'myset', - 'specage', 'specage2', 'con', 'connect' + 'specage', 'specage2', 'con', 'connect', 'owner' ]; if($column === null){