1
This commit is contained in:
parent
4d27c3a614
commit
81792ef087
@ -435,6 +435,11 @@ class BattleController extends BaseAuthedController {
|
|||||||
|
|
||||||
public function getNormalBattleData()
|
public function getNormalBattleData()
|
||||||
{
|
{
|
||||||
|
$version = getReqVal('version', 0);
|
||||||
|
$ignoreAndroid = false;
|
||||||
|
if ($version < 1) {
|
||||||
|
$ignoreAndroid = true;
|
||||||
|
}
|
||||||
$sign = '';
|
$sign = '';
|
||||||
$customData = array();
|
$customData = array();
|
||||||
{
|
{
|
||||||
@ -474,11 +479,26 @@ class BattleController extends BaseAuthedController {
|
|||||||
|
|
||||||
$currSeason = mt\RankSeason::getCurrentSeason();
|
$currSeason = mt\RankSeason::getCurrentSeason();
|
||||||
foreach ($customData['team_list'] as $team) {
|
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(
|
$teamInfo = array(
|
||||||
'team_uuid' => $team['team_uuid'],
|
'team_uuid' => $team['team_uuid'],
|
||||||
'members' => array()
|
'members' => array()
|
||||||
);
|
);
|
||||||
foreach ($team['members'] as $member) {
|
foreach ($team['members'] as $member) {
|
||||||
|
if ($ignoreAndroid && $member['is_android']) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$accountId = $member['account_id'];
|
$accountId = $member['account_id'];
|
||||||
$switchOk = $this->switchOnlineAccount($accountId);
|
$switchOk = $this->switchOnlineAccount($accountId);
|
||||||
if (!$switchOk) {
|
if (!$switchOk) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user