Merge branch 'james_bc' of git.kingsome.cn:server/game2006api into james_bc
This commit is contained in:
commit
520da5bb66
@ -9,8 +9,10 @@ require_once('models/Bag.php');
|
|||||||
require_once('models/Hero.php');
|
require_once('models/Hero.php');
|
||||||
require_once('models/Gun.php');
|
require_once('models/Gun.php');
|
||||||
require_once('models/Nft.php');
|
require_once('models/Nft.php');
|
||||||
|
require_once('models/Chip.php');
|
||||||
require_once('models/Transaction.php');
|
require_once('models/Transaction.php');
|
||||||
require_once('models/BuyRecord.php');
|
require_once('models/BuyRecord.php');
|
||||||
|
require_once('models/Chip.php');
|
||||||
|
|
||||||
require_once('services/AwardService.php');
|
require_once('services/AwardService.php');
|
||||||
require_once('services/PropertyChgService.php');
|
require_once('services/PropertyChgService.php');
|
||||||
@ -24,6 +26,7 @@ use models\Gun;
|
|||||||
use models\Nft;
|
use models\Nft;
|
||||||
use models\Transaction;
|
use models\Transaction;
|
||||||
use models\BuyRecord;
|
use models\BuyRecord;
|
||||||
|
use models\Chip;
|
||||||
|
|
||||||
class BlockChainController extends BaseAuthedController {
|
class BlockChainController extends BaseAuthedController {
|
||||||
|
|
||||||
@ -98,7 +101,7 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
$gunDb = Gun::find($uuid);
|
$gunDb = Gun::find($uniid);
|
||||||
if (!$gunDb) {
|
if (!$gunDb) {
|
||||||
myself()->_rspErr(1, 'gun not found');
|
myself()->_rspErr(1, 'gun not found');
|
||||||
return;
|
return;
|
||||||
@ -124,7 +127,7 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
$this->internalActivate721Nft($tokenId, Nft::GUN_TYPE, $gunDb['gun_uniid'], $gunDb['gun_id']);
|
$this->internalActivate721Nft($tokenId, Nft::EQUIP_TYPE, $gunDb['gun_uniid'], $gunDb['gun_id']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -203,7 +206,7 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
array(
|
array(
|
||||||
'action' => Transaction::EVOLVE_721_ACTION_TYPE,
|
'action' => Transaction::EVOLVE_721_ACTION_TYPE,
|
||||||
'tokenId' => $nft1['token_id'],
|
'tokenId' => $nft1['token_id'],
|
||||||
'tokenType' => Nft::GUN_TYPE,
|
'tokenType' => Nft::EQUIP_TYPE,
|
||||||
'itemUniId' => $nft1['gun_uniid'],
|
'itemUniId' => $nft1['gun_uniid'],
|
||||||
'itemId' => $nft1['gun_id']
|
'itemId' => $nft1['gun_id']
|
||||||
)
|
)
|
||||||
@ -484,9 +487,9 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
$transId,
|
$transId,
|
||||||
Transaction::MINT_1155_ACTION_TYPE,
|
Transaction::MINT_1155_ACTION_TYPE,
|
||||||
$tokenId,
|
$tokenId,
|
||||||
$tokenType,
|
Nft::CHIP_TYPE,
|
||||||
$itemUniId,
|
$itemDb['item_uniid'],
|
||||||
$itemId
|
$itemDb['item_id']
|
||||||
);
|
);
|
||||||
myself()->_rspData(array(
|
myself()->_rspData(array(
|
||||||
'trans_id' => $transId,
|
'trans_id' => $transId,
|
||||||
|
@ -23,6 +23,11 @@ class NftService extends BaseService {
|
|||||||
'ring' => Nft::RING_TYPE,
|
'ring' => Nft::RING_TYPE,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public static function getChipBlance($account, $tokenId)
|
||||||
|
{
|
||||||
|
return Nft::getChipBlance($account, $tokenId);
|
||||||
|
}
|
||||||
|
|
||||||
public static function isHeroOwner($openId, $tokenId)
|
public static function isHeroOwner($openId, $tokenId)
|
||||||
{
|
{
|
||||||
return self::internalIsOwner($openId, 'hero', $tokenId);
|
return self::internalIsOwner($openId, 'hero', $tokenId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user