1
This commit is contained in:
parent
44d06654ce
commit
c358b5cee3
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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'])
|
||||
);
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user