This commit is contained in:
hujiabin 2022-11-21 16:17:14 +08:00
parent c6b1f93a10
commit bd3d15fd6a
2 changed files with 7 additions and 3 deletions

View File

@ -98,6 +98,8 @@ class BattleController extends BaseAuthedController {
'new_score' => $newScore, 'new_score' => $newScore,
); );
$data['score_info'] = $scoreInfo; $data['score_info'] = $scoreInfo;
error_log('JAMES Test Log 6-----------------------------------ScoreInfo');
error_log(json_encode($scoreInfo));
} }
$this->_rspData($data); $this->_rspData($data);
} }

View File

@ -196,11 +196,15 @@ class BattleDataService extends BaseService {
$newRank = $user['rank']; $newRank = $user['rank'];
$newScore = $user['score']; $newScore = $user['score'];
$match_mode = getReqVal('match_mode', 0); $match_mode = getReqVal('match_mode', 0);
error_log('JAMES Test Log1');
if (mt\RankSeason::getCurrentSeason() && !$match_mode && myself()->_getV(TN_RANK_STATUS, 0 ) == 0 ){ if (mt\RankSeason::getCurrentSeason() && !$match_mode && myself()->_getV(TN_RANK_STATUS, 0 ) == 0 ){
error_log('JAMES Test Log2');
$winningPro = $this->celWinningPro(); $winningPro = $this->celWinningPro();
error_log('JAMES Test Log3-----------------------------------'.$winningPro);
if ($winningPro){ if ($winningPro){
$newScore = FormulaService::calcBattleAfterRankScore($user,$_REQUEST,$winningPro); //赛后排位积分 $newScore = FormulaService::calcBattleAfterRankScore($user,$_REQUEST,$winningPro); //赛后排位积分
mt\Rank::calcNewRankAndScore( $newRank, $newScore); mt\Rank::calcNewRankAndScore( $newRank, $newScore);
error_log('JAMES Test Log4---------------'.$newScore);
} }
$match_mode = 1; $match_mode = 1;
} }
@ -226,7 +230,7 @@ class BattleDataService extends BaseService {
"pve_instance_id" => getReqVal('pve_instance_id', 0), "pve_instance_id" => getReqVal('pve_instance_id', 0),
"pve_instance_mode" => getReqVal('pve_instance_mode', 0), "pve_instance_mode" => getReqVal('pve_instance_mode', 0),
); );
error_log('战报-----------------------------------History'); error_log('JAMES Test Log 5-----------------------------------History');
error_log(json_encode($data)); error_log(json_encode($data));
BattleHistory::add($data); BattleHistory::add($data);
} }
@ -475,8 +479,6 @@ class BattleDataService extends BaseService {
$newScore = FormulaService::calcBattleAfterRankScore($userInfo,$_REQUEST,$winningPro); //赛后排位积分 $newScore = FormulaService::calcBattleAfterRankScore($userInfo,$_REQUEST,$winningPro); //赛后排位积分
$newElo = FormulaService::calcUserEloValue($userInfo,$_REQUEST,$winningPro); //赛后elo积分 $newElo = FormulaService::calcUserEloValue($userInfo,$_REQUEST,$winningPro); //赛后elo积分
mt\Rank::calcNewRankAndScore( $newRank, $newScore); mt\Rank::calcNewRankAndScore( $newRank, $newScore);
error_log('NewScore---------------'.$newScore);
error_log('NewELO---------------'.$newElo );
if ( $newScore != $userInfo['score'] ) { if ( $newScore != $userInfo['score'] ) {
myself()->_updateUserInfo(array( myself()->_updateUserInfo(array(
'rank' => $newRank, 'rank' => $newRank,