1
This commit is contained in:
parent
ac88401051
commit
6ae266d81a
@ -330,17 +330,16 @@ class BagController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function openBox($itemDb,$itemMeta,$itemNum){
|
private function openBox($itemDb,$itemMeta,$itemNum){
|
||||||
|
|
||||||
$dropMeta = mt\Drop::get($itemMeta['drop']);
|
$dropMeta = mt\Drop::get($itemMeta['drop']);
|
||||||
if (!$dropMeta) {
|
if (!$dropMeta) {
|
||||||
$this->_rspErr(1, 'config error');
|
$this->_rspErr(1, 'config error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$costItems = array(
|
$costItems = mt\Item::getUseCostItems($itemMeta);
|
||||||
array(
|
foreach ($costItems as &$costItem){
|
||||||
"item_id" => V_ITEM_GOLD,
|
$costItem['item_num'] *= $itemNum;
|
||||||
"item_num" => $itemMeta['gold'] * $itemNum
|
}
|
||||||
)
|
|
||||||
);
|
|
||||||
$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));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user