1
This commit is contained in:
commit
a539067091
@ -55,7 +55,9 @@ class FragmentController extends BaseAuthedController
|
|||||||
foreach ($itemMetaList as $meta){
|
foreach ($itemMetaList as $meta){
|
||||||
array_push($hero,$meta['id']);
|
array_push($hero,$meta['id']);
|
||||||
}
|
}
|
||||||
$mint = strval(\services\FormulaService::Hero_Parts_Synthetic_Cost());
|
// $mint = strval(\services\FormulaService::Hero_Parts_Synthetic_Cost());
|
||||||
|
$meta = mt\Parameter::getByName('jigsaw_merge_h_price');
|
||||||
|
$mint = $meta ? $meta['param_value'] : 100;
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'list' => $hero,
|
'list' => $hero,
|
||||||
'mint' => $mint
|
'mint' => $mint
|
||||||
@ -69,7 +71,9 @@ class FragmentController extends BaseAuthedController
|
|||||||
foreach ($itemMetaList as $meta){
|
foreach ($itemMetaList as $meta){
|
||||||
array_push($gun,$meta['id']);
|
array_push($gun,$meta['id']);
|
||||||
}
|
}
|
||||||
$mint = strval(\services\FormulaService::Weapon_Parts_Synthetic_Cost());
|
// $mint = strval(\services\FormulaService::Weapon_Parts_Synthetic_Cost());
|
||||||
|
$meta = mt\Parameter::getByName('jigsaw_merge_w_price');
|
||||||
|
$mint = $meta ? $meta['param_value'] : 30;
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'list' => $gun,
|
'list' => $gun,
|
||||||
'mint' => $mint
|
'mint' => $mint
|
||||||
@ -127,22 +131,22 @@ class FragmentController extends BaseAuthedController
|
|||||||
}
|
}
|
||||||
array_push($token_id_arr,$fragmentDb['token_id']);
|
array_push($token_id_arr,$fragmentDb['token_id']);
|
||||||
}
|
}
|
||||||
$costItems = array(
|
// $costItems = array(
|
||||||
array(
|
// array(
|
||||||
'item_id' => V_ITEM_DIAMOND,
|
// 'item_id' => V_ITEM_DIAMOND,
|
||||||
'item_num' => \services\FormulaService::Hero_Parts_Synthetic_Cost()
|
// 'item_num' => \services\FormulaService::Hero_Parts_Synthetic_Cost()
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
$lackItem = null;
|
// $lackItem = null;
|
||||||
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
// if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
||||||
$this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
// $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
//销毁碎片
|
//销毁碎片
|
||||||
foreach ($token_id_arr as $val){
|
foreach ($token_id_arr as $val){
|
||||||
Fragment::deleteFragment(['token_id'=>$val]);
|
Fragment::deleteFragment(['token_id'=>$val]);
|
||||||
}
|
}
|
||||||
$this->_decItems($costItems);
|
// $this->_decItems($costItems);
|
||||||
//生成NFT英雄
|
//生成NFT英雄
|
||||||
Nft::addNft($itemMeta);
|
Nft::addNft($itemMeta);
|
||||||
$propertyChgService = new services\PropertyChgService();
|
$propertyChgService = new services\PropertyChgService();
|
||||||
@ -168,22 +172,22 @@ class FragmentController extends BaseAuthedController
|
|||||||
}
|
}
|
||||||
array_push($token_id_arr,$fragmentDb['token_id']);
|
array_push($token_id_arr,$fragmentDb['token_id']);
|
||||||
}
|
}
|
||||||
$costItems = array(
|
// $costItems = array(
|
||||||
array(
|
// array(
|
||||||
'item_id' => V_ITEM_DIAMOND,
|
// 'item_id' => V_ITEM_DIAMOND,
|
||||||
'item_num' => \services\FormulaService::Hero_Parts_Synthetic_Cost()
|
// 'item_num' => \services\FormulaService::Hero_Parts_Synthetic_Cost()
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
$lackItem = null;
|
// $lackItem = null;
|
||||||
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
// if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
||||||
$this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
// $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
//销毁碎片
|
//销毁碎片
|
||||||
foreach ($token_id_arr as $val){
|
foreach ($token_id_arr as $val){
|
||||||
Fragment::deleteFragment(['token_id'=>$val]);
|
Fragment::deleteFragment(['token_id'=>$val]);
|
||||||
}
|
}
|
||||||
$this->_decItems($costItems);
|
// $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];
|
||||||
@ -232,22 +236,22 @@ class FragmentController extends BaseAuthedController
|
|||||||
}
|
}
|
||||||
array_push($token_id_arr,$fragmentDb['token_id']);
|
array_push($token_id_arr,$fragmentDb['token_id']);
|
||||||
}
|
}
|
||||||
$costItems = array(
|
// $costItems = array(
|
||||||
array(
|
// array(
|
||||||
'item_id' => V_ITEM_DIAMOND,
|
// 'item_id' => V_ITEM_DIAMOND,
|
||||||
'item_num' => \services\FormulaService::Weapon_Parts_Synthetic_Cost()
|
// 'item_num' => \services\FormulaService::Weapon_Parts_Synthetic_Cost()
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
$lackItem = null;
|
// $lackItem = null;
|
||||||
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
// if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
||||||
$this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
// $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
//销毁碎片
|
//销毁碎片
|
||||||
foreach ($token_id_arr as $val){
|
foreach ($token_id_arr as $val){
|
||||||
Fragment::deleteFragment(['token_id'=>$val]);
|
Fragment::deleteFragment(['token_id'=>$val]);
|
||||||
}
|
}
|
||||||
$this->_decItems($costItems);
|
// $this->_decItems($costItems);
|
||||||
//生成NFT英雄
|
//生成NFT英雄
|
||||||
Nft::addNft($itemMeta);
|
Nft::addNft($itemMeta);
|
||||||
$propertyChgService = new services\PropertyChgService();
|
$propertyChgService = new services\PropertyChgService();
|
||||||
@ -274,22 +278,22 @@ class FragmentController extends BaseAuthedController
|
|||||||
}
|
}
|
||||||
array_push($token_id_arr,$fragmentDb['token_id']);
|
array_push($token_id_arr,$fragmentDb['token_id']);
|
||||||
}
|
}
|
||||||
$costItems = array(
|
// $costItems = array(
|
||||||
array(
|
// array(
|
||||||
'item_id' => V_ITEM_DIAMOND,
|
// 'item_id' => V_ITEM_DIAMOND,
|
||||||
'item_num' => \services\FormulaService::Weapon_Parts_Synthetic_Cost()
|
// 'item_num' => \services\FormulaService::Weapon_Parts_Synthetic_Cost()
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
$lackItem = null;
|
// $lackItem = null;
|
||||||
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
// if (!$this->_hasEnoughItems($costItems, $lackItem)) {
|
||||||
$this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
// $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
//销毁碎片
|
//销毁碎片
|
||||||
foreach ($token_id_arr as $val){
|
foreach ($token_id_arr as $val){
|
||||||
Fragment::deleteFragment(['token_id'=>$val]);
|
Fragment::deleteFragment(['token_id'=>$val]);
|
||||||
}
|
}
|
||||||
$this->_decItems($costItems);
|
// $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];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user