1
This commit is contained in:
parent
fc24341c3d
commit
b1dc51850f
@ -66,6 +66,7 @@ class BattleDataService extends BaseService {
|
|||||||
private $weapon1Dto = null;
|
private $weapon1Dto = null;
|
||||||
private $weapon2Dto = null;
|
private $weapon2Dto = null;
|
||||||
private $currSeasonMeta = null;
|
private $currSeasonMeta = null;
|
||||||
|
private $oldScore = null;
|
||||||
|
|
||||||
private $reward = array(
|
private $reward = array(
|
||||||
'hero' => array(
|
'hero' => array(
|
||||||
@ -205,7 +206,7 @@ class BattleDataService extends BaseService {
|
|||||||
"battle_end_time" => myself()->_getNowTime(),
|
"battle_end_time" => myself()->_getNowTime(),
|
||||||
"current_level_class" => $user['rank'],
|
"current_level_class" => $user['rank'],
|
||||||
"current_level_class_score" => $user['score'],
|
"current_level_class_score" => $user['score'],
|
||||||
// "level_class_score_chg" => 0, // 排位分改变
|
"level_class_score_chg" => $user['score']-$this->oldScore, // 排位分改变
|
||||||
"pve_rank_score" => getReqVal('pve_rank_score', 0),
|
"pve_rank_score" => getReqVal('pve_rank_score', 0),
|
||||||
"pve_kill_boss" => getReqVal('pve_kill_boss', 0),
|
"pve_kill_boss" => getReqVal('pve_kill_boss', 0),
|
||||||
"pve_instance_id" => getReqVal('pve_instance_id', 0),
|
"pve_instance_id" => getReqVal('pve_instance_id', 0),
|
||||||
@ -455,10 +456,12 @@ class BattleDataService extends BaseService {
|
|||||||
private function updateScore()
|
private function updateScore()
|
||||||
{
|
{
|
||||||
$userInfo = myself()->_getOrmUserInfo();
|
$userInfo = myself()->_getOrmUserInfo();
|
||||||
|
$this->oldScore = $userInfo['score'];
|
||||||
$newRank = $userInfo['rank'];
|
$newRank = $userInfo['rank'];
|
||||||
$newScore = FormulaService::calcBattleAfterRankScore($userInfo,$_REQUEST); //赛后排位积分
|
$newScore = FormulaService::calcBattleAfterRankScore($userInfo,$_REQUEST); //赛后排位积分
|
||||||
$newElo = FormulaService::calcUserEloValue($userInfo,$_REQUEST); //赛后elo积分
|
$newElo = FormulaService::calcUserEloValue($userInfo,$_REQUEST); //赛后elo积分
|
||||||
mt\Rank::calcNewRankAndScore( $newRank, $newScore);
|
mt\Rank::calcNewRankAndScore( $newRank, $newScore);
|
||||||
|
|
||||||
if ( $newScore != $userInfo['score'] ) {
|
if ( $newScore != $userInfo['score'] ) {
|
||||||
myself()->_updateUserInfo(array(
|
myself()->_updateUserInfo(array(
|
||||||
'rank' => $newRank,
|
'rank' => $newRank,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user