This commit is contained in:
aozhiwei 2022-05-30 12:10:37 +08:00
parent 44d06654ce
commit c358b5cee3
3 changed files with 7 additions and 7 deletions

View File

@ -75,7 +75,7 @@ class BattleController extends BaseAuthedController {
$member['hero_uniid']);
if ($heroDb) {
$info['is_valid_battle'] = 1;
$info['hero_dto'] = json_encode(Hero::toDto($heroDb));
$info['hero_dto'] = Hero::toDto($heroDb);
} else {
$info['errcode'] = 51;
$info['errmsg'] = 'paramater error';
@ -86,7 +86,7 @@ class BattleController extends BaseAuthedController {
$gunDb = Gun::findByAccountId($member['account_id'],
$member['weapon_uuid' . $i]);
if ($gunDb) {
$info['weapon_dto' . $i] = json_encode(Gun::toDto($gunDb));
$info['weapon_dto' . $i] = Gun::toDto($gunDb);
}
}
}

View File

@ -74,7 +74,7 @@ class FormulaService extends BaseService {
(
(0.5 * $rankedTopX * $meta['ranked_topx']) +
(0.25 * $killsTopX * $meta['kills_topx']) +
(0.15 * $killsTopX * $meta['hero_topx']) +
(0.15 * $heroTopX * $meta['hero_topx']) +
(0.5 * $weaponTopX * $meta['weapon_topx']) +
(0.5 * $survivalTopX * $meta['survival_topx'])
);
@ -148,7 +148,7 @@ class FormulaService extends BaseService {
(
(0.5 * $rankedTopX * $meta['ranked_topx']) +
(0.25 * $killsTopX * $meta['kills_topx']) +
(0.15 * $killsTopX * $meta['hero_topx']) +
(0.15 * $heroTopX * $meta['hero_topx']) +
(0.5 * $weaponTopX * $meta['weapon_topx']) +
(0.5 * $survivalTopX * $meta['survival_topx'])
);

View File

@ -54,9 +54,9 @@ class NftService extends BaseService {
private static function internalIsOwner($openId, $name, $tokenId)
{
self::loadNft($openId, $name);
$nftHash = getXVal(self::$userData[$openid], $name . 'Hash', array());
$nftDB = getXVal($nftHash, $tokenId);
return $nftDb && $nftDB['owner_address'] == $openId;
$nftHash = getXVal(self::$userData[$openId], $name . 'Hash', array());
$nftDb = getXVal($nftHash, $tokenId);
return $nftDb && $nftDb['owner_address'] == $openId;
}
private static function loadNft($openId, $name)