diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index 0aed5a7a..50ed53d1 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -827,10 +827,16 @@ class BattleController extends BaseAuthedController { myself()->_rspErr(2, 'map mode error'); return; } - if ($mapModeMeta['mapMode'] == \mt\MapMode::CIRCUIT_MODE && - !myself()->_switchIsOpen('circuitMatch')){ - myself()->_rspErr(2, 'map mode error'); - return; + if ($mapModeMeta['mapMode'] == \mt\MapMode::CIRCUIT_MODE){ + if (!myself()->_switchIsOpen('circuitMatch')) { + myself()->_rspErr(2, 'map mode error'); + return; + } + if (count(CIRCUIT_MATCH_SERVER_LIST) > 0 && + !in_array($zoneId, CIRCUIT_MATCH_SERVER_LIST)) { + myself()->_rspErr(2, 'map mode error'); + return; + } } $mapMeta = mt\Map::get($mapId); if (empty($mapMeta)) { diff --git a/webapp/controller/OtherController.class.php b/webapp/controller/OtherController.class.php index 39fc3e36..655ebd98 100644 --- a/webapp/controller/OtherController.class.php +++ b/webapp/controller/OtherController.class.php @@ -389,7 +389,7 @@ class OtherController extends BaseAuthedController { if ($isOpen) { if ($modeMeta['mapMode'] == \mt\MapMode::CIRCUIT_MODE){ if (myself()->_switchIsOpen('circuitMatch')) { - if (count(CIRCUIT_MATCH_SERVER_LIST) > 0 && + if (count(CIRCUIT_MATCH_SERVER_LIST) <= 0 && in_array(myself()->_getZid(), CIRCUIT_MATCH_SERVER_LIST)) { array_unshift($modeList,$temp); }