From 3b7912e2d5d3ef3dbc4c48d282d07c24ea3338b7 Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 26 Jun 2018 03:52:17 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B4=88=EB=B0=98=203=EB=85=84=20=EC=88=98?= =?UTF-8?q?=EB=87=8C=20=EC=9E=84=EB=AA=85=20=EB=B0=A9=EC=8B=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_npc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hwe/func_npc.php b/hwe/func_npc.php index 2e6c169d..1db6816e 100644 --- a/hwe/func_npc.php +++ b/hwe/func_npc.php @@ -1305,8 +1305,11 @@ function Promotion($nation, $level) { $query = "update general set level=1 where level<11 and level>4 and nation='$nation'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); + $maxBelong = $db->queryFirstField('SELECT max(belong) FROM `general` WHERE nation=%i', $nation); + $maxBelong = min($maxBelong - 1, 3); + //유저 후보 선택 - $query = "select no from general where nation='$nation' and npc<2 and level=1 and belong>=3 and killturn>='{$admin['killturn']}' order by rand() limit 0,1"; + $query = "select no from general where nation='$nation' and npc<2 and level=1 and belong>=$maxBelong and killturn>='{$admin['killturn']}' order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); $userCandidate = MYDB_fetch_array($result); // 유저수뇌 안함