|
@@ -96,11 +96,16 @@ class StoreProc {
|
|
|
$pId = $pList[$rand];
|
|
|
ctx()->store->gemStore->$uid->predicateId = $pId;
|
|
|
|
|
|
- ctx()->store->items->$xilianStoneId -= $needStone;
|
|
|
+ ctx()->store->removeItem($xilianStoneId, $needStone);
|
|
|
+ $xilianStoneNum = 0;
|
|
|
+ if(StlUtil::dictHasProperty(ctx()->store->items, $xilianStoneId)){
|
|
|
+ $xilianStoneNum = ctx()->store->items->$xilianStoneId;
|
|
|
+ }
|
|
|
|
|
|
UserProc::updateUserInfo();
|
|
|
return Resp::ok(array(
|
|
|
- 'items' => ctx()->store->items,
|
|
|
+ 'xilianStoneId' => $xilianStoneId,
|
|
|
+ 'xilianStone' => $xilianStoneNum,
|
|
|
'predicateId' => $pId,
|
|
|
));
|
|
|
}
|