This commit is contained in:
hujiabin 2022-10-26 12:03:03 +08:00
parent 1dce70e0bf
commit f4e1ab53a9

View File

@ -191,14 +191,16 @@ class BattleDataService extends BaseService {
$user = myself()->_getOrmUserInfo();
$newRank = $user['rank'];
$newScore = $user['score'];
if (mt\RankSeason::getCurrentSeason()){
$match_mode = getReqVal('match_mode', 0);
if (mt\RankSeason::getCurrentSeason() && !$match_mode){
$newScore = FormulaService::calcBattleAfterRankScore($user,$_REQUEST); //赛后排位积分
mt\Rank::calcNewRankAndScore( $newRank, $newScore);
$match_mode = 1;
}
$data = array(
"battle_uniid" => getReqVal('battle_uuid', 0),
"account_id" => myself()->_getAccountId(),
"match_mode" => getReqVal('match_mode', 0),
"match_mode" => $match_mode,
"team_mode" => getReqVal('team_mode', 0),
"battle_rank" => getReqVal('ranked', 0),
// "team_rank" => 0, // 队伍排名