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