1
This commit is contained in:
parent
f8008af8cc
commit
203eafe992
@ -151,23 +151,38 @@ class BigwheelController extends BaseAuthedController {
|
||||
return;
|
||||
}
|
||||
$item1 = null;
|
||||
error_log(json_encode(array(
|
||||
'item2arr' => $item2Arr
|
||||
)));
|
||||
{
|
||||
foreach ($item1Arr as $item) {
|
||||
if ($rnd1 <= $item['weight']) {
|
||||
$item1 = $item;
|
||||
foreach ($item1Arr as $itemTmp1) {
|
||||
if ($rnd1 <= $itemTmp1['weight']) {
|
||||
$item1 = $itemTmp1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$item2 = null;
|
||||
{
|
||||
foreach ($item2Arr as $item) {
|
||||
if ($rnd2 <= $item['weight']) {
|
||||
$item2 = $item;
|
||||
error_log(json_encode(array(
|
||||
'item2arr' => $item2Arr
|
||||
)));
|
||||
foreach ($item2Arr as $itemTmp2) {
|
||||
error_log(json_encode(array(
|
||||
'rnd2' => $rnd2,
|
||||
'item' => $itemTmp2,
|
||||
//'item2_weight' => $item['weight'],
|
||||
)));
|
||||
if ($rnd2 <= $itemTmp2['weight']) {
|
||||
$item2 = $itemTmp2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
error_log(json_encode(array(
|
||||
'item1' => $item1,
|
||||
'item2' => $item2,
|
||||
)));
|
||||
if (empty($item1) || empty($item2)) {
|
||||
myself()->_rspErr(1, 'server internal error');
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user