This commit is contained in:
aozhiwei 2022-04-23 20:41:37 +08:00
parent cfdb0a6a9f
commit 85da11f3a3
2 changed files with 6 additions and 2 deletions

View File

@ -490,6 +490,7 @@ class NftGunDetail(object):
['name', '', '枪支名'],
['level', 0, '等级'],
['quality', 0, '星级'],
['lukcy', 0, '幸运'],
['!attr', [AttrDesc()], '属性'],
]

View File

@ -4,6 +4,7 @@ namespace models;
require_once('mt/Attr.php');
require_once('mt/Item.php');
require_once('mt/Equip.php');
require_once('mt/GunLevel.php');
require_once('mt/GunQuality.php');
@ -118,7 +119,7 @@ class Nft extends BaseModel {
'item_id' => $nftDb['item_id'],
'type' => $nftDb['token_type'],
'state' => $nftDb['token_state'],
'hide_attr' => 1,
'hide_attr' => 0,
'is_genesis' => in_array(self::GENESIS_TAG, $tags),
'image' => $image,
'currency_list' => array(),
@ -143,15 +144,17 @@ class Nft extends BaseModel {
$nft['info']['atk'] = $heroMeta['damage'];
$nft['info']['def'] = $heroMeta['defence'];
$nft['info']['advanced_count'] = 0;
$nft['info']['lucky'] = 0;
$nft['info']['lucky'] = $heroMeta['hero_lucky'];
$nft['info']['success_rate'] = 0;
}
}
break;
case Nft::EQUIP_TYPE:
{
$equipMeta = mt\Equip::get($nftDb['item_id']);
$nft['info']['level'] = 1;
$nft['info']['quality'] = 1;
$nft['info']['lucky'] = $equipMeta ? $equipMeta['gun_lucky'] : 0;
$randAttr = array();
if (is_null($nftDb['rand_attr'])) {
$initQualityMeta = mt\GunQuality::getByQuality(1);