1
This commit is contained in:
parent
3b961f67fc
commit
61772a3067
@ -98,8 +98,6 @@ 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);
|
||||||
}
|
}
|
||||||
|
@ -196,15 +196,11 @@ 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;
|
||||||
}
|
}
|
||||||
@ -230,8 +226,6 @@ 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('JAMES Test Log 5-----------------------------------History');
|
|
||||||
error_log(json_encode($data));
|
|
||||||
BattleHistory::add($data);
|
BattleHistory::add($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,11 +341,9 @@ class FormulaService extends BaseService {
|
|||||||
ROUND(1-($survivalTopX*100/10-1)/9,2) * 0.15 +
|
ROUND(1-($survivalTopX*100/10-1)/9,2) * 0.15 +
|
||||||
ROUND(1-($heroTopX*100/10-1)/9,2) * 0.03 +
|
ROUND(1-($heroTopX*100/10-1)/9,2) * 0.03 +
|
||||||
ROUND(1-($weaponTopX*100/10-1)/9,2) * 0.02;
|
ROUND(1-($weaponTopX*100/10-1)/9,2) * 0.02;
|
||||||
error_log('JAMES Test Log 7-----------------------------------'.$expreScore);
|
|
||||||
//不同段位的及格分 = ROUND(1-(大段位排名-1)/(MAX(10)-1),2)
|
//不同段位的及格分 = ROUND(1-(大段位排名-1)/(MAX(10)-1),2)
|
||||||
$topRanking = mt\Rank::getRankById($userDb['rank'])?mt\Rank::getRankById($userDb['rank'])['rank_order']:0; //************** rankRank 参数表获取 ************
|
$topRanking = mt\Rank::getRankById($userDb['rank'])?mt\Rank::getRankById($userDb['rank'])['rank_order']:0; //************** rankRank 参数表获取 ************
|
||||||
$askedScore = round(1-($topRanking-1)/(10-1),2);
|
$askedScore = round(1-($topRanking-1)/(10-1),2);
|
||||||
error_log('JAMES Test Log 8-----------------------------------'.$askedScore);
|
|
||||||
//一个玩家的赛后积分 = 赛前积分+K*(胜负率-总胜率)+2K*(表现分-段位要求的及格分)
|
//一个玩家的赛后积分 = 赛前积分+K*(胜负率-总胜率)+2K*(表现分-段位要求的及格分)
|
||||||
$meta2 = mt\Parameter::getByName('rank_k');
|
$meta2 = mt\Parameter::getByName('rank_k');
|
||||||
$K = $meta2 ? $meta2['param_value'] : 30; //************** parameter 参数表获取 ************
|
$K = $meta2 ? $meta2['param_value'] : 30; //************** parameter 参数表获取 ************
|
||||||
|
Loading…
x
Reference in New Issue
Block a user