This commit is contained in:
hujiabin 2022-10-26 11:53:41 +08:00
parent 53ed29ea5f
commit 1dce70e0bf

View File

@ -147,7 +147,8 @@ class BattleDataService extends BaseService {
}
}
//录入战斗记录
$this->saveBattleHistory();
switch ($matchMode) {
case self::MATCH_MODE_PVP:
@ -183,15 +184,17 @@ class BattleDataService extends BaseService {
}
break;
}
//录入战斗记录
$this->saveBattleHistory();
}
private function saveBattleHistory(){
$user = myself()->_getOrmUserInfo();
$newRank = $user['rank'];
$newScore = FormulaService::calcBattleAfterRankScore($user,$_REQUEST); //赛后排位积分
mt\Rank::calcNewRankAndScore( $newRank, $newScore);
$newScore = $user['score'];
if (mt\RankSeason::getCurrentSeason()){
$newScore = FormulaService::calcBattleAfterRankScore($user,$_REQUEST); //赛后排位积分
mt\Rank::calcNewRankAndScore( $newRank, $newScore);
}
$data = array(
"battle_uniid" => getReqVal('battle_uuid', 0),
"account_id" => myself()->_getAccountId(),