유니크 획득시 골고루 획득하도록 변경
This commit is contained in:
+7
-1
@@ -2250,7 +2250,13 @@ function uniqueItem($general, $log, $vote=0) {
|
|||||||
//아이템 습득 상황
|
//아이템 습득 상황
|
||||||
if(rand() % $prob == 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) {
|
switch($sel) {
|
||||||
case 0: $type = "weap"; break;
|
case 0: $type = "weap"; break;
|
||||||
case 1: $type = "book"; break;
|
case 1: $type = "book"; break;
|
||||||
|
|||||||
Reference in New Issue
Block a user