盲盒转盘优化-调试
This commit is contained in:
@@ -338,6 +338,10 @@ class BlindBoxTurntableGiftDrawWorld extends Model
|
|||||||
if(!empty($remaining_available_gifts)){
|
if(!empty($remaining_available_gifts)){
|
||||||
$randomKey = array_rand($remaining_available_gifts);
|
$randomKey = array_rand($remaining_available_gifts);
|
||||||
$selectedGift = $remaining_available_gifts[$randomKey];
|
$selectedGift = $remaining_available_gifts[$randomKey];
|
||||||
|
--$remaining_available_gifts[$randomKey]['remaining_number'];
|
||||||
|
if($remaining_available_gifts[$randomKey]['remaining_number'] <=0){
|
||||||
|
unset($remaining_available_gifts[$randomKey]);
|
||||||
|
}
|
||||||
if ($selectedGift) {
|
if ($selectedGift) {
|
||||||
$gift = $giftInfoMap[$selectedGift['foreign_id']];
|
$gift = $giftInfoMap[$selectedGift['foreign_id']];
|
||||||
$precomputedResults[] = [
|
$precomputedResults[] = [
|
||||||
|
|||||||
Reference in New Issue
Block a user