盲盒转盘优化-调试

This commit is contained in:
2025-10-24 15:44:40 +08:00
parent de5ae479c9
commit 3b22f8d134

View File

@@ -338,6 +338,10 @@ class BlindBoxTurntableGiftDrawWorld extends Model
if(!empty($remaining_available_gifts)){
$randomKey = array_rand($remaining_available_gifts);
$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) {
$gift = $giftInfoMap[$selectedGift['foreign_id']];
$precomputedResults[] = [