유니크 획득시 골고루 획득하도록 변경

This commit is contained in:
Hide_D committed 2019-05-01 02:42:23 +09:00
1 parent d0fae44430
commit 681918cb63
1 file changed
+7 -1
+7 -1
View File
@@ -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;