1
This commit is contained in:
parent
9ae1f23342
commit
d6829971a4
@ -187,19 +187,33 @@ class OtherController extends BaseAuthedController {
|
|||||||
$modeList = array();
|
$modeList = array();
|
||||||
$taskStatus = GlobalData::getServerTaskStatus();
|
$taskStatus = GlobalData::getServerTaskStatus();
|
||||||
$taskMeta = mt\ServerTaskTime::getCurrentTime();
|
$taskMeta = mt\ServerTaskTime::getCurrentTime();
|
||||||
mt\MapMode::traverseMeta(function($modeMeta) use(&$modeList, &$taskMeta, $taskStatus){
|
$rankSeasonMeta = mt\RankSeason::getCurrentSeason();
|
||||||
|
mt\MapMode::traverseMeta(function($modeMeta) use(&$modeList, &$taskMeta, $taskStatus,$rankSeasonMeta){
|
||||||
if ($modeMeta['is_open']) {
|
if ($modeMeta['is_open']) {
|
||||||
if ($modeMeta['limit_time']) {
|
// if ($modeMeta['limit_time']) {
|
||||||
if (empty($taskStatus)) {
|
// if (empty($taskStatus)) {
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
if (!$taskMeta) {
|
// if (!$taskMeta) {
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
if (myself()->_getNowTime() <= strtotime($taskMeta['income_start_time'])) {
|
// if (myself()->_getNowTime() <= strtotime($taskMeta['income_start_time'])) {
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
switch ($modeMeta['limit_time']){
|
||||||
|
case 1 : {
|
||||||
|
if (!$rankSeasonMeta){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case 2 : {
|
||||||
|
if (empty($taskStatus) || !$taskMeta || myself()->_getNowTime() <= strtotime($taskMeta['income_start_time'])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
array_push(
|
array_push(
|
||||||
$modeList,
|
$modeList,
|
||||||
array(
|
array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user