From 98c386622a02437c1c83534494078f21f46f307e Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 29 May 2018 01:50:50 +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/sammo/Scenario/Nation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hwe/sammo/Scenario/Nation.php b/hwe/sammo/Scenario/Nation.php index 5c8c3b6e..cbcc0f5a 100644 --- a/hwe/sammo/Scenario/Nation.php +++ b/hwe/sammo/Scenario/Nation.php @@ -139,9 +139,9 @@ class Nation{ ], 'nation=%i', $this->id); //군주가 없는지 확인 - $hasRuler = $db->queryFirstField('SELECT count(*) FROM general WHERE nation=%i AND level=12'); + $hasRuler = $db->queryFirstField('SELECT count(*) FROM general WHERE nation=%i AND level=12', $this->id); if(!$hasRuler){ - $newRuler = $db->queryFirstField('SELECT `no` FROM general WHERE nation=1 ORDER BY leader+power+intel DESC LIMIT 1'); + $newRuler = $db->queryFirstField('SELECT `no` FROM general WHERE nation=%i ORDER BY leader+power+intel DESC LIMIT 1', $this->id); $db->update('general',['level'=>12], 'no=%i', $newRuler); } }