1
This commit is contained in:
commit
a539067091
@ -55,7 +55,9 @@ class FragmentController extends BaseAuthedController
|
||||
foreach ($itemMetaList as $meta){
|
||||
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(
|
||||
'list' => $hero,
|
||||
'mint' => $mint
|
||||
@ -69,7 +71,9 @@ class FragmentController extends BaseAuthedController
|
||||
foreach ($itemMetaList as $meta){
|
||||
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(
|
||||
'list' => $gun,
|
||||
'mint' => $mint
|
||||
@ -127,22 +131,22 @@ class FragmentController extends BaseAuthedController
|
||||
}
|
||||
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;
|
||||
}
|
||||
// $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;
|
||||
// }
|
||||
//销毁碎片
|
||||
foreach ($token_id_arr as $val){
|
||||
Fragment::deleteFragment(['token_id'=>$val]);
|
||||
}
|
||||
$this->_decItems($costItems);
|
||||
// $this->_decItems($costItems);
|
||||
//生成NFT英雄
|
||||
Nft::addNft($itemMeta);
|
||||
$propertyChgService = new services\PropertyChgService();
|
||||
@ -168,22 +172,22 @@ class FragmentController extends BaseAuthedController
|
||||
}
|
||||
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;
|
||||
}
|
||||
// $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;
|
||||
// }
|
||||
//销毁碎片
|
||||
foreach ($token_id_arr as $val){
|
||||
Fragment::deleteFragment(['token_id'=>$val]);
|
||||
}
|
||||
$this->_decItems($costItems);
|
||||
// $this->_decItems($costItems);
|
||||
$itemMetaList = mt\Item::getMetaListByType(mt\Item::HERO_TYPE);
|
||||
$key = rand(0,count($itemMetaList)-1);
|
||||
$itemMeta = $itemMetaList[$key];
|
||||
@ -232,22 +236,22 @@ class FragmentController extends BaseAuthedController
|
||||
}
|
||||
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;
|
||||
}
|
||||
// $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;
|
||||
// }
|
||||
//销毁碎片
|
||||
foreach ($token_id_arr as $val){
|
||||
Fragment::deleteFragment(['token_id'=>$val]);
|
||||
}
|
||||
$this->_decItems($costItems);
|
||||
// $this->_decItems($costItems);
|
||||
//生成NFT英雄
|
||||
Nft::addNft($itemMeta);
|
||||
$propertyChgService = new services\PropertyChgService();
|
||||
@ -274,22 +278,22 @@ class FragmentController extends BaseAuthedController
|
||||
}
|
||||
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;
|
||||
}
|
||||
// $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;
|
||||
// }
|
||||
//销毁碎片
|
||||
foreach ($token_id_arr as $val){
|
||||
Fragment::deleteFragment(['token_id'=>$val]);
|
||||
}
|
||||
$this->_decItems($costItems);
|
||||
// $this->_decItems($costItems);
|
||||
$itemMetaList = mt\Item::getMetaListByType(mt\Item::GUN_TYPE);
|
||||
$key = rand(0,count($itemMetaList)-1);
|
||||
$itemMeta = $itemMetaList[$key];
|
||||
|
Loading…
x
Reference in New Issue
Block a user