1
This commit is contained in:
parent
f0a6b0a839
commit
fde83ec29a
@ -235,7 +235,9 @@ class OutAppNftController extends BaseController {
|
||||
$info['owner_address'] = $nftDb['owner_address'];
|
||||
$heroDb = Hero::findByTokenId2($tokenId);
|
||||
if ($heroDb) {
|
||||
$heroAbility = Hero::abilityInfo($heroDb);
|
||||
$heroMeta = \mt\Hero::get($heroDb['hero_id']);
|
||||
$heroAtteMeta = \mt\EconomyAttribute::findByGrade($heroMeta['relationship'],$heroDb['quality']);
|
||||
if ($heroMeta) {
|
||||
$info['meta_url'] = NFT_META_URL . '/hero/meta/' . $netId . '/' . $tokenId;
|
||||
$info['name'] = $heroMeta['name'];
|
||||
@ -243,6 +245,14 @@ class OutAppNftController extends BaseController {
|
||||
$info['type'] = $nftDb['token_type'];
|
||||
$info['image'] = 'https://www.cebg.games/res/avatars/' . $heroMeta['id'] . '.png';
|
||||
$info['detail']['quality'] = $heroDb['quality'];
|
||||
$info['detail']['max_mining_days'] = $heroAtteMeta['validTime'];
|
||||
$info['detail']['wealth'] = Hero::getHeroWealth($heroDb);
|
||||
$info['detail']['lucky'] = Hero::getHeroLucky($heroDb);
|
||||
$info['detail']['hp'] = $heroAbility['hp'];
|
||||
$info['detail']['atk'] = $heroAbility['attack'];
|
||||
$info['detail']['def'] = $heroAbility['defence'];
|
||||
$info['detail']['block'] = $heroAbility['block'];
|
||||
$info['detail']['crit'] = $heroAbility['critical'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ class Hero extends BaseModel {
|
||||
return $avatarInfos;
|
||||
}
|
||||
|
||||
private static function abilityInfo($row ){
|
||||
public static function abilityInfo($row ){
|
||||
$info = array(
|
||||
'hp' => 0,
|
||||
'attack' => 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user