Эх сурвалжийг харах

套装来源跳转抽奖服装店

zhaoyang 3 жил өмнө
parent
commit
7cda31d089

+ 15 - 1
GameClient/Assets/Game/HotUpdate/ExcelConfig/Manager/ClothingShopCfgManager.cs

@@ -33,7 +33,6 @@ namespace GFGGame
             {
             {
                 case ConstStoreId.CLOTHING_STORE_ID:
                 case ConstStoreId.CLOTHING_STORE_ID:
                     return ShopCfgClothingArray.Instance.GetCfg(buyId);
                     return ShopCfgClothingArray.Instance.GetCfg(buyId);
-
                 case ConstStoreId.LUCKY_BOX_STORE_ID:
                 case ConstStoreId.LUCKY_BOX_STORE_ID:
 
 
                     return ShopCfgCJArray.Instance.GetCfg(buyId);
                     return ShopCfgCJArray.Instance.GetCfg(buyId);
@@ -42,6 +41,21 @@ namespace GFGGame
             }
             }
             return null;
             return null;
         }
         }
+        public ShopCfg[] GetShopCfgs(int shopType)
+        {
+            switch (shopType)
+            {
+                case ConstStoreId.CLOTHING_STORE_ID:
+                    return ShopCfgClothingArray.Instance.dataArray;
+
+                case ConstStoreId.LUCKY_BOX_STORE_ID:
+
+                    return ShopCfgCJArray.Instance.dataArray;
+                case ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID:
+                    return ShopCfgCJAArray.Instance.dataArray;
+            }
+            return null;
+        }
 
 
         public void GetMoneyIdAndNum(int buyId, int count, int shopType, out int costId, out int costNum, out int buyNum)
         public void GetMoneyIdAndNum(int buyId, int count, int shopType, out int costId, out int costNum, out int buyNum)
         {
         {

+ 7 - 4
GameClient/Assets/Game/HotUpdate/Views/ClothingShop/ClothingShopView.cs

@@ -121,15 +121,15 @@ namespace GFGGame
                 {
                 {
                     _selectedItemId = (int)objs[2];//从物品来源面板跳转到商店,需要物品id方便打开界面时做选中处理
                     _selectedItemId = (int)objs[2];//从物品来源面板跳转到商店,需要物品id方便打开界面时做选中处理
                     _selectedItemCount = (int)objs[3];
                     _selectedItemCount = (int)objs[3];
-                    ShopCfg[] dataArray = ShopCfgClothingArray.Instance.dataArray;
+                    ShopCfg[] dataArray = ClothingShopCfgManager.Instance.GetShopCfgs(_storeId);
                     for (int i = 0; i < dataArray.Length; i++)
                     for (int i = 0; i < dataArray.Length; i++)
                     {
                     {
                         if (dataArray[i].itemID == _selectedItemId)
                         if (dataArray[i].itemID == _selectedItemId)
                         {
                         {
                             _selectedType = dataArray[i].typeIndex;
                             _selectedType = dataArray[i].typeIndex;
                             _selectedItemClothingId = dataArray[i].id;
                             _selectedItemClothingId = dataArray[i].id;
-                            ShopCfg clothingShopCfg = ShopCfgClothingArray.Instance.GetCfg(_selectedItemClothingId);
-                            _ui.m_listType.selectedIndex = clothingShopCfg.typeIndex;
+                            // ShopCfg clothingShopCfg = ShopCfgClothingArray.Instance.GetCfg(_selectedItemClothingId);
+                            _ui.m_listType.selectedIndex = _selectedType;
                             break;
                             break;
                         }
                         }
                     }
                     }
@@ -272,7 +272,7 @@ namespace GFGGame
 
 
             if (_ui.m_listShop.numItems > 0)
             if (_ui.m_listShop.numItems > 0)
             {
             {
-                ShopCfg clothingShopCfg = ShopCfgClothingArray.Instance.GetCfg(_selectedItemClothingId);
+                ShopCfg clothingShopCfg = ClothingShopCfgManager.Instance.GetShopCfg(_selectedItemClothingId, _storeId);//  ShopCfgClothingArray.Instance.GetCfg(_selectedItemClothingId);
                 int itemIndex = 0;
                 int itemIndex = 0;
                 if (_selectedItemId > 0 && clothingShopCfg != null)
                 if (_selectedItemId > 0 && clothingShopCfg != null)
                 {
                 {
@@ -373,5 +373,8 @@ namespace GFGGame
 
 
             GuideController.TryGuide(_ui.m_btnBack, ConstGuideId.BUY_CLOTHING, 6, "回到换装", -1, true, 140);
             GuideController.TryGuide(_ui.m_btnBack, ConstGuideId.BUY_CLOTHING, 6, "回到换装", -1, true, 140);
         }
         }
+
+
+
     }
     }
 }
 }