bug修改
This commit is contained in:
@@ -1314,9 +1314,9 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model
|
||||
private function selectGiftFromAvailable(array &$available_gifts, $user_id = 0)
|
||||
{
|
||||
// 添加针对特定用户和礼物的概率调整逻辑
|
||||
$adjusted_gifts = $this->adjustGiftProbabilities($available_gifts, $user_id);
|
||||
// $adjusted_gifts = $this->adjustGiftProbabilities($available_gifts, $user_id);
|
||||
|
||||
$remaining = array_sum(array_column($adjusted_gifts, 'remaining_number'));
|
||||
$remaining = array_sum(array_column($available_gifts, 'remaining_number'));
|
||||
if ($remaining <= 0) {
|
||||
return null;
|
||||
}
|
||||
@@ -1328,7 +1328,7 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model
|
||||
$rand_value = mt_rand(1, $remaining);
|
||||
$current_sum = 0;
|
||||
|
||||
foreach ($adjusted_gifts as $gift) {
|
||||
foreach ($available_gifts as $gift) {
|
||||
if ($gift['remaining_number'] <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user