diff --git a/webapp/controller/RestApiController.class.php b/webapp/controller/RestApiController.class.php index a4376bbe..25e83803 100644 --- a/webapp/controller/RestApiController.class.php +++ b/webapp/controller/RestApiController.class.php @@ -58,7 +58,7 @@ class RestApiController extends BaseController { ); array_push($info['attributes'],array( "trait_type" => "level", - "value" => $heroDb['hero_lv'], + "value" => intval($heroDb['hero_lv']), "max_value" => 15, )); $randAttr = emptyReplace(json_decode($heroDb['rand_attr'], true), array()); @@ -67,21 +67,21 @@ class RestApiController extends BaseController { case kHAT_Hp : { array_push($info['attributes'],array( "trait_type" => "Hp", - "value" => $attr['val'], + "value" => intval($attr['val']), )); } break; case kHAT_Atk : { array_push($info['attributes'],array( "trait_type" => "Atk", - "value" => $attr['val'], + "value" => intval($attr['val']), )); } break; case kHAT_Def : { array_push($info['attributes'],array( "trait_type" => "Def", - "value" => $attr['val'], + "value" => intval($attr['val']), )); } } diff --git a/webapp/services/FormulaService.php b/webapp/services/FormulaService.php index 57578681..17a796f5 100644 --- a/webapp/services/FormulaService.php +++ b/webapp/services/FormulaService.php @@ -339,7 +339,7 @@ class FormulaService extends BaseService { public static function calcBattleAfterRankScore($userDb,$params,$winningPro){ /**一个玩家的赛后积分 = 赛前积分+K*(胜负率-总胜率)+2K*(表现分-段位要求的及格分)*/ //胜负率=1-(排名-1)/(最大排名-1) - $ranked = getXVal($params, 'ranked'); + $ranked = getXVal($params, 'pvp_personal_rank'); $teamRank = getXVal($params, 'pvp_team_rank'); $meta1 = mt\Parameter::getByName('rank_order_max'); $maxRanked = $meta1 ? $meta1['param_value'] : 40; //************** parameter 参数表获取 ************