Merge branch 'james_bc' of git.kingsome.cn:server/game2006api into james_bc
This commit is contained in:
commit
0280814e44
@ -116,6 +116,7 @@ class BlockChain(object):
|
|||||||
['type', 0, '1:英雄 2:枪械'],
|
['type', 0, '1:英雄 2:枪械'],
|
||||||
['token_id', '', 'token_id'],
|
['token_id', '', 'token_id'],
|
||||||
['chip_ids', '', '需要卸下的chip token_ids多个用|分割'],
|
['chip_ids', '', '需要卸下的chip token_ids多个用|分割'],
|
||||||
|
['slot_ids', '', '槽位0-3多个用|分割'],
|
||||||
],
|
],
|
||||||
'response': [
|
'response': [
|
||||||
_common.RspHead(),
|
_common.RspHead(),
|
||||||
@ -132,6 +133,7 @@ class BlockChain(object):
|
|||||||
['type', 0, '1:英雄 2:枪械'],
|
['type', 0, '1:英雄 2:枪械'],
|
||||||
['token_id', '', 'token_id'],
|
['token_id', '', 'token_id'],
|
||||||
['chip_ids', '', '需要卸下的chip token_ids多个用|分割'],
|
['chip_ids', '', '需要卸下的chip token_ids多个用|分割'],
|
||||||
|
['slot_ids', '', '槽位0-3多个用|分割'],
|
||||||
],
|
],
|
||||||
'response': [
|
'response': [
|
||||||
_common.RspHead(),
|
_common.RspHead(),
|
||||||
|
@ -405,6 +405,14 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
{
|
{
|
||||||
$type = getReqVal('type', '');
|
$type = getReqVal('type', '');
|
||||||
$tokenId = getReqVal('token_id', '');
|
$tokenId = getReqVal('token_id', '');
|
||||||
|
$chipIds = explode('|', getReqVal('chip_ids', ''));
|
||||||
|
$slotIds = explode('|', getReqVal('slot_ids', ''));
|
||||||
|
|
||||||
|
if (count($chipIds) != count($slotIds) ||
|
||||||
|
count($chipIds) < 0) {
|
||||||
|
myself()->_rspErr(101, 'chip_ids paramater error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -429,12 +437,13 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
'account_id' => myself()->_getAccountId(),
|
'account_id' => myself()->_getAccountId(),
|
||||||
'session_id' => myself()->_getSessionId(),
|
'session_id' => myself()->_getSessionId(),
|
||||||
'account' => myself()->_getOpenId(),
|
'account' => myself()->_getOpenId(),
|
||||||
'type' => $type,
|
|
||||||
'token_id' => $tokenId,
|
'token_id' => $tokenId,
|
||||||
'chip_ids' => implode('|', $chipIds)
|
'token_type' => Nft::HERO_TYPE,
|
||||||
|
'chip_ids' => implode('|', $chipIds),
|
||||||
|
'slot_ids' => implode('|', $slotIds),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'action' => Transaction::UNPLUG_CHIP_ACTION_TYPE,
|
'action' => Transaction::PLUGIN_CHIP_ACTION_TYPE,
|
||||||
'tokenId' => $tokenId,
|
'tokenId' => $tokenId,
|
||||||
'tokenType' => Nft::HERO_TYPE,
|
'tokenType' => Nft::HERO_TYPE,
|
||||||
'itemUniId' => $heroDb['chip_uniid'],
|
'itemUniId' => $heroDb['chip_uniid'],
|
||||||
@ -466,12 +475,13 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
'account_id' => myself()->_getAccountId(),
|
'account_id' => myself()->_getAccountId(),
|
||||||
'session_id' => myself()->_getSessionId(),
|
'session_id' => myself()->_getSessionId(),
|
||||||
'account' => myself()->_getOpenId(),
|
'account' => myself()->_getOpenId(),
|
||||||
'type' => $type,
|
|
||||||
'token_id' => $tokenId,
|
'token_id' => $tokenId,
|
||||||
'chip_ids' => implode('|', $chipIds)
|
'token_type' => Nft::EQUIP_TYPE,
|
||||||
|
'chip_ids' => implode('|', $chipIds),
|
||||||
|
'slot_ids' => implode('|', $slotIds),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'action' => Transaction::UNPLUG_CHIP_ACTION_TYPE,
|
'action' => Transaction::PLUGIN_CHIP_ACTION_TYPE,
|
||||||
'tokenId' => $tokenId,
|
'tokenId' => $tokenId,
|
||||||
'tokenType' => Nft::EQUIP_TYPE,
|
'tokenType' => Nft::EQUIP_TYPE,
|
||||||
'itemUniId' => $gunDb['chip_uniid'],
|
'itemUniId' => $gunDb['chip_uniid'],
|
||||||
@ -492,6 +502,13 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
$type = getReqVal('type', '');
|
$type = getReqVal('type', '');
|
||||||
$tokenId = getReqVal('token_id', '');
|
$tokenId = getReqVal('token_id', '');
|
||||||
$chipIds = explode('|', getReqVal('chip_ids', ''));
|
$chipIds = explode('|', getReqVal('chip_ids', ''));
|
||||||
|
$slotIds = explode('|', getReqVal('slot_ids', ''));
|
||||||
|
|
||||||
|
if (count($chipIds) != count($slotIds) ||
|
||||||
|
count($chipIds) < 0) {
|
||||||
|
myself()->_rspErr(101, 'chip_ids paramater error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -516,9 +533,10 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
'account_id' => myself()->_getAccountId(),
|
'account_id' => myself()->_getAccountId(),
|
||||||
'session_id' => myself()->_getSessionId(),
|
'session_id' => myself()->_getSessionId(),
|
||||||
'account' => myself()->_getOpenId(),
|
'account' => myself()->_getOpenId(),
|
||||||
'type' => $type,
|
|
||||||
'token_id' => $tokenId,
|
'token_id' => $tokenId,
|
||||||
'chip_ids' => implode('|', $chipIds)
|
'token_type' => Nft::HERO_TYPE,
|
||||||
|
'chip_ids' => implode('|', $chipIds),
|
||||||
|
'slot_ids' => implode('|', $slotIds),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'action' => Transaction::UNPLUG_CHIP_ACTION_TYPE,
|
'action' => Transaction::UNPLUG_CHIP_ACTION_TYPE,
|
||||||
@ -553,9 +571,10 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
'account_id' => myself()->_getAccountId(),
|
'account_id' => myself()->_getAccountId(),
|
||||||
'session_id' => myself()->_getSessionId(),
|
'session_id' => myself()->_getSessionId(),
|
||||||
'account' => myself()->_getOpenId(),
|
'account' => myself()->_getOpenId(),
|
||||||
'type' => $type,
|
|
||||||
'token_id' => $tokenId,
|
'token_id' => $tokenId,
|
||||||
'chip_ids' => implode('|', $chipIds)
|
'token_type' => Nft::EQUIP_TYPE,
|
||||||
|
'chip_ids' => implode('|', $chipIds),
|
||||||
|
'slot_ids' => implode('|', $slotIds),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'action' => Transaction::UNPLUG_CHIP_ACTION_TYPE,
|
'action' => Transaction::UNPLUG_CHIP_ACTION_TYPE,
|
||||||
|
@ -13,7 +13,8 @@ class Transaction extends BaseModel {
|
|||||||
const EVOLVE_CHIP_ACTION_TYPE = 4;
|
const EVOLVE_CHIP_ACTION_TYPE = 4;
|
||||||
const MINT_SHARD_BATCH_ACTION_TYPE = 5;
|
const MINT_SHARD_BATCH_ACTION_TYPE = 5;
|
||||||
const SHARD_MIX_BY_USER_ACTION_TYPE = 6;
|
const SHARD_MIX_BY_USER_ACTION_TYPE = 6;
|
||||||
const UNPLUG_CHIP_ACTION_TYPE = 7;
|
const PLUGIN_CHIP_ACTION_TYPE = 7;
|
||||||
|
const UNPLUG_CHIP_ACTION_TYPE = 8;
|
||||||
|
|
||||||
const CREATED_STATUS = 1;
|
const CREATED_STATUS = 1;
|
||||||
const REPORTED_STATUS = 2;
|
const REPORTED_STATUS = 2;
|
||||||
@ -93,6 +94,16 @@ class Transaction extends BaseModel {
|
|||||||
return 'Synthesis';
|
return 'Synthesis';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case self::PLUGIN_CHIP_ACTION_TYPE:
|
||||||
|
{
|
||||||
|
return 'Equipment';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case self::UNPLUG_CHIP_ACTION_TYPE:
|
||||||
|
{
|
||||||
|
return 'Remove';
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
return 'None';
|
return 'None';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user