This commit is contained in:
aozhiwei 2022-11-09 00:17:29 +08:00
commit 9cd69db9b5
4 changed files with 13 additions and 9 deletions

View File

@ -412,6 +412,7 @@ class BlockChainController extends BaseAuthedController {
$chipIds = explode('|', getReqVal('chip_ids', ''));
$slotIds = explode('|', getReqVal('slot_ids', ''));
error_log(json_encode($_REQUEST));
if (count($chipIds) != count($slotIds) ||
count($chipIds) < 0) {
myself()->_rspErr(101, 'chip_ids paramater error');
@ -450,7 +451,7 @@ class BlockChainController extends BaseAuthedController {
'action' => Transaction::PLUGIN_CHIP_ACTION_TYPE,
'tokenId' => $tokenId,
'tokenType' => Nft::HERO_TYPE,
'itemUniId' => $heroDb['chip_uniid'],
'itemUniId' => $heroDb['hero_uniid'],
'itemId' => $heroDb['item_id']
)
);
@ -488,8 +489,8 @@ class BlockChainController extends BaseAuthedController {
'action' => Transaction::PLUGIN_CHIP_ACTION_TYPE,
'tokenId' => $tokenId,
'tokenType' => Nft::EQUIP_TYPE,
'itemUniId' => $gunDb['chip_uniid'],
'itemId' => $gunDb['item_id']
'itemUniId' => $gunDb['gun_uniid'],
'itemId' => $gunDb['gun_id']
)
);
}
@ -546,7 +547,7 @@ class BlockChainController extends BaseAuthedController {
'action' => Transaction::UNPLUG_CHIP_ACTION_TYPE,
'tokenId' => $tokenId,
'tokenType' => Nft::HERO_TYPE,
'itemUniId' => $heroDb['chip_uniid'],
'itemUniId' => $heroDb['hero_uniid'],
'itemId' => $heroDb['item_id']
)
);
@ -584,8 +585,8 @@ class BlockChainController extends BaseAuthedController {
'action' => Transaction::UNPLUG_CHIP_ACTION_TYPE,
'tokenId' => $tokenId,
'tokenType' => Nft::EQUIP_TYPE,
'itemUniId' => $gunDb['chip_uniid'],
'itemId' => $gunDb['item_id']
'itemUniId' => $gunDb['gun_uniid'],
'itemId' => $gunDb['gun_id']
)
);
}

View File

@ -261,6 +261,9 @@ class Gun extends BaseModel {
$dto['pvp_ceg_uplimit'] = strval( round(FormulaService::getWeaponPvpDailyCegUpLimit($dto),2) );
$dto['pve_ceg_uplimit'] = strval( round(FormulaService::getWeaponPveDailyCegUpLimit($dto),2) );
$dto['mission_ceg_uplimit'] = strval( round(FormulaService::getWeaponMissionDailyCegUpLimit($dto),2) );
error_log(json_encode(array(
'data____info'=>$dto
))) ;
return $dto;
}

View File

@ -117,12 +117,12 @@ class Transaction extends BaseModel {
case self::CREATED_STATUS:
case self::REPORTED_STATUS:
{
return 'Pending';
return 2;
}
break;
case self::COMPLETED_STATUS:
{
return 'Complete';
return 1;
}
break;
default:

View File

@ -342,7 +342,7 @@ class FormulaService extends BaseService {
ROUND(1-($heroTopX/10-1)/9,2) * 0.03 +
ROUND(1-($weaponTopX/10-1)/9,2) * 0.02;
//不同段位的及格分 = ROUND(1-(大段位排名-1)/(MAX(10)-1),2)
$topRanking = mt\Rank::getRankById($userDb['rank'])['rank_order']; //************** rankRank 参数表获取 ************
$topRanking = mt\Rank::getRankById($userDb['rank'])?mt\Rank::getRankById($userDb['rank'])['rank_order']:0; //************** rankRank 参数表获取 ************
$askedScore = round(1-($topRanking-1)/(10-1),2);
//一个玩家的赛后积分 = 赛前积分+K*(胜负率-总胜率)+2K*(表现分-段位要求的及格分)
$meta2 = mt\Parameter::getByName('rank_k');