This commit is contained in:
hujiabin 2023-07-25 14:43:44 +08:00
parent 1f36522a38
commit ea87ce44af
2 changed files with 14 additions and 2 deletions

View File

@ -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'])){

View File

@ -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'];