This commit is contained in:
aozhiwei 2024-09-20 17:15:53 +08:00
parent 6d7015324b
commit 11d9c368f1
2 changed files with 11 additions and 5 deletions

View File

@ -827,11 +827,17 @@ class BattleController extends BaseAuthedController {
myself()->_rspErr(2, 'map mode error'); myself()->_rspErr(2, 'map mode error');
return; return;
} }
if ($mapModeMeta['mapMode'] == \mt\MapMode::CIRCUIT_MODE && if ($mapModeMeta['mapMode'] == \mt\MapMode::CIRCUIT_MODE){
!myself()->_switchIsOpen('circuitMatch')){ if (!myself()->_switchIsOpen('circuitMatch')) {
myself()->_rspErr(2, 'map mode error'); myself()->_rspErr(2, 'map mode error');
return; 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); $mapMeta = mt\Map::get($mapId);
if (empty($mapMeta)) { if (empty($mapMeta)) {
myself()->_rspErr(2, 'map meta error'); myself()->_rspErr(2, 'map meta error');

View File

@ -389,7 +389,7 @@ class OtherController extends BaseAuthedController {
if ($isOpen) { if ($isOpen) {
if ($modeMeta['mapMode'] == \mt\MapMode::CIRCUIT_MODE){ if ($modeMeta['mapMode'] == \mt\MapMode::CIRCUIT_MODE){
if (myself()->_switchIsOpen('circuitMatch')) { 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)) { in_array(myself()->_getZid(), CIRCUIT_MATCH_SERVER_LIST)) {
array_unshift($modeList,$temp); array_unshift($modeList,$temp);
} }