From bd3d15fd6abb2e67bc083f6e5a663f44cbc04c03 Mon Sep 17 00:00:00 2001 From: hujiabin Date: Mon, 21 Nov 2022 16:17:14 +0800 Subject: [PATCH] 1 --- webapp/controller/BattleController.class.php | 2 ++ webapp/services/BattleDataService.php | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index c7375f83..9e727c6f 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -98,6 +98,8 @@ class BattleController extends BaseAuthedController { 'new_score' => $newScore, ); $data['score_info'] = $scoreInfo; + error_log('JAMES Test Log 6-----------------------------------ScoreInfo'); + error_log(json_encode($scoreInfo)); } $this->_rspData($data); } diff --git a/webapp/services/BattleDataService.php b/webapp/services/BattleDataService.php index 5429ea6e..d3a0dddf 100644 --- a/webapp/services/BattleDataService.php +++ b/webapp/services/BattleDataService.php @@ -196,11 +196,15 @@ class BattleDataService extends BaseService { $newRank = $user['rank']; $newScore = $user['score']; $match_mode = getReqVal('match_mode', 0); + error_log('JAMES Test Log1'); if (mt\RankSeason::getCurrentSeason() && !$match_mode && myself()->_getV(TN_RANK_STATUS, 0 ) == 0 ){ + error_log('JAMES Test Log2'); $winningPro = $this->celWinningPro(); + error_log('JAMES Test Log3-----------------------------------'.$winningPro); if ($winningPro){ $newScore = FormulaService::calcBattleAfterRankScore($user,$_REQUEST,$winningPro); //赛后排位积分 mt\Rank::calcNewRankAndScore( $newRank, $newScore); + error_log('JAMES Test Log4---------------'.$newScore); } $match_mode = 1; } @@ -226,7 +230,7 @@ class BattleDataService extends BaseService { "pve_instance_id" => getReqVal('pve_instance_id', 0), "pve_instance_mode" => getReqVal('pve_instance_mode', 0), ); - error_log('战报-----------------------------------History'); + error_log('JAMES Test Log 5-----------------------------------History'); error_log(json_encode($data)); BattleHistory::add($data); } @@ -475,8 +479,6 @@ class BattleDataService extends BaseService { $newScore = FormulaService::calcBattleAfterRankScore($userInfo,$_REQUEST,$winningPro); //赛后排位积分 $newElo = FormulaService::calcUserEloValue($userInfo,$_REQUEST,$winningPro); //赛后elo积分 mt\Rank::calcNewRankAndScore( $newRank, $newScore); -error_log('NewScore---------------'.$newScore); -error_log('NewELO---------------'.$newElo ); if ( $newScore != $userInfo['score'] ) { myself()->_updateUserInfo(array( 'rank' => $newRank,