This commit is contained in:
songliang 2022-12-19 15:20:34 +08:00
parent b3fb9f7f9c
commit e09e75a8d7
2 changed files with 15 additions and 2 deletions

View File

@ -583,6 +583,17 @@ class MarketController extends BaseController {
$searchLower = array_map('strtolower', $search);
if (!(in_array(strtolower($row['detail']['hero_name']), $searchLower) || in_array(strtolower($row['detail']['token_id']), $searchLower))) continue;
}
if (!empty($row['detail']['chip_ids'])) {
$row['detail']['chips_info'] = array();
$chips = explode('|', $row['detail']['chip_ids']);
foreach ($chips as $chip) {
$chip_info = "";
if (!empty($chip)) {
$chip_info = Chip::toDto(Chip::getChipByTokenId($chip));
}
array_push($row['detail']['chips_info'], $chip_info);
}
}
array_push($nfts, $row);
}
switch ($order_method) {

View File

@ -415,8 +415,10 @@ class Chip extends BaseModel
case 1:{
foreach ($chipIdsArr as $val){
$chip = self::getChipByTokenId($val);
$lucky = FormulaService::getChipLuckyValue($chip['chip_grade']);
$MaxStrength+=FormulaService::Hero_Chip_NFT_Maximum_Physical_Strength($chip['chip_grade'],$lucky)*FormulaService::Hero_Chip_PSA_Value($chip)*FormulaService::Hero_Chip_GAC_PS_Value($chip['chip_grade']);
if ($chip) {
$lucky = FormulaService::getChipLuckyValue($chip['chip_grade']);
$MaxStrength+=FormulaService::Hero_Chip_NFT_Maximum_Physical_Strength($chip['chip_grade'],$lucky)*FormulaService::Hero_Chip_PSA_Value($chip)*FormulaService::Hero_Chip_GAC_PS_Value($chip['chip_grade']);
}
}
}
break;