diff --git a/webapp/controller/SeasonController.class.php b/webapp/controller/SeasonController.class.php index 605c7929..4a71754e 100644 --- a/webapp/controller/SeasonController.class.php +++ b/webapp/controller/SeasonController.class.php @@ -47,6 +47,15 @@ class SeasonController extends BaseAuthedController { // $this->awardService = new services\AwardService(); $this->userInfo = $this->_safeGetOrmUserInfo(); $this->redisService = $this->_getRedis($this->redis_key_ranking); + $this->myRankedInfo = array( + 'ranking' => 10001, + 'name' => $this->userInfo['name'], + 'head_id' => $this->userInfo['head_id'], + 'head_frame' => $this->userInfo['head_frame'], + 'rank' => $this->userInfo['rank'], + 'score' => $this->userInfo['score'], + 'point' => 0, + ); if ($this->redisService->exists(RANKING_KEY.$this->redis_key_account)){ $myInfo = $this->userInfo; if ($this->redisService->hexists(RANKING_KEY.$this->redis_key_account,$myInfo['account_id'])){ diff --git a/webapp/services/TameBattleDataService.php b/webapp/services/TameBattleDataService.php index 387dae8c..6efaf18a 100644 --- a/webapp/services/TameBattleDataService.php +++ b/webapp/services/TameBattleDataService.php @@ -452,6 +452,7 @@ class TameBattleDataService extends BaseService { if ($winningPro){ $newScore = FormulaService::calcBattleAfterRankScore($this->userInfo,$this->battleInfo,$winningPro); //赛后排位积分 + error_log("addBattleSettlementSingle : ".$newScore); //黄金以下段位,失败时不扣积分 if ($newScore < $this->userInfo['score'] && $this->userInfo['score']< 1300){ $newScore = $this->userInfo['score']; @@ -552,9 +553,10 @@ class TameBattleDataService extends BaseService { $winningPro = $this->celWinningPro($userDb); if ($winningPro){ $newScore = FormulaService::calcBattleAfterRankScore($userDb,$info,$winningPro); //赛后排位积分 + error_log("addBattleSettlementTeam : ".$newScore); //黄金以下段位,失败时不扣积分 - if ($newScore < $this->userInfo['score'] && $this->userInfo['score']< 1300){ - $newScore = $this->userInfo['score']; + if ($newScore < $userDb['score'] && $userDb['score']< 1300){ + $newScore = $userDb['score']; } mt\Rank::calcNewRankAndScore( $newRank, $newScore); } @@ -842,6 +844,7 @@ class TameBattleDataService extends BaseService { $winningPro = $this->celWinningPro($this->userInfo); if ($winningPro){ $newScore = FormulaService::calcBattleAfterRankScore($this->userInfo,$this->battleInfo,$winningPro); //赛后排位积分 + error_log("updateScore : ".$newScore); //黄金以下段位,失败时不扣积分 if ($newScore < $this->userInfo['score'] && $this->userInfo['score']< 1300){ $newScore = $this->userInfo['score'];