This commit is contained in:
aozhiwei 2024-10-09 13:19:28 +08:00
parent 9fd04c4207
commit 52b8da81a9
2 changed files with 17 additions and 2 deletions

View File

@ -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', '');

View File

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