From 9d2ba39efced2e5bc5892c51528692f3351d3460 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 8 Oct 2024 17:13:47 +0800 Subject: [PATCH] 1 --- webapp/services/BattleBoxService.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/webapp/services/BattleBoxService.php b/webapp/services/BattleBoxService.php index 0bf7f42e..969503d1 100644 --- a/webapp/services/BattleBoxService.php +++ b/webapp/services/BattleBoxService.php @@ -4,6 +4,15 @@ namespace services; require_once('mt/Parameter.php'); +/* +1、周期没害没结束,箱子就掉完了 +完成度=T max/T cost time(last time-start time) +2、周期结束,箱子也还没掉完 +完成度=N real num/N max + +下-天的投放数量(下一天max) +下一天max=min(today max*today 完成度,qlobal max) + */ class BattleBoxService { const DAILY_PHASE_DROP_LAST_TIME_KEY = ':'; @@ -31,6 +40,8 @@ class BattleBoxService { $yesterDayAllocNum = self::getDailyPhaseAllocNum($currPhase, $yesterDayTime); if ($yesterDayAllocNum <= 0) { $allocableNum = $maxNum; + } else { + } if ($allocableNum) { self::setDailyPhaseAllocNum($currPhase, $allocableNum);