From 38f16af78434c6aa71cbed632dbba417ef7b26ed Mon Sep 17 00:00:00 2001 From: hujiabin Date: Mon, 21 Nov 2022 15:30:55 +0800 Subject: [PATCH] 1 --- webapp/controller/BattleController.class.php | 48 +------------------- webapp/services/FormulaService.php | 10 ++-- 2 files changed, 6 insertions(+), 52 deletions(-) diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index 8f5b5ea4..f5395b2a 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -58,58 +58,12 @@ class BattleController extends BaseAuthedController { 'a' => 'battleReport', 'post_data' => $data )));*/ + $teamList = array(); if ($data) { $teamList = $data['team_list']; } error_log(json_encode($teamList)); -// $teamList = array( -// array( -// "team_id" => 10001, -// 'members' => array( -// array( -// 'account_id'=>'6000_2006_test1111', -// ), -// array( -// 'account_id'=>'6513_2006_dYayfOVObW0KpfXhNr1enZ92rkaxmu3c', -// ), -// array( -// 'account_id'=>'6513_2006_6000_2006_test1111', -// ), -// ) -// ), -// array( -// "team_id" => 10002, -// 'members' => array( -// array( -// 'account_id'=>'6513_2006_oUnnMgxxU5apjZVF8tSOQnHhIXzLuAzT', -// ), -// array( -// 'account_id'=>'6513_2006_DmQHkZp0hoqvmSBwCvP6Z0Bru7WhU1fN', -// ), -// array( -// 'account_id'=>'6513_2006_1Ul37E5eNO905laoE1kA9lvC1ydplC0m', -// ), -// ) -// ), -// array( -// "team_id" => 10003, -// 'members' => array( -// array( -// 'account_id'=>'6513_2006_6jJQLHhVbdyi83FJW1k4QiGPoXs12bBD', -// ), -// array( -// 'account_id'=>'6000_2006_DmQHkZp0hoqvmSBwCvP6Z0Bru7WhU1fN', -// ), -// array( -// 'account_id'=>'6000_2006_1Ul37E5eNO905laoE1kA9lvC1ydplC0m', -// ), -// array( -// 'account_id'=>'6000_2006_qqqqwwwwweeee', -// ), -// ) -// ), -// ); $battleDataService = new services\BattleDataService(); $battleDataService->teamList = $teamList; $battleDataService->updateBattleData(); diff --git a/webapp/services/FormulaService.php b/webapp/services/FormulaService.php index f92dee53..e8686f96 100644 --- a/webapp/services/FormulaService.php +++ b/webapp/services/FormulaService.php @@ -336,11 +336,11 @@ class FormulaService extends BaseService { $heroTopX = getXVal($params, 'hero_topx'); $weaponTopX = getXVal($params, 'weapon_topx'); $survivalTopX = getXVal($params, 'survival_topx'); - $expreScore = ROUND(1-($rankedTopX/10-1)/9,2) * 0.5 + - ROUND(1-($killsTopX/10-1)/9,2) * 0.3 + - ROUND(1-($survivalTopX/10-1)/9,2) * 0.15 + - ROUND(1-($heroTopX/10-1)/9,2) * 0.03 + - ROUND(1-($weaponTopX/10-1)/9,2) * 0.02; + $expreScore = ROUND(1-($rankedTopX*100/10-1)/9,2) * 0.5 + + ROUND(1-($killsTopX*100/10-1)/9,2) * 0.3 + + ROUND(1-($survivalTopX*100/10-1)/9,2) * 0.15 + + ROUND(1-($heroTopX*100/10-1)/9,2) * 0.03 + + ROUND(1-($weaponTopX*100/10-1)/9,2) * 0.02; //不同段位的及格分 = ROUND(1-(大段位排名-1)/(MAX(10)-1),2) $topRanking = mt\Rank::getRankById($userDb['rank'])?mt\Rank::getRankById($userDb['rank'])['rank_order']:0; //************** rankRank 参数表获取 ************ $askedScore = round(1-($topRanking-1)/(10-1),2);