From b6f62d22b4579338e75472f23c2f5341c847402e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 8 Oct 2024 15:12:07 +0800 Subject: [PATCH] 1 --- webapp/services/BattleBoxService.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/webapp/services/BattleBoxService.php b/webapp/services/BattleBoxService.php index db16d810..b7b25383 100644 --- a/webapp/services/BattleBoxService.php +++ b/webapp/services/BattleBoxService.php @@ -20,19 +20,13 @@ class BattleBoxService { $currPhase = self::getCurrentPhase(); $allocableNum = self::getDailyPhaseAllocNum($currPhase, myself()->_getNowDaySeconds()); $alreadyAllocNum = self::getDailyPhaseAlreadyAllocNum($currPhase, myself()->_getNowDaySeconds()); - if ($allocNum > 0) { + if ($allocableNum > 0) { $lstVal = mt\Parameter::getListValue('battle_event_loot_per_game'); if ($allocableNum <= 0 || empty($lstVal) || count($lstVal) < 2) { - myself()->_rspData(array( - 'box_num' => 0 - )); return; } $rnd = rand($lstVal[0], $lstVal[1]); if ($rnd <= 0) { - myself()->_rspData(array( - 'box_num' => 0 - )); return; } $boxNum = min($rnd, $allocableNum);