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,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)) {

View File

@ -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);
}