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