1
This commit is contained in:
parent
249c62cd72
commit
9487c41783
@ -1310,7 +1310,7 @@ class BattleController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function requestAllocBoxNumNew() {
|
public function requestAllocBoxNumNew() {
|
||||||
$boxNum = services\BattleBoxService::allocBox();
|
$boxNum = services\BattleBoxService::allocBox('');
|
||||||
myself()->_rspData(array(
|
myself()->_rspData(array(
|
||||||
'box_num' => $boxNum
|
'box_num' => $boxNum
|
||||||
));
|
));
|
||||||
|
@ -129,14 +129,14 @@ class MapMode
|
|||||||
use (&$mapModeMeta, &$phase, &$startTime, &$endTime) {
|
use (&$mapModeMeta, &$phase, &$startTime, &$endTime) {
|
||||||
if ($meta['mapMode'] == self::TREASURE_BOX_MODE) {
|
if ($meta['mapMode'] == self::TREASURE_BOX_MODE) {
|
||||||
if (self::configedDailyTimeLimit1($meta)) {
|
if (self::configedDailyTimeLimit1($meta)) {
|
||||||
$mapNodeMeta = $meta;
|
$mapModeMeta = $meta;
|
||||||
$phase = 1;
|
$phase = 1;
|
||||||
$startTime = $meta['daily_open_time'];
|
$startTime = $meta['daily_open_time'];
|
||||||
$endTime = $meta['daily_end_time'];
|
$endTime = $meta['daily_end_time'];
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (self::configedDailyTimeLimit2($meta)) {
|
if (self::configedDailyTimeLimit2($meta)) {
|
||||||
$mapNodeMeta = $meta;
|
$mapModeMeta = $meta;
|
||||||
$phase = 2;
|
$phase = 2;
|
||||||
$startTime = $meta['daily_open_time_2'];
|
$startTime = $meta['daily_open_time_2'];
|
||||||
$endTime = $meta['daily_end_time_2'];
|
$endTime = $meta['daily_end_time_2'];
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
namespace services;
|
namespace services;
|
||||||
|
|
||||||
require_once('mt/Parameter.php');
|
require_once('mt/Parameter.php');
|
||||||
|
require_once('mt/MapMode.php');
|
||||||
|
|
||||||
|
use mt;
|
||||||
/*
|
/*
|
||||||
1、周期还害没结束,箱子就掉完了
|
1、周期还害没结束,箱子就掉完了
|
||||||
完成度=T max/T cost time(last time-start time)
|
完成度=T max/T cost time(last time-start time)
|
||||||
@ -27,13 +29,22 @@ class BattleBoxService {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$boxNum = 0;
|
$boxNum = 0;
|
||||||
$currPhase = self::getCurrentPhase();
|
$currPhase = 0;
|
||||||
$startTime = 0;
|
$startTime = 0;
|
||||||
$endTime = 0;
|
$endTime = 0;
|
||||||
$minNum = 0;
|
$minNum = 0;
|
||||||
$maxNum = 0;
|
$maxNum = 0;
|
||||||
$maxNumLimit = 0;
|
$maxNumLimit = 0;
|
||||||
$completionDegree = 0;
|
$completionDegree = 0;
|
||||||
|
$mapModeMeta = null;
|
||||||
|
mt\MapMode::getCurrentBoxDropInfo($mapModeMeta, $currPhase, $startTime, $endTime);
|
||||||
|
error_log(json_encode(array(
|
||||||
|
'mapNodeMeta' => $mapModeMeta,
|
||||||
|
'currPhase' => $currPhase,
|
||||||
|
'startTime' => $startTime,
|
||||||
|
'endTime' => $endTime,
|
||||||
|
)));
|
||||||
|
return;
|
||||||
|
|
||||||
$allocableNum = self::getDailyPhaseAllocNum($currPhase, myself()->_getNowDaySeconds());
|
$allocableNum = self::getDailyPhaseAllocNum($currPhase, myself()->_getNowDaySeconds());
|
||||||
$alreadyAllocNum = self::getDailyPhaseAlreadyAllocNum($currPhase, myself()->_getNowDaySeconds());
|
$alreadyAllocNum = self::getDailyPhaseAlreadyAllocNum($currPhase, myself()->_getNowDaySeconds());
|
||||||
@ -89,11 +100,6 @@ class BattleBoxService {
|
|||||||
return $boxNum;
|
return $boxNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getCurrentPhase()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function getDailyPhaseDropLastTime($phase, $time)
|
private static function getDailyPhaseDropLastTime($phase, $time)
|
||||||
{
|
{
|
||||||
$key = self::DAILY_PHASE_DROP_LAST_TIME_KEY . $phase . ':' . $time;
|
$key = self::DAILY_PHASE_DROP_LAST_TIME_KEY . $phase . ':' . $time;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user