From 52b8da81a9f56163fa8cfcee20ab264a5ab276f4 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 9 Oct 2024 13:19:28 +0800 Subject: [PATCH] 1 --- webapp/controller/ToolsController.class.php | 9 +++++++++ webapp/services/BattleBoxService.php | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/webapp/controller/ToolsController.class.php b/webapp/controller/ToolsController.class.php index d551e0dc..46b9afe1 100644 --- a/webapp/controller/ToolsController.class.php +++ b/webapp/controller/ToolsController.class.php @@ -491,6 +491,15 @@ class ToolsController extends BaseController { echo $checkSql2; } + public function battleBoxAlloc() + { + $phase = getReqVal('phase', ''); + $day = 0; + BattleBoxService::internalClear($phase, $day); + BattleBoxService::allocBox(myself()->_getNowTime()); + BattleBoxService::dump($phase, $day); + } + public function battleBoxDump() { $phase = getReqVal('phase', ''); diff --git a/webapp/services/BattleBoxService.php b/webapp/services/BattleBoxService.php index 31498a8e..3a445a33 100644 --- a/webapp/services/BattleBoxService.php +++ b/webapp/services/BattleBoxService.php @@ -83,7 +83,7 @@ class BattleBoxService { //没掉完 $completionDegree = $yesterDayDropTotal / $yesterDayAllocNum; } - $allocableNum = min(5000, $maxNum * $completionDegree); + $allocableNum = min($maxNumLimit, $maxNum * $completionDegree); } if ($allocableNum) { self::setDailyPhaseAllocNum($currPhase, myself()->_getNowDaySeconds(), $allocableNum); @@ -128,7 +128,7 @@ class BattleBoxService { myself()->_rspData($data); } - public static function clear($phase, $day) + public static function internalClear($phase, $day) { $daySeconds = myself()->_getNowDaySeconds() + $day * 3600 * 24; self::getDailyPhaseDropLastTime($phase, $daySeconds, 0); @@ -138,6 +138,12 @@ class BattleBoxService { self::dump($phase, $day); } + public static function clear($phase, $day) + { + self::internalClear($phase, $day); + self::dump($phase, $day); + } + public static function set($phase, $day) { $daySeconds = myself()->_getNowDaySeconds() + $day * 3600 * 24;