From 681918cb63453c95b65f9038d9638a901f7cdc7c Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 1 May 2019 02:42:23 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9C=A0=EB=8B=88=ED=81=AC=20=ED=9A=8D?= =?UTF-8?q?=EB=93=9D=EC=8B=9C=20=EA=B3=A8=EA=B3=A0=EB=A3=A8=20=ED=9A=8D?= =?UTF-8?q?=EB=93=9D=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.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hwe/func.php b/hwe/func.php index f1e73e96..7971e074 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -2250,7 +2250,13 @@ function uniqueItem($general, $log, $vote=0) { //아이템 습득 상황 if(rand() % $prob == 0) { //셋중 선택 - $sel = rand() % 4; + $selGroup = [ + 20 - $db->queryFirstField('SELECT count(*) from general where weap > 7'), + 20 - $db->queryFirstField('SELECT count(*) from general where book > 7'), + 20 - $db->queryFirstField('SELECT count(*) from general where horse > 7'), + 20 - $db->queryFirstField('SELECT count(*) from general where item > 7') + ]; + $sel = Util::choiceRandomUsingWeight($selGroup); switch($sel) { case 0: $type = "weap"; break; case 1: $type = "book"; break;