diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index 3eb2e070..69ddd013 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -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; diff --git a/webapp/controller/OutAppNftController.class.php b/webapp/controller/OutAppNftController.class.php index ed95f0fa..ad61a551 100644 --- a/webapp/controller/OutAppNftController.class.php +++ b/webapp/controller/OutAppNftController.class.php @@ -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, diff --git a/webapp/services/RoomBattleDataService.php b/webapp/services/RoomBattleDataService.php index 21c93c96..482b739e 100644 --- a/webapp/services/RoomBattleDataService.php +++ b/webapp/services/RoomBattleDataService.php @@ -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'];