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;