cyzhao 11 месяцев назад
Родитель
Сommit
dbc1efd45a

+ 0 - 6
Gameserver/App/model/User/Info_UserBase.php

@@ -108,12 +108,6 @@ class Info_UserBase extends Object_ext {
      */
     public $fRechargePriceReceived = 0;
 
-    /**
-     * 洗练石
-     * @var type
-     */
-    public $xilianStone = 0;
-
     public function initialize() {
 //        my_Assert(GameConfig::primordial_data(), "找不到账号初始化数据");         # 防御
         $this->gold = glc()->Init_Player_gold;

+ 7 - 2
Gameserver/App/process/StoreProc.php

@@ -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,
         ));
     }