From 0488ebf071ec7f08e3d6610172592e7e23a36332 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 28 Apr 2018 02:25:08 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=B4=EC=A7=80=EC=9E=A5=20=EC=9C=A0?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=20=ED=8F=AC=EC=83=81=20=EA=B8=B0=EC=A4=80=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_npc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hwe/func_npc.php b/hwe/func_npc.php index b9e35bc1..500bc5d9 100644 --- a/hwe/func_npc.php +++ b/hwe/func_npc.php @@ -636,10 +636,12 @@ function processAI($no) { ); list($userGenID, $userGenValue) = $db->queryFirstList( - 'SELECT `no`, %b FROM general WHERE nation=%i AND `no`!=%i AND npc < 2 AND killturn > 5 ORDER BY %b ASC LIMIT 1', + 'SELECT `no`, %b FROM general WHERE nation=%i AND `no`!=%i AND npc < 2 AND killturn > 5 AND (leader >= 40 OR %b < %i) ORDER BY %b ASC LIMIT 1', $type, $general['nation'], $general['no'], + $type, + $type==='gold'?21000:3000, $type );