1
This commit is contained in:
parent
5d72282d74
commit
70a23fb4dc
@ -159,6 +159,9 @@ class OutAppNftController extends BaseController {
|
||||
"value" => intval($heroDb['hero_lv']),
|
||||
"max_value" => 15,
|
||||
));
|
||||
if ($this->isCloseBox()) {
|
||||
$this->fillBoxMeta($info);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Nft::GOLD_BULLION_TYPE:
|
||||
@ -167,6 +170,9 @@ class OutAppNftController extends BaseController {
|
||||
//$info['name'] = $heroMeta['name'];
|
||||
$info['description'] = $NftMeta['desc'];
|
||||
$info['image'] = "https://res2.counterfire.games/nft/meta/".$nftDb['item_id'].".png";
|
||||
if ($this->isCloseBox()) {
|
||||
$this->fillBoxMeta($info);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -280,6 +286,9 @@ class OutAppNftController extends BaseController {
|
||||
$info['detail']['crit'] = $heroAbility['critical'];
|
||||
}
|
||||
}
|
||||
if ($this->isCloseBox()) {
|
||||
$this->fillBoxDetail($info);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Nft::GOLD_BULLION_TYPE:
|
||||
@ -293,6 +302,9 @@ class OutAppNftController extends BaseController {
|
||||
$info['image'] = 'https://res2.counterfire.games/nft/meta/' . $itemMeta['id'] . '.png';
|
||||
$info['detail']['gold_coins'] = $this->getGoldBullionGoldNum($nftDb['item_id']);
|
||||
}
|
||||
if ($this->isCloseBox()) {
|
||||
$this->fillBoxDetail($info);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -318,4 +330,39 @@ class OutAppNftController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
private function isCloseBox()
|
||||
{
|
||||
$openTime = 1719828000;
|
||||
if (myself()->_getNowTime() < $openTime) {
|
||||
if (SERVER_ENV == _ONLINE) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private function fillBoxMeta(&$info)
|
||||
{
|
||||
$info['name'] = 'box';
|
||||
$info['description'] = 'box';
|
||||
$info['image'] = "https://res2.counterfire.games/nft/box/Gen2_raw.gif";
|
||||
$info['attributes'] = array();
|
||||
}
|
||||
|
||||
private function fillBoxDetail(&$info)
|
||||
{
|
||||
$info = array(
|
||||
'net_id' => $info['net_id'],
|
||||
'contract_address' => $info['contract_address'],
|
||||
'token_id' => $info['token_id'],
|
||||
'owner_address' => $info['owner_address'],
|
||||
'meta_url' => $info['meta_url'],
|
||||
'name' => 'box',
|
||||
'item_id' => 0,
|
||||
'type' => $info['type'],
|
||||
'image' => "https://res2.counterfire.games/nft/box/Gen2_raw.gif",
|
||||
'detail' => array()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user