1
This commit is contained in:
parent
1f36522a38
commit
ea87ce44af
@ -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'])){
|
||||
|
@ -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'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user