1
This commit is contained in:
parent
e47870db61
commit
bc0ecdd30e
@ -183,3 +183,5 @@ const kWantedLockType = 3;
|
|||||||
const kMaxHeroUpLevelNum = 2;
|
const kMaxHeroUpLevelNum = 2;
|
||||||
const kMaxHeroUpQualityNum = 2;
|
const kMaxHeroUpQualityNum = 2;
|
||||||
const kMaxEmojiNum = 6;
|
const kMaxEmojiNum = 6;
|
||||||
|
|
||||||
|
const GAME_ID = 2006;
|
||||||
|
@ -136,7 +136,7 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
if (!$tokenId) {
|
if (!$tokenId) {
|
||||||
$tokenId = BuyRecord::genOrderId
|
$tokenId = BuyRecord::genOrderId
|
||||||
(
|
(
|
||||||
2006,
|
GAME_ID,
|
||||||
phpcommon\BC_FUNC_CREATION,
|
phpcommon\BC_FUNC_CREATION,
|
||||||
myself()->_getNowTime(),
|
myself()->_getNowTime(),
|
||||||
myself()->_getAddress()
|
myself()->_getAddress()
|
||||||
@ -152,41 +152,6 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
$this->internalActivate721Nft($tokenId, Nft::HERO_TYPE, $heroDb['hero_uniid'], $heroDb['hero_id']);
|
$this->internalActivate721Nft($tokenId, Nft::HERO_TYPE, $heroDb['hero_uniid'], $heroDb['hero_id']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
|
||||||
{
|
|
||||||
if (true) {
|
|
||||||
myself()->_rspErr(1, 'cant mint');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$gunDb = Gun::find($uniid);
|
|
||||||
if (!$gunDb) {
|
|
||||||
myself()->_rspErr(1, 'gun not found');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ($gunDb['token_id']) {
|
|
||||||
myself()->_rspErr(1, 'already activated');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$tokenId = $gunDb['active_token_id'];
|
|
||||||
if (!$tokenId) {
|
|
||||||
$tokenId = BuyRecord::genOrderId
|
|
||||||
(
|
|
||||||
2006,
|
|
||||||
phpcommon\BC_FUNC_CREATION,
|
|
||||||
myself()->_getNowTime(),
|
|
||||||
myself()->_getAddress()
|
|
||||||
);
|
|
||||||
Gun::Update($gunDb['gun_uniid'],
|
|
||||||
array(
|
|
||||||
'active_token_id' => $tokenId,
|
|
||||||
'active_count' => function () {
|
|
||||||
return 'active_count + 1';
|
|
||||||
}
|
|
||||||
));
|
|
||||||
}
|
|
||||||
$this->internalActivate721Nft($tokenId, Nft::EQUIP_TYPE, $gunDb['gun_uniid'], $gunDb['gun_id']);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
myself()->_rspErr(1, 'type param error');
|
myself()->_rspErr(1, 'type param error');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user