1
This commit is contained in:
parent
96117b773a
commit
de378a8286
@ -1123,8 +1123,11 @@ class BattleController extends BaseAuthedController {
|
|||||||
|
|
||||||
private function checkTicket($r, $customData, $mapModeMeta)
|
private function checkTicket($r, $customData, $mapModeMeta)
|
||||||
{
|
{
|
||||||
if ($mapModeMeta['mapMode'] == 501) {
|
if (!mt\MapMode::checkLimitTime($mapModeMeta)) {
|
||||||
error_log("checkTick error :501");
|
error_log(json_encode(array(
|
||||||
|
'msg' => 'MapMode::CheckLimitTime error',
|
||||||
|
'meta' => $mapModeMeta
|
||||||
|
)));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$itemId = $mapModeMeta['admission_item_id'];
|
$itemId = $mapModeMeta['admission_item_id'];
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
namespace mt;
|
namespace mt;
|
||||||
|
|
||||||
|
require_once('mt/ServerTaskTime.php');
|
||||||
|
require_once('mt/RankSeason.php');
|
||||||
|
|
||||||
class MapMode
|
class MapMode
|
||||||
{
|
{
|
||||||
@ -34,6 +35,38 @@ class MapMode
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function checkLimitTime($meta)
|
||||||
|
{
|
||||||
|
switch (!$meta['limit_time']) {
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
if ($meta['mapMode'] == self::RANKING_MODE) {
|
||||||
|
$currentSeasonMeta = RankSeason::getCurrentSeason();
|
||||||
|
if (empty($currentSeasonMeta)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
if ($meta['mapMode'] == self::TREASURE_BOX_MODE) {
|
||||||
|
$currentServerTask = ServerTaskTime::getCurrentTime();
|
||||||
|
if (empty($currentServerTask)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
protected static function getMetaList()
|
protected static function getMetaList()
|
||||||
{
|
{
|
||||||
if (!self::$metaList) {
|
if (!self::$metaList) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user