1
This commit is contained in:
parent
56979d8e7d
commit
f551f6db00
@ -268,13 +268,26 @@ class BagController extends BaseAuthedController {
|
|||||||
$this->_rspErr(1, "only supported rename card");
|
$this->_rspErr(1, "only supported rename card");
|
||||||
return;
|
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(
|
$items = array(
|
||||||
array(
|
array(
|
||||||
'item_id' => $itemId,
|
'item_id' => $itemId,
|
||||||
'item_num' => 1
|
'item_num' => 1
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
$this->_decItems($costItems);
|
||||||
$this->_addItems($items, $this->awardService, $this->propertyChgService);
|
$this->_addItems($items, $this->awardService, $this->propertyChgService);
|
||||||
|
$this->propertyChgService->addUserChg();
|
||||||
$this->propertyChgService->addBagChg();
|
$this->propertyChgService->addBagChg();
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'award' => $this->awardService->toDto(),
|
'award' => $this->awardService->toDto(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user