1
This commit is contained in:
parent
da08012e00
commit
5a5cfa57ee
@ -252,9 +252,36 @@ class BattleController extends BaseAuthedController {
|
||||
}
|
||||
}
|
||||
$this->switchAccount(getReqVal('account_id', 0));
|
||||
$this->updateRecentBattle($input['team_list']);
|
||||
$this->_rspOk();
|
||||
}
|
||||
|
||||
private function updateRecentBattle($teamList)
|
||||
{
|
||||
$realPlayerHash = array();
|
||||
$realPlayerHashCopy = array();
|
||||
foreach ($teamList as $team) {
|
||||
foreach ($team as $member) {
|
||||
if (!myself()->_isAndroidAccountId($member['account_id'])) {
|
||||
$realPlayerHash[$member['account_id']] = 1;
|
||||
$realPlayerHashCopy[$member['account_id']] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($realPlayerHash as $accountId) {
|
||||
foreach ($realPlayerHashCopy as $accountIdCopy) {
|
||||
if ($accountId != $accountIdCopy) {
|
||||
$accountId1 = $accountId;
|
||||
$accountId2 = $accountIdCopy;
|
||||
if ($accountId > $accountIdCopy) {
|
||||
$accountId1 = $accountIdCopy;
|
||||
$accountId2 = $accountId;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
http post
|
||||
php://input
|
||||
|
Loading…
x
Reference in New Issue
Block a user