From 81792ef0875c8ad50370e80dd625917e21d892ea Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Mar 2024 11:50:09 +0800 Subject: [PATCH] 1 --- webapp/controller/BattleController.class.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index 04586400..5610021c 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -435,6 +435,11 @@ class BattleController extends BaseAuthedController { public function getNormalBattleData() { + $version = getReqVal('version', 0); + $ignoreAndroid = false; + if ($version < 1) { + $ignoreAndroid = true; + } $sign = ''; $customData = array(); { @@ -474,11 +479,26 @@ class BattleController extends BaseAuthedController { $currSeason = mt\RankSeason::getCurrentSeason(); foreach ($customData['team_list'] as $team) { + if ($ignoreAndroid) { + $isAllAndroid = true; + foreach ($team['members'] as $member) { + if ($member['is_android']) { + $isAllAndroid = false; + break; + } + } + if ($isAllAndroid) { + continue; + } + } $teamInfo = array( 'team_uuid' => $team['team_uuid'], 'members' => array() ); foreach ($team['members'] as $member) { + if ($ignoreAndroid && $member['is_android']) { + continue; + } $accountId = $member['account_id']; $switchOk = $this->switchOnlineAccount($accountId); if (!$switchOk) {