From beea13ff4b443d30bc66d5dd33c549407dcbc58f Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 9 May 2018 01:44:22 +0900 Subject: [PATCH] =?UTF-8?q?checkSupply()=EC=97=90=EC=84=9C=20=EA=B5=AD?= =?UTF-8?q?=EA=B0=80=20select=20=EC=BF=BC=EB=A6=AC=20=EC=A7=81=EC=A0=91?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_gamerule.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php index e3006343..51baa14e 100644 --- a/hwe/func_gamerule.php +++ b/hwe/func_gamerule.php @@ -257,12 +257,15 @@ function checkSupply() { } $queue = new \SplQueue(); - foreach(getAllNationStaticInfo() as $nation){ + foreach($db->query('SELECT capital, nation FROM nation WHERE `level` > 0') as $nation){ $capitalID = $nation['capital']; if(!$capitalID){ continue; } $city = &$cities[$capitalID]; + if($nation['nation'] != $city['nation']){ + continue; + } $city['supply'] = true; $queue->enqueue($city['id']); }