碎片合成
This commit is contained in:
parent
58b5d71d0b
commit
a93f8e9fdb
@ -41,9 +41,9 @@ class Fragment(object):
|
|||||||
'params': [
|
'params': [
|
||||||
_common.ReqHead(),
|
_common.ReqHead(),
|
||||||
['type', '', '类型:1 英雄;2 枪械'],
|
['type', '', '类型:1 英雄;2 枪械'],
|
||||||
['unique_ids', '', '普通碎片unique id,用“|”分开;例:id1|id2|id3...'],
|
['params', '', '普通碎片 item id,用“|”分开;例:item id1|item id2|item id3...'],
|
||||||
['unique_id_special', '', '特殊碎片unique id'],
|
['param', '', '特殊碎片 item id'],
|
||||||
['item_id', '', '英雄或枪械的道具id'],
|
['item_id', '', '英雄或枪械 item id'],
|
||||||
],
|
],
|
||||||
'response': [
|
'response': [
|
||||||
_common.RspHead(),
|
_common.RspHead(),
|
||||||
|
@ -2,12 +2,18 @@
|
|||||||
|
|
||||||
require_once('models/Fragment.php');
|
require_once('models/Fragment.php');
|
||||||
require_once('models/Nft.php');
|
require_once('models/Nft.php');
|
||||||
|
require_once('models/Bag.php');
|
||||||
|
require_once('models/Hero.php');
|
||||||
|
require_once('models/Gun.php');
|
||||||
|
|
||||||
require_once('services/PropertyChgService.php');
|
require_once('services/PropertyChgService.php');
|
||||||
require_once('services/LogService.php');
|
require_once('services/LogService.php');
|
||||||
|
|
||||||
use models\Fragment;
|
use models\Fragment;
|
||||||
use models\Nft;
|
use models\Nft;
|
||||||
|
use models\Bag;
|
||||||
|
use models\Hero;
|
||||||
|
use models\Gun;
|
||||||
use services\FormulaService;
|
use services\FormulaService;
|
||||||
use services\LogService;
|
use services\LogService;
|
||||||
|
|
||||||
@ -81,94 +87,95 @@ class FragmentController extends BaseAuthedController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function _verificationFragment($itemId,$type,$sub_type){
|
||||||
|
$itemMetaParam = mt\Item::get($itemId);
|
||||||
|
if (!$itemMetaParam){
|
||||||
|
$this->_rspErr(1,'param error ' .$itemId);
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
if ($itemMetaParam['type'] != $type||
|
||||||
|
$itemMetaParam['sub_type'] != $sub_type){
|
||||||
|
$this->_rspErr(1,'param error (type) '.$itemId);
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
$itemNum = Bag::getItemCount($itemId);
|
||||||
|
if ($itemNum < 1){
|
||||||
|
$this->_rspErr(1,'Insufficient quantity '.$itemId.' Number:'.$itemNum);
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function syntheticFragment(){
|
public function syntheticFragment(){
|
||||||
$this->_rspOk();return;
|
// $this->_rspOk();return;
|
||||||
|
|
||||||
$type = getReqVal('type', 0);
|
$type = getReqVal('type', 0);
|
||||||
$unique_ids = getReqVal('unique_ids','');
|
$params = getReqVal('params','');
|
||||||
$unique_id_special = getReqVal('unique_id_special','');
|
$param = getReqVal('param','');
|
||||||
$item_id = getReqVal('item_id','');
|
$item_id = getReqVal('item_id','');
|
||||||
$unique_id_arr = explode('|',$unique_ids);
|
$paramArr = explode('|',$params);
|
||||||
if (count($unique_id_arr) != 8){
|
if (count($paramArr) != 8){
|
||||||
$this->_rspErr(1,'Insufficient number of parameters');
|
$this->_rspErr(1,'Insufficient number of parameters');
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
if ($unique_id_special){
|
$meta = mt\Parameter::getByName('jigsaw_merge_h_price');
|
||||||
|
$mint = $meta ? $meta['param_value'] : 100;
|
||||||
|
if ($param){
|
||||||
//指定合成英雄
|
//指定合成英雄
|
||||||
$itemMeta = mt\Item::get($item_id);
|
$itemMeta = mt\Item::get($item_id);
|
||||||
if (!$itemMeta){
|
if (!$itemMeta){
|
||||||
$this->_rspErr(1,'item_id param error');
|
$this->_rspErr(1,'item_id param error');
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
$fragmentDbSpecial = Fragment::getFragmentByIdx($unique_id_special);
|
if (!$itemMeta['type'] != \mt\Item::HERO_TYPE){
|
||||||
if (!$fragmentDbSpecial){
|
$this->_rspErr(1,'item_id param error (type)');
|
||||||
$this->_rspErr(1,'unique_id_special param error');
|
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
if ($fragmentDbSpecial['type'] != 3){
|
$this->_verificationFragment($param,\mt\Item::FRAGMENT_TYPE,\mt\Item::HERO_FRAGMENT_SUBTYPE_PRO);
|
||||||
$this->_rspErr(1,'unique_id_special param error(type)');
|
// $itemMetaParam = mt\Item::get($param);
|
||||||
return ;
|
// if (!$itemMetaParam){
|
||||||
}
|
// $this->_rspErr(1,'param error');
|
||||||
$token_id_arr = array();
|
// return ;
|
||||||
array_push($token_id_arr,$fragmentDbSpecial['token_id']);
|
|
||||||
foreach ($unique_id_arr as $val){
|
|
||||||
$fragmentDb = Fragment::getFragmentByIdx($val);
|
|
||||||
if (!$fragmentDb){
|
|
||||||
$this->_rspErr(1,'unique_ids param error');
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
if ($fragmentDb['type'] != 1){
|
|
||||||
$this->_rspErr(1,'unique_ids param error(type)');
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
array_push($token_id_arr,$fragmentDb['token_id']);
|
|
||||||
}
|
|
||||||
// $costItems = array(
|
|
||||||
// array(
|
|
||||||
// 'item_id' => V_ITEM_DIAMOND,
|
|
||||||
// 'item_num' => \services\FormulaService::Hero_Parts_Synthetic_Cost()
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
// $lackItem = null;
|
|
||||||
// if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
|
||||||
// $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
|
||||||
// return;
|
|
||||||
// }
|
// }
|
||||||
|
// if ($itemMetaParam['type'] != \mt\Item::FRAGMENT_TYPE ||
|
||||||
|
// $itemMetaParam['sub_type'] != \mt\Item::HERO_FRAGMENT_SUBTYPE_PRO){
|
||||||
|
// $this->_rspErr(1,'param error (type)');
|
||||||
|
// return ;
|
||||||
|
// }
|
||||||
|
// $itemNum = Bag::getItemCount($param);
|
||||||
|
// if ($itemNum < 1){
|
||||||
|
// $this->_rspErr(1,'Insufficient quantity '.$param);
|
||||||
|
// return ;
|
||||||
|
// }
|
||||||
|
$decItems = array();
|
||||||
|
array_push($decItems,$param);
|
||||||
|
foreach ($paramArr as $val){
|
||||||
|
$this->_verificationFragment($val,\mt\Item::FRAGMENT_TYPE,\mt\Item::HERO_FRAGMENT_SUBTYPE);
|
||||||
|
array_push($decItems,$val);
|
||||||
|
}
|
||||||
|
$costItems = array(
|
||||||
|
array(
|
||||||
|
'item_id' => V_ITEM_GOLD,
|
||||||
|
'item_num' => $mint
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$lackItem = null;
|
||||||
|
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
||||||
|
$this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
||||||
|
return;
|
||||||
|
}
|
||||||
//销毁碎片
|
//销毁碎片
|
||||||
$params =array();
|
foreach ($decItems as $item){
|
||||||
foreach ($token_id_arr as $val){
|
Bag::decItem($item,1);
|
||||||
array_push($params,array(
|
|
||||||
'unique_id'=>null,
|
|
||||||
'token_id'=>$val,
|
|
||||||
));
|
|
||||||
// Fragment::deleteFragment(['token_id'=>$val]);
|
|
||||||
}
|
|
||||||
{
|
|
||||||
//埋点
|
|
||||||
$event = [
|
|
||||||
'name' => LogService::FRAGMENT_SYNTH_MATERIAL,
|
|
||||||
];
|
|
||||||
|
|
||||||
LogService::ConsumableMaterial($event,$params);
|
|
||||||
}
|
|
||||||
// $this->_decItems($costItems);
|
|
||||||
//生成NFT英雄
|
|
||||||
// $tokenid = Nft::addNft($itemMeta);
|
|
||||||
{
|
|
||||||
//埋点
|
|
||||||
$nftDb = Nft::getNft($tokenid);
|
|
||||||
$event = array(
|
|
||||||
'name' => LogService::HERO_FRAGMENT,
|
|
||||||
'val' => mt\Parameter::getByName('jigsaw_merge_h_price')['param_value']
|
|
||||||
);
|
|
||||||
LogService::fragmentSynth($event,$nftDb);
|
|
||||||
}
|
}
|
||||||
|
$this->_decItems($costItems);
|
||||||
|
//生成英雄
|
||||||
|
Hero::addHero($itemMeta);
|
||||||
$propertyChgService = new services\PropertyChgService();
|
$propertyChgService = new services\PropertyChgService();
|
||||||
$propertyChgService->addUserChg();
|
$propertyChgService->addUserChg();
|
||||||
$propertyChgService->addFragment();
|
$propertyChgService->addBagChg();
|
||||||
$propertyChgService->addHeroChg();
|
$propertyChgService->addHeroChg();
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'property_chg' => $propertyChgService->toDto(),
|
'property_chg' => $propertyChgService->toDto(),
|
||||||
@ -176,65 +183,35 @@ class FragmentController extends BaseAuthedController
|
|||||||
));
|
));
|
||||||
}else{
|
}else{
|
||||||
//随机合成英雄
|
//随机合成英雄
|
||||||
$token_id_arr = array();
|
$decItems = array();
|
||||||
foreach ($unique_id_arr as $val){
|
foreach ($paramArr as $val){
|
||||||
$fragmentDb = Fragment::getFragmentByIdx($val);
|
$this->_verificationFragment($val,\mt\Item::FRAGMENT_TYPE,\mt\Item::HERO_FRAGMENT_SUBTYPE);
|
||||||
if (!$fragmentDb){
|
array_push($decItems,$val);
|
||||||
$this->_rspErr(1,'unique_id param error');
|
}
|
||||||
return ;
|
$costItems = array(
|
||||||
}
|
array(
|
||||||
if ($fragmentDb['type'] != 1){
|
'item_id' => V_ITEM_GOLD,
|
||||||
$this->_rspErr(1,'unique_id param error(type)');
|
'item_num' => $mint
|
||||||
return ;
|
)
|
||||||
}
|
);
|
||||||
array_push($token_id_arr,$fragmentDb['token_id']);
|
$lackItem = null;
|
||||||
|
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
||||||
|
$this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// $costItems = array(
|
|
||||||
// array(
|
|
||||||
// 'item_id' => V_ITEM_DIAMOND,
|
|
||||||
// 'item_num' => \services\FormulaService::Hero_Parts_Synthetic_Cost()
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
// $lackItem = null;
|
|
||||||
// if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
|
||||||
// $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//销毁碎片
|
//销毁碎片
|
||||||
$params =array();
|
foreach ($decItems as $item){
|
||||||
foreach ($token_id_arr as $val){
|
Bag::decItem($item,1);
|
||||||
array_push($params,array(
|
|
||||||
'unique_id'=>null,
|
|
||||||
'token_id'=>$val,
|
|
||||||
));
|
|
||||||
// Fragment::deleteFragment(['token_id'=>$val]);
|
|
||||||
}
|
}
|
||||||
{
|
$this->_decItems($costItems);
|
||||||
//埋点
|
|
||||||
$event = [
|
|
||||||
'name' => LogService::FRAGMENT_SYNTH_MATERIAL,
|
|
||||||
];
|
|
||||||
|
|
||||||
LogService::ConsumableMaterial($event,$params);
|
|
||||||
}
|
|
||||||
// $this->_decItems($costItems);
|
|
||||||
$itemMetaList = mt\Item::getMetaListByType(mt\Item::HERO_TYPE);
|
$itemMetaList = mt\Item::getMetaListByType(mt\Item::HERO_TYPE);
|
||||||
$key = rand(0,count($itemMetaList)-1);
|
$key = rand(0,count($itemMetaList)-1);
|
||||||
$itemMeta = $itemMetaList[$key];
|
$itemMeta = $itemMetaList[$key];
|
||||||
//生成NFT英雄
|
//生成英雄
|
||||||
// $tokenid = Nft::addNft($itemMeta);
|
Hero::addHero($itemMeta);
|
||||||
{
|
|
||||||
//埋点
|
|
||||||
$nftDb = Nft::getNft($tokenid);
|
|
||||||
$event = array(
|
|
||||||
'name' => LogService::HERO_FRAGMENT,
|
|
||||||
'val' => mt\Parameter::getByName('jigsaw_merge_h_price')['param_value']
|
|
||||||
);
|
|
||||||
LogService::fragmentSynth($event,$nftDb);
|
|
||||||
}
|
|
||||||
$propertyChgService = new services\PropertyChgService();
|
$propertyChgService = new services\PropertyChgService();
|
||||||
$propertyChgService->addUserChg();
|
$propertyChgService->addUserChg();
|
||||||
$propertyChgService->addFragment();
|
$propertyChgService->addBagChg();
|
||||||
$propertyChgService->addHeroChg();
|
$propertyChgService->addHeroChg();
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'property_chg' => $propertyChgService->toDto(),
|
'property_chg' => $propertyChgService->toDto(),
|
||||||
@ -245,146 +222,84 @@ class FragmentController extends BaseAuthedController
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
if ($unique_id_special){
|
$meta = mt\Parameter::getByName('jigsaw_merge_w_price');
|
||||||
|
$mint = $meta ? $meta['param_value'] : 30;
|
||||||
|
if ($param){
|
||||||
//指定合成枪械
|
//指定合成枪械
|
||||||
$itemMeta = mt\Item::get($item_id);
|
$itemMeta = mt\Item::get($item_id);
|
||||||
if (!$itemMeta){
|
if (!$itemMeta){
|
||||||
$this->_rspErr(1,'item_id param error');
|
$this->_rspErr(1,'item_id param error');
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
$fragmentDbSpecial = Fragment::getFragmentByIdx($unique_id_special);
|
if ($itemMeta['type'] != \mt\Item::GUN_TYPE){
|
||||||
if (!$fragmentDbSpecial){
|
$this->_rspErr(1,'item_id param error (type)');
|
||||||
$this->_rspErr(1,'unique_id_special param error');
|
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
if ($fragmentDbSpecial['type'] != 4){
|
|
||||||
$this->_rspErr(1,'unique_id_special param error(type)');
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
$token_id_arr = array();
|
|
||||||
array_push($token_id_arr,$fragmentDbSpecial['token_id']);
|
|
||||||
foreach ($unique_id_arr as $val){
|
|
||||||
$fragmentDb = Fragment::getFragmentByIdx($val);
|
|
||||||
if (!$fragmentDb){
|
|
||||||
$this->_rspErr(1,'unique_ids param error');
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
if ($fragmentDb['type'] != 2){
|
|
||||||
$this->_rspErr(1,'unique_ids param error(type)');
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
array_push($token_id_arr,$fragmentDb['token_id']);
|
|
||||||
}
|
|
||||||
// $costItems = array(
|
|
||||||
// array(
|
|
||||||
// 'item_id' => V_ITEM_DIAMOND,
|
|
||||||
// 'item_num' => \services\FormulaService::Weapon_Parts_Synthetic_Cost()
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
// $lackItem = null;
|
|
||||||
// if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
|
||||||
// $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//销毁碎片
|
|
||||||
$params = array();
|
|
||||||
foreach ($token_id_arr as $val){
|
|
||||||
array_push($params,array(
|
|
||||||
'unique_id'=>null,
|
|
||||||
'token_id'=>$val,
|
|
||||||
));
|
|
||||||
// Fragment::deleteFragment(['token_id'=>$val]);
|
|
||||||
}
|
|
||||||
{
|
|
||||||
//埋点
|
|
||||||
$event = [
|
|
||||||
'name' => LogService::FRAGMENT_SYNTH_MATERIAL,
|
|
||||||
];
|
|
||||||
|
|
||||||
LogService::ConsumableMaterial($event,$params);
|
$this->_verificationFragment($param,\mt\Item::FRAGMENT_TYPE,\mt\Item::GUN_FRAGMENT_SUBTYPE_PRO);
|
||||||
|
$decItems = array();
|
||||||
|
array_push($decItems,$param);
|
||||||
|
foreach ($paramArr as $val){
|
||||||
|
$this->_verificationFragment($val,\mt\Item::FRAGMENT_TYPE,\mt\Item::GUN_FRAGMENT_SUBTYPE);
|
||||||
|
array_push($decItems,$val);
|
||||||
}
|
}
|
||||||
// $this->_decItems($costItems);
|
$costItems = array(
|
||||||
//生成NFT英雄
|
array(
|
||||||
// $tokenid = Nft::addNft($itemMeta);
|
'item_id' => V_ITEM_GOLD,
|
||||||
{
|
'item_num' => $mint
|
||||||
//埋点
|
)
|
||||||
$nftDb = Nft::getNft($tokenid);
|
);
|
||||||
$event = array(
|
$lackItem = null;
|
||||||
'name' => LogService::GUN_FRAGMENT,
|
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
||||||
'val' => mt\Parameter::getByName('jigsaw_merge_w_price')['param_value']
|
$this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
||||||
);
|
return;
|
||||||
LogService::fragmentSynth($event,$nftDb);
|
|
||||||
}
|
}
|
||||||
|
//销毁碎片
|
||||||
|
foreach ($decItems as $item){
|
||||||
|
Bag::decItem($item,1);
|
||||||
|
}
|
||||||
|
$this->_decItems($costItems);
|
||||||
|
//生成武器
|
||||||
|
Gun::addGun($itemMeta);
|
||||||
$propertyChgService = new services\PropertyChgService();
|
$propertyChgService = new services\PropertyChgService();
|
||||||
$propertyChgService->addUserChg();
|
$propertyChgService->addUserChg();
|
||||||
$propertyChgService->addFragment();
|
$propertyChgService->addBagChg();
|
||||||
$propertyChgService->addGunChg();
|
$propertyChgService->addGunChg();
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'property_chg' => $propertyChgService->toDto(),
|
'property_chg' => $propertyChgService->toDto(),
|
||||||
'item_id' => $itemMeta['id']
|
'item_id' => $itemMeta['id']
|
||||||
));
|
));
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
//随机合成枪械
|
//随机合成枪械
|
||||||
$token_id_arr = array();
|
$decItems = array();
|
||||||
foreach ($unique_id_arr as $val){
|
foreach ($paramArr as $val){
|
||||||
$fragmentDb = Fragment::getFragmentByIdx($val);
|
$this->_verificationFragment($val,\mt\Item::FRAGMENT_TYPE,\mt\Item::GUN_FRAGMENT_SUBTYPE);
|
||||||
if (!$fragmentDb){
|
array_push($decItems,$val);
|
||||||
$this->_rspErr(1,'unique_id param error');
|
}
|
||||||
return ;
|
$costItems = array(
|
||||||
}
|
array(
|
||||||
if ($fragmentDb['type'] != 2){
|
'item_id' => V_ITEM_GOLD,
|
||||||
$this->_rspErr(1,'unique_id param error(type)');
|
'item_num' => $mint
|
||||||
return ;
|
)
|
||||||
}
|
);
|
||||||
array_push($token_id_arr,$fragmentDb['token_id']);
|
$lackItem = null;
|
||||||
|
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
||||||
|
$this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// $costItems = array(
|
|
||||||
// array(
|
|
||||||
// 'item_id' => V_ITEM_DIAMOND,
|
|
||||||
// 'item_num' => \services\FormulaService::Weapon_Parts_Synthetic_Cost()
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
// $lackItem = null;
|
|
||||||
// if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
|
||||||
// $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//销毁碎片
|
//销毁碎片
|
||||||
$params = array();
|
foreach ($decItems as $item){
|
||||||
foreach ($token_id_arr as $val){
|
Bag::decItem($item,1);
|
||||||
array_push($params,array(
|
|
||||||
'unique_id'=>null,
|
|
||||||
'token_id'=>$val,
|
|
||||||
));
|
|
||||||
// Fragment::deleteFragment(['token_id'=>$val]);
|
|
||||||
}
|
}
|
||||||
{
|
$this->_decItems($costItems);
|
||||||
//埋点
|
|
||||||
$event = [
|
|
||||||
'name' => LogService::FRAGMENT_SYNTH_MATERIAL,
|
|
||||||
];
|
|
||||||
|
|
||||||
LogService::ConsumableMaterial($event,$params);
|
|
||||||
}
|
|
||||||
// $this->_decItems($costItems);
|
|
||||||
$itemMetaList = mt\Item::getMetaListByType(mt\Item::GUN_TYPE);
|
$itemMetaList = mt\Item::getMetaListByType(mt\Item::GUN_TYPE);
|
||||||
$key = rand(0,count($itemMetaList)-1);
|
$key = rand(0,count($itemMetaList)-1);
|
||||||
$itemMeta = $itemMetaList[$key];
|
$itemMeta = $itemMetaList[$key];
|
||||||
//生成NFT英雄
|
//生成枪械
|
||||||
// $tokenid = Nft::addNft($itemMeta);
|
Gun::addGun($itemMeta);
|
||||||
{
|
|
||||||
//埋点
|
|
||||||
$nftDb = Nft::getNft($tokenid);
|
|
||||||
$event = array(
|
|
||||||
'name' => LogService::GUN_FRAGMENT,
|
|
||||||
'val' => mt\Parameter::getByName('jigsaw_merge_w_price')['param_value']
|
|
||||||
);
|
|
||||||
LogService::fragmentSynth($event,$nftDb);
|
|
||||||
}
|
|
||||||
$propertyChgService = new services\PropertyChgService();
|
$propertyChgService = new services\PropertyChgService();
|
||||||
$propertyChgService->addUserChg();
|
$propertyChgService->addUserChg();
|
||||||
$propertyChgService->addFragment();
|
$propertyChgService->addBagChg();
|
||||||
$propertyChgService->addGunChg();
|
$propertyChgService->addGunChg();
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'property_chg' => $propertyChgService->toDto(),
|
'property_chg' => $propertyChgService->toDto(),
|
||||||
|
@ -104,10 +104,14 @@ class Item {
|
|||||||
const WEEKLY_BUY_LIMIT = 2;
|
const WEEKLY_BUY_LIMIT = 2;
|
||||||
const TOTAL_BUY_LIMIT = 3;
|
const TOTAL_BUY_LIMIT = 3;
|
||||||
|
|
||||||
|
|
||||||
const ROLE_CHIP_SUBTYPE = 1;
|
const ROLE_CHIP_SUBTYPE = 1;
|
||||||
const GUN_CHIP_SUBTYPE = 2;
|
const GUN_CHIP_SUBTYPE = 2;
|
||||||
|
|
||||||
|
const HERO_FRAGMENT_SUBTYPE = 1;
|
||||||
|
const HERO_FRAGMENT_SUBTYPE_PRO = 3;
|
||||||
|
const GUN_FRAGMENT_SUBTYPE = 2;
|
||||||
|
const GUN_FRAGMENT_SUBTYPE_PRO = 4;
|
||||||
|
|
||||||
|
|
||||||
public static function get($id)
|
public static function get($id)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user