From 22e24628b4fda033fae09910628e293667e41b04 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 8 Oct 2024 15:19:03 +0800 Subject: [PATCH] 1 --- webapp/services/BattleBoxService.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webapp/services/BattleBoxService.php b/webapp/services/BattleBoxService.php index de88a3e9..8bc3e2b2 100644 --- a/webapp/services/BattleBoxService.php +++ b/webapp/services/BattleBoxService.php @@ -24,10 +24,9 @@ class BattleBoxService { $lstVal = mt\Parameter::getListValue('battle_event_loot_per_game'); if (!$allocableNum <= 0 || empty($lstVal) || count($lstVal) < 2) { $rnd = rand($lstVal[0], $lstVal[1]); - if ($rnd <= 0) { - return; + if ($rnd > 0) { + $boxNum = min($rnd, $allocableNum); } - $boxNum = min($rnd, $allocableNum); } } return $boxNum;