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);