1
This commit is contained in:
parent
a24f19601c
commit
48ca58070c
@ -79,13 +79,15 @@ class Phase3Box extends BaseModel {
|
||||
{
|
||||
$space = 0;
|
||||
for ($i = 0; $i < count($randArr); ++$i) {
|
||||
$randArr[$i] += $space;
|
||||
$space += $randArr[$i];
|
||||
$randArr[$i] = $space;
|
||||
}
|
||||
}
|
||||
if ($row && $row['state'] == self::INIT_STATE) {
|
||||
$rnd = rand(0, 99);
|
||||
$rewardIdx = -1;
|
||||
error_log(json_encode($randArr));
|
||||
error_log('rand:' . $rnd);
|
||||
for ($i = 0; $i < count($randArr); ++$i) {
|
||||
if ($rnd <= $randArr[$i]) {
|
||||
$rewardIdx = $i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user