1
This commit is contained in:
parent
efed668b2f
commit
0f3a63a779
@ -100,6 +100,7 @@ class Gun(object):
|
||||
['pvp_ceg_uplimit', 0, 'pvp获取的ceg的上限'],
|
||||
['pve_ceg_uplimit', 0, 'pve获取的ceg的上限'],
|
||||
['offer_reward_state', 0, '是否悬赏中'],
|
||||
['tags', '', '1:Gen状态'],
|
||||
]
|
||||
|
||||
class GunSkin(object):
|
||||
@ -265,6 +266,7 @@ class Hero(object):
|
||||
['pvp_ceg_uplimit', 0, 'pvp获取的ceg的上限'],
|
||||
['pve_ceg_uplimit', 0, 'pve获取的ceg的上限'],
|
||||
['offer_reward_state', 0, '是否悬赏中'],
|
||||
['tags', '', '1:Gen状态'],
|
||||
|
||||
]
|
||||
|
||||
@ -802,6 +804,7 @@ class Chip(object):
|
||||
['supper_state', 0, '是否锁定:0 正常;1 锁住 ---弃用字段'],
|
||||
['inlay_state', 0, '镶嵌状态:0 未镶嵌;1 镶嵌了 ---弃用字段'],
|
||||
['!rand_attr', [ChipAttr()], '属性'],
|
||||
['tags', '', '1:Gen状态'],
|
||||
]
|
||||
|
||||
class ChipPro(object):
|
||||
|
@ -11,6 +11,7 @@ require_once('models/User.php');
|
||||
require_once('models/Gun.php');
|
||||
require_once('models/Bag.php');
|
||||
require_once('models/Chip.php');
|
||||
require_once('models/Nft.php');
|
||||
require_once('models/NftUpReceive.php');
|
||||
require_once('models/Transaction.php');
|
||||
|
||||
@ -26,6 +27,7 @@ use models\User;
|
||||
use models\Gun;
|
||||
use models\Bag;
|
||||
use models\Chip;
|
||||
use models\Nft;
|
||||
use models\NftUpReceive;
|
||||
use models\Transaction;
|
||||
use services\LogService;
|
||||
@ -61,6 +63,11 @@ class GunController extends BaseAuthedController {
|
||||
$this->_rspErr(1, "You don't have the gun yet");
|
||||
return;
|
||||
}
|
||||
$gunDb['tags'] = '';
|
||||
if ($gunDb['token_id']){
|
||||
$nftDb = Nft::getNft($gunDb['token_id']);
|
||||
$gunDb['tags'] = $nftDb['tags'];
|
||||
}
|
||||
|
||||
$gun = Gun::toDto($gunDb);
|
||||
$this->_rspData(array(
|
||||
|
@ -15,6 +15,7 @@ require_once('models/Hero.php');
|
||||
require_once('models/Bag.php');
|
||||
require_once('models/HeroSkin.php');
|
||||
require_once('models/Chip.php');
|
||||
require_once('models/Nft.php');
|
||||
require_once('models/NftUpReceive.php');
|
||||
require_once('models/Transaction.php');
|
||||
|
||||
@ -30,6 +31,7 @@ use models\Hero;
|
||||
use models\Bag;
|
||||
use models\HeroSkin;
|
||||
use models\Chip;
|
||||
use models\Nft;
|
||||
use models\NftUpReceive;
|
||||
use models\Transaction;
|
||||
use services\LogService;
|
||||
@ -59,6 +61,11 @@ class HeroController extends BaseAuthedController {
|
||||
$this->_rspErr(1, "You don't have the hero yet");
|
||||
return;
|
||||
}
|
||||
$heroDb['tags'] = '';
|
||||
if ($heroDb['token_id']){
|
||||
$nftDb = Nft::getNft($heroDb['token_id']);
|
||||
$heroDb['tags'] = $nftDb['tags'];
|
||||
}
|
||||
|
||||
$hero = Hero::toDto($heroDb);
|
||||
$this->_rspData(array(
|
||||
|
@ -180,6 +180,7 @@ class Chip extends BaseModel
|
||||
$nft_address = SERVER_ENV == _ONLINE ? '0x73482411443E87CAC124C12A10B34e9Aaa2De168' : '0x26b4AFb60d6C903165150C6F0AA14F8016bE4aec';
|
||||
}
|
||||
$dto['nft_address'] = $nft_address;
|
||||
$dto['tags'] = '';
|
||||
return $dto;
|
||||
}
|
||||
|
||||
|
@ -156,6 +156,7 @@ class Gun extends BaseModel {
|
||||
'account_id' => myself()->_getAccountId()
|
||||
),
|
||||
function ($row) use($cb) {
|
||||
$row['tags'] = '';
|
||||
$cb($row);
|
||||
}
|
||||
);
|
||||
@ -195,6 +196,7 @@ class Gun extends BaseModel {
|
||||
)
|
||||
);
|
||||
}
|
||||
$row['tags'] = $nftDb['tags'];
|
||||
$cb($row);
|
||||
}
|
||||
}
|
||||
@ -303,6 +305,7 @@ class Gun extends BaseModel {
|
||||
'chip_strength_sum' => strval(Chip::getChipMaxStrength($row['chip_ids'],2)), //计算ceg上限所需参数
|
||||
'offer_reward_state' => 0,
|
||||
'labour' => $row['labour'],
|
||||
'tags' => $row['tags'],
|
||||
);
|
||||
$dto['durability_max'] = strval(round(FormulaService::Weapon_NFT_Maximum_Durability($dto['quality'],$dto['lucky']),3));
|
||||
$dto['pvp_ceg_uplimit'] = strval( round(FormulaService::getWeaponPvpDailyCegUpLimit($dto),2) );
|
||||
|
@ -146,6 +146,7 @@ class Hero extends BaseModel {
|
||||
'account_id' => myself()->_getAccountId()
|
||||
),
|
||||
function ($row) use($cb) {
|
||||
$row['tags'] = '';
|
||||
$cb($row);
|
||||
}
|
||||
);
|
||||
@ -185,6 +186,7 @@ class Hero extends BaseModel {
|
||||
)
|
||||
);
|
||||
}
|
||||
$row['tags'] = $nftDb['tags'];
|
||||
$cb($row);
|
||||
}
|
||||
}
|
||||
@ -309,6 +311,7 @@ class Hero extends BaseModel {
|
||||
'skill_points' => $row['skill_points'],
|
||||
'offer_reward_state' => 0,
|
||||
'labour' => $row['labour'],
|
||||
'tags' => $row['tags'],
|
||||
);
|
||||
$dto['hero_tili_max'] = strval(round(FormulaService::Hero_NFT_Maximum_Physical_Strength($dto['quality'],$dto['lucky']),3));
|
||||
$dto['pvp_ceg_uplimit'] =strval( round(FormulaService::getHeroPvpDailyCegUpLimit($dto),2) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user