This commit is contained in:
hujiabin 2022-10-27 17:49:57 +08:00
parent 56979d8e7d
commit f551f6db00

View File

@ -268,13 +268,26 @@ class BagController extends BaseAuthedController {
$this->_rspErr(1, "only supported rename card");
return;
}
$costItems= array(
array(
'item_id' => V_ITEM_GOLD,
'item_num' => $itemMeta['gold']
)
);
$lackItem = null;
if (!$this->_hasEnoughItems($costItems, $lackItem)) {
$this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));
return;
}
$items = array(
array(
'item_id' => $itemId,
'item_num' => 1
)
);
$this->_decItems($costItems);
$this->_addItems($items, $this->awardService, $this->propertyChgService);
$this->propertyChgService->addUserChg();
$this->propertyChgService->addBagChg();
$this->_rspData(array(
'award' => $this->awardService->toDto(),