This commit is contained in:
aozhiwei 2024-05-14 16:19:41 +08:00
commit eadd8fb281
3 changed files with 14 additions and 6 deletions

View File

@ -255,7 +255,7 @@ class BattleController extends BaseAuthedController {
if ($a['expScore'] == $b['expScore']) {
return 0;
}
return ($a['expScore'] < $b['expScore']) ? -1 : 1;
return ($a['expScore'] > $b['expScore']) ? -1 : 1;
});
}
$roomBattleDataService->realUserCount = $realUserNum;

View File

@ -45,11 +45,11 @@ class OutAppNftController extends BaseController {
$channel = getReqVal('channel', '');
$openId = getReqVal('openId', '');
$accountId = BC_POLY_CHANNEL.'_'.$this->_getGameId().'_'.$channel.'_'.$openId;
$userDb = User::find($accountId);
if (!$userDb){
$this->_rspErr(1, 'user not found');
return;
}
// $userDb = User::find($accountId);
// if (!$userDb){
// $this->_rspErr(1, 'user not found');
// return;
// }
$info = array(
'loginVal' => 0,

View File

@ -85,6 +85,14 @@ class RoomBattleDataService extends BaseService {
$newRank=$userDb['rank'];
$ranked = $this->getMyRanked($account);
$newScore = FormulaService::calcBattleAfterRankScoreNew($userDb,$ranked,$teamRanked,$winningPro);
if ($account == "6513_2006_VBpXS6ACSw6oqbEspB3N1ezsAty0IIvk"){
error_log("RankParam: ".json_encode(array(
'rank' => $ranked,
'teamRank' => $teamRanked,
'winningPro' => $winningPro,
"sortAccount" => $this->teamExpScoreSort
)));
}
$newElo = FormulaService::calcUserEloValueNew($userDb,$ranked,$winningPro);
if ($newScore < $userDb['score'] && $userDb['score']< 1300){
$newScore = $userDb['score'];