cyzhao 3 年 前
コミット
b459e52361

+ 1 - 1
Gameserver/Amfphp/model/Const/GameConfig.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-11-09 11:52:04
+ // 日期: 2021-11-10 10:01:06
 ////////////////////
 
 /**

+ 12 - 9
Gameserver/Amfphp/process/StoreProc.php

@@ -74,7 +74,7 @@ class StoreProc {
             case CmdCode::cmd_store_GemRemove:
                 return StoreProc::GemRemoveYanLing();
             case CmdCode::cmd_store_unlockStore:
-                StoreProc::unlockStore();
+                return StoreProc::unlockStore();
             default:
                 Err(ErrCode::cmd_err);
         }
@@ -637,13 +637,16 @@ class StoreProc {
      * @return type
      */
     public static function AddMultiItemInStore($goodsStr, $src = 1, $mask = 0) {
-        $user = req()->userInfo->game;
-        $ary = explode(";", $goodsStr);
+        $user = req()->userInfo->game;    
+        $ary = explode(";", $goodsStr);       
+        $unlockNum = $user->privateState->expandNum * 5;      
+
         foreach ($ary as $value) {
             $val = explode(",", $value);
             $cid = "";
             my_Assert(count($val) > 1, "解析奖励字符串出错");
-            //my_Assert($user->privateState->currentId< GameConfig::expandStoreNum_getItem($user->privateState->expandNum)->expandNum+50, "背包容量不够请扩容");
+            my_Assert($user->privateState->currentId< $unlockNum + 50, "背包容量不够请扩容");
+            
             list( $itemId, $num) = $val;                                        # ID, 数量
             $smItem = GameConfig::item_base_getItem($itemId);                   # 道具mo
             switch ($smItem->subType) {                                         # 根据类型分别添加到容器中
@@ -885,11 +888,11 @@ class StoreProc {
         } else {                                                                # 如果仓库中没有这种元素,则其数目置为num
             $items->$itemId = $num;
         }
-
-//        if (!CommUtil::isPropertyExists(req()->userInfo->game->privateState, "currentId")) {
-//            req()->userInfo->game->privateState->currentId = 1;
-//        }
-//        req()->userInfo->game->privateState->currentId++;
+        
+        if (!CommUtil::isPropertyExists(req()->userInfo->game->privateState, "currentId")) {          
+            req()->userInfo->game->privateState->currentId = 1;
+        }
+        req()->userInfo->game->privateState->currentId++;
     }
 
     /**