浏览代码

整理服装店

zhaoyang 2 年之前
父节点
当前提交
67dd2e9b27
共有 26 个文件被更改,包括 744 次插入727 次删除
  1. 0 0
      FGUIProject/assets/Store/components/ComVipLv.xml
  2. 1 1
      FGUIProject/assets/Store/package.xml
  3. 3 4
      GameClient/Assets/Editor/Excel/ExcelChecker.cs
  4. 26 42
      GameClient/Assets/Editor/Excel/Scanner/ItemApproachScanner.cs
  5. 226 224
      GameClient/Assets/Editor/Excel/Scanner/ShopScanner.cs
  6. 8 8
      GameClient/Assets/Game/HotUpdate/Constant/ConstFunctionId.cs
  7. 18 0
      GameClient/Assets/Game/HotUpdate/Constant/ConstStoreSubId.cs
  8. 1 1
      GameClient/Assets/Game/HotUpdate/Constant/ConstStoreSubId.cs.meta
  9. 15 0
      GameClient/Assets/Game/HotUpdate/Constant/ConstStoreTabId.cs
  10. 11 0
      GameClient/Assets/Game/HotUpdate/Constant/ConstStoreTabId.cs.meta
  11. 1 1
      GameClient/Assets/Game/HotUpdate/Controller/GameController.cs
  12. 3 3
      GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs
  13. 331 6
      GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs
  14. 21 0
      GameClient/Assets/Game/HotUpdate/Data/ShopViewManager.cs
  15. 11 0
      GameClient/Assets/Game/HotUpdate/Data/ShopViewManager.cs.meta
  16. 0 266
      GameClient/Assets/Game/HotUpdate/Data/StoreDataManager.cs
  17. 0 103
      GameClient/Assets/Game/HotUpdate/ExcelConfig/Manager/ClothingShopCfgManager.cs
  18. 6 6
      GameClient/Assets/Game/HotUpdate/ServerProxy/RechargeSProxy.cs
  19. 25 25
      GameClient/Assets/Game/HotUpdate/Views/ClothingShop/ClothingShopView.cs
  20. 17 17
      GameClient/Assets/Game/HotUpdate/Views/ClothingShop/GalleryShopView.cs
  21. 10 10
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachView.cs
  22. 4 4
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyCountView.cs
  23. 1 1
      GameClient/Assets/Game/HotUpdate/Views/RechargeStore/ChargeStoreView.cs
  24. 4 4
      GameClient/Assets/Game/HotUpdate/Views/RechargeStore/GiftBagBuyView.cs
  25. 1 1
      GameClient/Assets/Game/HotUpdate/Views/RechargeStore/ItemExchangeView.cs
  26. 二进制
      GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes

+ 0 - 0
FGUIProject/assets/Store/ComVipLv.xml → FGUIProject/assets/Store/components/ComVipLv.xml


+ 1 - 1
FGUIProject/assets/Store/package.xml

@@ -129,7 +129,7 @@
     <image id="hhx91o" name="sc_zizhuan_6.png" path="/imagesExport/" exported="true"/>
     <component id="hhx91p" name="ProgressBar1.xml" path="/components/"/>
     <image id="hhx91q" name="sc_beijing.png" path="/imagesNew/" atlas="alone_npot"/>
-    <component id="hhx91r" name="ComVipLv.xml" path="/"/>
+    <component id="hhx91r" name="ComVipLv.xml" path="/components/"/>
     <component id="l500tb9" name="ChargeUI.xml" path="/" exported="true"/>
   </resources>
   <publish name="" path="../GameClient/Assets/ResIn/UI/Store" packageCount="2" genCode="true"/>

+ 3 - 4
GameClient/Assets/Editor/Excel/ExcelChecker.cs

@@ -119,12 +119,11 @@ namespace GFGEditor
 
         private static void CheckClothingShopCfg()
         {
-            ShopCfgClothingArray cfgArray = ShopCfgClothingArray.Instance;
-            ShopCfg[] dataArray = cfgArray.dataArray;
+            List<ShopCfg> dataArray = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.FU_ZHUANG_DIAN, ConstStoreSubId.FU_ZHUANG_DIAN);
             foreach (ShopCfg cfg in dataArray)
             {
-                CheckItemIdExist(cfg.itemID, "商城ClothingShopCfg.itemID");
-                CheckItemIdExist(cfg.costID, "商城ClothingShopCfg.costID");
+                CheckItemIdExist(cfg.itemId, "商城ClothingShopCfg.itemID");
+                CheckItemIdExist(cfg.costId, "商城ClothingShopCfg.costID");
             }
         }
 

+ 26 - 42
GameClient/Assets/Editor/Excel/Scanner/ItemApproachScanner.cs

@@ -126,35 +126,19 @@ namespace GFGEditor
         /// <returns></returns>
         private static string GetClothingShopApproach(int itemId)
         {
-            ShopCfgClothingArray manager = ShopCfgClothingArray.Instance;
-            ShopCfg[] dataArray = manager.dataArray;
+            List<ShopCfg> dataArray = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.FU_ZHUANG_DIAN, ConstStoreSubId.FU_ZHUANG_DIAN);
             foreach (ShopCfg cfg in dataArray)
             {
-                if (cfg.itemID == itemId)
+                if (cfg.itemId == itemId)
                 {
                     return "FU_ZHUANG_DIAN=" + ConstStoreId.CLOTHING_STORE_ID; ;
                 }
             }
-            ShopCfg[] shopCfgCJs = ShopCfgCJArray.Instance.dataArray;
-            foreach (ShopCfg cfg in shopCfgCJs)
-            {
-                if (cfg.itemID == itemId)
-                {
-                    return "FU_ZHUANG_DIAN=" + ConstStoreId.LUCKY_BOX_STORE_ID;
-                }
-            }
-            ShopCfg[] shopCfgCJAs = ShopCfgCJAArray.Instance.dataArray;
-            foreach (ShopCfg cfg in shopCfgCJAs)
-            {
-                if (cfg.itemID == itemId)
-                {
-                    return "FU_ZHUANG_DIAN=" + ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID;
-                }
-            }
-            ShopCfg[] shopCfgGallerys = ShopCfgGalleryArray.Instance.dataArray;
+
+            List<ShopCfg> shopCfgGallerys = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_EXCHANGE, ConstStoreSubId.STORE_EXCHANGE_GALLERY);
             foreach (ShopCfg cfg in shopCfgGallerys)
             {
-                if (cfg.itemID == itemId)
+                if (cfg.itemId == itemId)
                 {
                     return "FU_ZHUANG_DIAN=" + ConstStoreId.GALLERY_STORE_ID;
                 }
@@ -414,18 +398,18 @@ namespace GFGEditor
         /// <returns></returns>
         private static string CheckGiftBagApproach(int itemId)
         {
-            GiftBagCfgArray manager = GiftBagCfgArray.Instance;
-            GiftBagCfg[] dataArray = manager.dataArray;
-            for (int i = 0; i < dataArray.Length; i++)
-            {
-                for (int j = 0; j < dataArray[i].itemsArr.Length; j++)
-                {
-                    if (dataArray[i].itemsArr[j][0] == itemId)
-                    {
-                        return ConstFunctionId.SHOP_GIFT_BAG + "=1";
-                    }
-                }
-            }
+            // GiftBagCfgArray manager = GiftBagCfgArray.Instance;
+            // GiftBagCfg[] dataArray = manager.dataArray;
+            // for (int i = 0; i < dataArray.Length; i++)
+            // {
+            //     for (int j = 0; j < dataArray[i].itemsArr.Length; j++)
+            //     {
+            //         if (dataArray[i].itemsArr[j][0] == itemId)
+            //         {
+            //             return ConstFunctionId.SHOP_GIFT_BAG + "=1";
+            //         }
+            //     }
+            // }
             return null;
         }
         /// <summary>
@@ -435,15 +419,15 @@ namespace GFGEditor
         /// <returns></returns>
         private static string CheckShopExchangeApproach(int itemId)
         {
-            ShopExchangeCfgArray manager = ShopExchangeCfgArray.Instance;
-            ShopExchangeCfg[] dataArray = manager.dataArray;
-            for (int i = 0; i < dataArray.Length; i++)
-            {
-                if (dataArray[i].itemId == itemId)
-                {
-                    return ConstFunctionId.SHOP_EXCHANGE + "=2";
-                }
-            }
+            // ShopExchangeCfgArray manager = ShopExchangeCfgArray.Instance;
+            // ShopExchangeCfg[] dataArray = manager.dataArray;
+            // for (int i = 0; i < dataArray.Length; i++)
+            // {
+            //     if (dataArray[i].itemId == itemId)
+            //     {
+            //         return ConstFunctionId.SHOP_EXCHANGE + "=2";
+            //     }
+            // }
             return null;
         }
         /// <summary>

+ 226 - 224
GameClient/Assets/Editor/Excel/Scanner/ShopScanner.cs

@@ -15,26 +15,28 @@ namespace GFGEditor
         public static void StartScan()
         {
             WriteClothingShop();
-            WriteCJShop();
-            WriteCJAShop();
+            // WriteCJShop();
+            // WriteCJAShop();
             WriteGalleryShop();
         }
 
         public static void WriteClothingShop()
         {
+
             Dictionary<int, string> _typeIndexDic = new Dictionary<int, string>();
-            SQLiteHelper.Instance.OpenConnection();
             try
             {
+                List<ShopCfg> clothingShopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.FU_ZHUANG_DIAN, ConstStoreSubId.FU_ZHUANG_DIAN);
                 string typeIndex = "";
                 int itemId;
                 int id;
-                var reader = SQLiteHelper.Instance.ReadFullTable("ShopCfgClothingArray");
-                while (reader.Read())
+
+                int index = 0;
+                while (index < clothingShopCfgs.Count)
                 {
-                    typeIndex = reader["_typeIndex"].ToString();
-                    itemId = int.Parse(reader["_itemId"].ToString());
-                    id = int.Parse(reader["_id"].ToString());
+                    typeIndex = clothingShopCfgs[index].typeIndex.ToString();// reader["_typeIndex"].ToString();
+                    itemId = clothingShopCfgs[index].itemId;//  int.Parse(reader["_itemId"].ToString());
+                    id = clothingShopCfgs[index].id;// int.Parse(reader["_id"].ToString());
 
                     int count;
                     if (Array.IndexOf(_shopItemType, typeIndex) >= 0)
@@ -56,18 +58,18 @@ namespace GFGEditor
                         }
                     }
                     _typeIndexDic.Add(id, count.ToString());
+                    index++;
                 }
             }
-            catch (System.Exception e)
+            catch (Exception e)
             {
-                ET.Log.Error(e);
+                ET.Log.Error(e.ToString());
             }
             finally
             {
                 SQLiteHelper.Instance.CloseConnection();
             }
 
-
             SQLiteHelper.Instance.OpenConnection();
             try
             {
@@ -76,7 +78,7 @@ namespace GFGEditor
                 {
                     var names = new string[] { "typeIndex" };
                     var values = new string[] { "" + _typeIndexDic[key] };
-                    SQLiteHelper.Instance.UpdateValues(nameof(ShopCfgClothingArray), names, values, "id", key.ToString());
+                    SQLiteHelper.Instance.UpdateValues(nameof(ShopCfgArray), names, values, "id", key.ToString());
                 }
             }
             catch (Exception e)
@@ -92,228 +94,228 @@ namespace GFGEditor
 
         public static void WriteCJShop()
         {
-            Dictionary<int, string> _typeIndexDic = new Dictionary<int, string>();
-            SQLiteHelper.Instance.OpenConnection();
-            try
-            {
-                string typeIndex = "";
-                int itemId;
-                int id;
-                var reader = SQLiteHelper.Instance.ReadFullTable("ShopCfgCJArray");
-                while (reader.Read())
-                {
-                    typeIndex = reader["_typeIndex"].ToString();
-                    itemId = int.Parse(reader["_itemId"].ToString());
-                    id = int.Parse(reader["_id"].ToString());
-
-                    int count;
-                    if (Array.IndexOf(_shopItemType, typeIndex) >= 0)
-                    {
-                        count = Array.IndexOf(_shopItemType, typeIndex);
-                    }
-                    else
-                    {
-                        ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
-                        string itemType = ItemTypeCfgArray.Instance.GetCfg(itemCfg.subType).type.ToString();
-
-                        if (Array.IndexOf(_shopItemType, itemType) >= 0)
-                        {
-                            count = Array.IndexOf(_shopItemType, itemType);
-                        }
-                        else
-                        {
-                            count = _shopItemType.Length - 1;
-                        }
-                    }
-                    _typeIndexDic.Add(id, count.ToString());
-                }
-            }
-            catch (System.Exception e)
-            {
-                ET.Log.Error(e);
-            }
-            finally
-            {
-                SQLiteHelper.Instance.CloseConnection();
-            }
-
-
-            SQLiteHelper.Instance.OpenConnection();
-            try
-            {
-                ICollection keys = _typeIndexDic.Keys;
-                foreach (int key in keys)
-                {
-
-                    var names = new string[] { "typeIndex" };
-                    var values = new string[] { "" + _typeIndexDic[key] };
-                    SQLiteHelper.Instance.UpdateValues(nameof(ShopCfgCJArray), names, values, "id", key.ToString());
-                }
-            }
-            catch (Exception e)
-            {
-                ET.Log.Error(e.ToString());
-            }
-            finally
-            {
-                SQLiteHelper.Instance.CloseConnection();
-            }
+            // Dictionary<int, string> _typeIndexDic = new Dictionary<int, string>();
+            // SQLiteHelper.Instance.OpenConnection();
+            // try
+            // {
+            //     string typeIndex = "";
+            //     int itemId;
+            //     int id;
+            //     var reader = SQLiteHelper.Instance.ReadFullTable("ShopCfgCJArray");
+            //     while (reader.Read())
+            //     {
+            //         typeIndex = reader["_typeIndex"].ToString();
+            //         itemId = int.Parse(reader["_itemId"].ToString());
+            //         id = int.Parse(reader["_id"].ToString());
+
+            //         int count;
+            //         if (Array.IndexOf(_shopItemType, typeIndex) >= 0)
+            //         {
+            //             count = Array.IndexOf(_shopItemType, typeIndex);
+            //         }
+            //         else
+            //         {
+            //             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
+            //             string itemType = ItemTypeCfgArray.Instance.GetCfg(itemCfg.subType).type.ToString();
+
+            //             if (Array.IndexOf(_shopItemType, itemType) >= 0)
+            //             {
+            //                 count = Array.IndexOf(_shopItemType, itemType);
+            //             }
+            //             else
+            //             {
+            //                 count = _shopItemType.Length - 1;
+            //             }
+            //         }
+            //         _typeIndexDic.Add(id, count.ToString());
+            //     }
+            // }
+            // catch (System.Exception e)
+            // {
+            //     ET.Log.Error(e);
+            // }
+            // finally
+            // {
+            //     SQLiteHelper.Instance.CloseConnection();
+            // }
+
+
+            // SQLiteHelper.Instance.OpenConnection();
+            // try
+            // {
+            //     ICollection keys = _typeIndexDic.Keys;
+            //     foreach (int key in keys)
+            //     {
+
+            //         var names = new string[] { "typeIndex" };
+            //         var values = new string[] { "" + _typeIndexDic[key] };
+            //         SQLiteHelper.Instance.UpdateValues(nameof(ShopCfgCJArray), names, values, "id", key.ToString());
+            //     }
+            // }
+            // catch (Exception e)
+            // {
+            //     ET.Log.Error(e.ToString());
+            // }
+            // finally
+            // {
+            //     SQLiteHelper.Instance.CloseConnection();
+            // }
 
         }
 
         public static void WriteCJAShop()
         {
-            Dictionary<int, string> _typeIndexDic = new Dictionary<int, string>();
-
-            SQLiteHelper.Instance.OpenConnection();
-            try
-            {
-                string typeIndex = "";
-                int itemId;
-                int id;
-                var reader = SQLiteHelper.Instance.ReadFullTable("ShopCfgCJAArray");
-                while (reader.Read())
-                {
-                    typeIndex = reader["_typeIndex"].ToString();
-                    itemId = int.Parse(reader["_itemId"].ToString());
-                    id = int.Parse(reader["_id"].ToString());
-
-                    int count;
-                    if (Array.IndexOf(_shopItemType, typeIndex) >= 0)
-                    {
-                        count = Array.IndexOf(_shopItemType, typeIndex);
-                    }
-                    else
-                    {
-                        ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
-                        string itemType = ItemTypeCfgArray.Instance.GetCfg(itemCfg.subType).type.ToString();
-
-                        if (Array.IndexOf(_shopItemType, itemType) >= 0)
-                        {
-                            count = Array.IndexOf(_shopItemType, itemType);
-                        }
-                        else
-                        {
-                            count = _shopItemType.Length - 1;
-                        }
-                    }
-                    _typeIndexDic.Add(id, count.ToString());
-                }
-            }
-            catch (System.Exception e)
-            {
-                ET.Log.Error(e);
-            }
-            finally
-            {
-                SQLiteHelper.Instance.CloseConnection();
-            }
-
-
-            SQLiteHelper.Instance.OpenConnection();
-            try
-            {
-                ICollection keys = _typeIndexDic.Keys;
-                foreach (int key in keys)
-                {
-
-                    var names = new string[] { "typeIndex" };
-                    var values = new string[] { "" + _typeIndexDic[key] };
-                    SQLiteHelper.Instance.UpdateValues(nameof(ShopCfgCJAArray), names, values, "id", key.ToString());
-                }
-            }
-            catch (Exception e)
-            {
-                ET.Log.Error(e.ToString());
-            }
-            finally
-            {
-                SQLiteHelper.Instance.CloseConnection();
-            }
+            // Dictionary<int, string> _typeIndexDic = new Dictionary<int, string>();
+
+            // SQLiteHelper.Instance.OpenConnection();
+            // try
+            // {
+            //     string typeIndex = "";
+            //     int itemId;
+            //     int id;
+            //     var reader = SQLiteHelper.Instance.ReadFullTable("ShopCfgCJAArray");
+            //     while (reader.Read())
+            //     {
+            //         typeIndex = reader["_typeIndex"].ToString();
+            //         itemId = int.Parse(reader["_itemId"].ToString());
+            //         id = int.Parse(reader["_id"].ToString());
+
+            //         int count;
+            //         if (Array.IndexOf(_shopItemType, typeIndex) >= 0)
+            //         {
+            //             count = Array.IndexOf(_shopItemType, typeIndex);
+            //         }
+            //         else
+            //         {
+            //             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
+            //             string itemType = ItemTypeCfgArray.Instance.GetCfg(itemCfg.subType).type.ToString();
+
+            //             if (Array.IndexOf(_shopItemType, itemType) >= 0)
+            //             {
+            //                 count = Array.IndexOf(_shopItemType, itemType);
+            //             }
+            //             else
+            //             {
+            //                 count = _shopItemType.Length - 1;
+            //             }
+            //         }
+            //         _typeIndexDic.Add(id, count.ToString());
+            //     }
+            // }
+            // catch (System.Exception e)
+            // {
+            //     ET.Log.Error(e);
+            // }
+            // finally
+            // {
+            //     SQLiteHelper.Instance.CloseConnection();
+            // }
+
+
+            // SQLiteHelper.Instance.OpenConnection();
+            // try
+            // {
+            //     ICollection keys = _typeIndexDic.Keys;
+            //     foreach (int key in keys)
+            //     {
+
+            //         var names = new string[] { "typeIndex" };
+            //         var values = new string[] { "" + _typeIndexDic[key] };
+            //         SQLiteHelper.Instance.UpdateValues(nameof(ShopCfgCJAArray), names, values, "id", key.ToString());
+            //     }
+            // }
+            // catch (Exception e)
+            // {
+            //     ET.Log.Error(e.ToString());
+            // }
+            // finally
+            // {
+            //     SQLiteHelper.Instance.CloseConnection();
+            // }
         }
 
 
         public static void WriteGalleryShop()
         {
-            Dictionary<int, string> _typeIndexDic = new Dictionary<int, string>();
-
-            SQLiteHelper.Instance.OpenConnection();
-            try
-            {
-                string typeIndex = "";
-                int itemId;
-                int id;
-                var reader = SQLiteHelper.Instance.ReadFullTable("ShopCfgGalleryArray");
-                while (reader.Read())
-                {
-                    typeIndex = reader["_typeIndex"].ToString();
-                    itemId = int.Parse(reader["_itemId"].ToString());
-                    id = int.Parse(reader["_id"].ToString());
-
-                    int count = 2;
-
-                    ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
-
-                    if (itemCfg.itemType == ConstItemType.DRESS_UP)
-                    {
-                        if (itemCfg.subType == ConstDressUpItemType.BEI_JING)
-                        {
-                            count = 0;//背景
-                        }
-                        else
-                        {
-                            count = 2;//道具
-                        }
-                    }
-                    else if (itemCfg.itemType == ConstItemType.PHOTOGRAPH)
-                    {
-                        if (itemCfg.subType == ConstItemSubType.PHOTOGRAPH_NPC)
-                        {
-                            count = 1;//人物
-                        }
-                        else if (itemCfg.subType == ConstItemSubType.PHOTOGRAPH_BOREDR)
-                        {
-                            count = 3;//npc
-                        }
-                        else if (itemCfg.subType == ConstItemSubType.PHOTOGRAPH_EFFECT)
-                        {
-                            count = 4;//滤镜
-                        }
-                    }
-
-                    _typeIndexDic.Add(id, count.ToString());
-                }
-            }
-            catch (System.Exception e)
-            {
-                ET.Log.Error(e);
-            }
-            finally
-            {
-                SQLiteHelper.Instance.CloseConnection();
-            }
-
-
-            SQLiteHelper.Instance.OpenConnection();
-            try
-            {
-                ICollection keys = _typeIndexDic.Keys;
-                foreach (int key in keys)
-                {
-
-                    var names = new string[] { "typeIndex" };
-                    var values = new string[] { "" + _typeIndexDic[key] };
-                    SQLiteHelper.Instance.UpdateValues(nameof(ShopCfgGalleryArray), names, values, "id", key.ToString());
-                }
-            }
-            catch (Exception e)
-            {
-                ET.Log.Error(e.ToString());
-            }
-            finally
-            {
-                SQLiteHelper.Instance.CloseConnection();
-            }
+            // Dictionary<int, string> _typeIndexDic = new Dictionary<int, string>();
+
+            // SQLiteHelper.Instance.OpenConnection();
+            // try
+            // {
+            //     string typeIndex = "";
+            //     int itemId;
+            //     int id;
+            //     var reader = SQLiteHelper.Instance.ReadFullTable("ShopCfgGalleryArray");
+            //     while (reader.Read())
+            //     {
+            //         typeIndex = reader["_typeIndex"].ToString();
+            //         itemId = int.Parse(reader["_itemId"].ToString());
+            //         id = int.Parse(reader["_id"].ToString());
+
+            //         int count = 2;
+
+            //         ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
+
+            //         if (itemCfg.itemType == ConstItemType.DRESS_UP)
+            //         {
+            //             if (itemCfg.subType == ConstDressUpItemType.BEI_JING)
+            //             {
+            //                 count = 0;//背景
+            //             }
+            //             else
+            //             {
+            //                 count = 2;//道具
+            //             }
+            //         }
+            //         else if (itemCfg.itemType == ConstItemType.PHOTOGRAPH)
+            //         {
+            //             if (itemCfg.subType == ConstItemSubType.PHOTOGRAPH_NPC)
+            //             {
+            //                 count = 1;//人物
+            //             }
+            //             else if (itemCfg.subType == ConstItemSubType.PHOTOGRAPH_BOREDR)
+            //             {
+            //                 count = 3;//npc
+            //             }
+            //             else if (itemCfg.subType == ConstItemSubType.PHOTOGRAPH_EFFECT)
+            //             {
+            //                 count = 4;//滤镜
+            //             }
+            //         }
+
+            //         _typeIndexDic.Add(id, count.ToString());
+            //     }
+            // }
+            // catch (System.Exception e)
+            // {
+            //     ET.Log.Error(e);
+            // }
+            // finally
+            // {
+            //     SQLiteHelper.Instance.CloseConnection();
+            // }
+
+
+            // SQLiteHelper.Instance.OpenConnection();
+            // try
+            // {
+            //     ICollection keys = _typeIndexDic.Keys;
+            //     foreach (int key in keys)
+            //     {
+
+            //         var names = new string[] { "typeIndex" };
+            //         var values = new string[] { "" + _typeIndexDic[key] };
+            //         SQLiteHelper.Instance.UpdateValues(nameof(ShopCfgGalleryArray), names, values, "id", key.ToString());
+            //     }
+            // }
+            // catch (Exception e)
+            // {
+            //     ET.Log.Error(e.ToString());
+            // }
+            // finally
+            // {
+            //     SQLiteHelper.Instance.CloseConnection();
+            // }
         }
     }
 }

+ 8 - 8
GameClient/Assets/Game/HotUpdate/Constant/ConstFunctionId.cs

@@ -39,14 +39,14 @@ namespace GFGGame
         /// </summary>
         public const string FUNCTION_AUTOPLAY_FIGHT = "FUNCTION_AUTOPLAY_FIGHT";
 
-        /// <summary>
-        /// 商城-道具兑换
-        /// </summary>
-        public const string SHOP_EXCHANGE = "SHOP_EXCHANGE";
-        /// <summary>
-        /// 商城-礼包
-        /// </summary>
-        public const string SHOP_GIFT_BAG = "SHOP_GIFT_BAG";
+        // /// <summary>
+        // /// 商城-道具兑换
+        // /// </summary>
+        // public const string SHOP_EXCHANGE = "SHOP_EXCHANGE";
+        // /// <summary>
+        // /// 商城-礼包
+        // /// </summary>
+        // public const string SHOP_GIFT_BAG = "SHOP_GIFT_BAG";
         /// <summary>
         /// 套装培养
         /// </summary>

+ 18 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstStoreSubId.cs

@@ -0,0 +1,18 @@
+namespace GFGGame
+{
+    public class ConstStoreSubId
+    {
+        public const int STORE_CHARGE = 0;//充值
+        public const int STORE_CHARGE_ADDUP = 1;//累计充值
+        public const int STORE_MONTH_GLOAD_CARD = 0;//金卡
+        public const int STORE_MONTH_BLACK_CARD = 0;//黑金卡
+        public const int STORE_GIFT_BAG_ACTIVITY = 0;//活动
+        public const int STORE_GIFT_BAG_TIME_LIMIT = 1;//限时活动
+        public const int STORE_GIFT_BAG_GREATEST = 2;//精选
+        public const int STORE_GIFT_BAG_HOT = 3;//热销
+        public const int STORE_EXCHANGE_GALLERY = 0;//画廊商城
+        public const int STORE_ARENA_ITEM = 0;//竞技场
+        public const int FU_ZHUANG_DIAN = 0;//服装店
+
+    }
+}

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/StoreDataManager.cs.meta → GameClient/Assets/Game/HotUpdate/Constant/ConstStoreSubId.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: e4f7d3e35893ade458dcdcaca1d625f0
+guid: 6272a07e15fdd8240960b40f3c8f3192
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 15 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstStoreTabId.cs

@@ -0,0 +1,15 @@
+namespace GFGGame
+{
+    public class ConstStoreTabId
+    {
+        public const int STORE_CHARGE = 1;//商城-充值
+        public const int STORE_GIFT_BAG = 2;//商城-礼包
+        public const int STORE_MONTH_CARD = 3;//商城-月卡
+        public const int STORE_EXCHANGE = 4;//商城-兑换
+        public const int STORE_ARENA = 5;//商城-竞技场
+
+        public const int FU_ZHUANG_DIAN = 101;//服装店
+
+
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstStoreTabId.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dcc28f6ee34c53646b897443e42a66f1
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -162,7 +162,7 @@ namespace GFGGame
             SuitFosterDataManager.Instance.Clear();
             StudioDataManager.Instance.Clear();
             StorageDataManager.Instance.Clear();
-            StoreDataManager.Instance.Clear();
+            ShopDataManager.Instance.Clear();
             DressUpMenuItemDataManager.Clear();
             GuideDataManager.Clear();
             GetSuitItemController.Clear();

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs

@@ -134,12 +134,12 @@ namespace GFGGame
         /// <returns></returns>
         public bool GetRechargeGiftFreeRed()
         {
-            List<GiftBagCfg> _giftCfgs = StoreDataManager.Instance.GetGiftBagCfgs();
+            List<GiftBagCfg> _giftCfgs = ShopDataManager.Instance.GetGiftBagCfgs();
             for (int i = 0; i < _giftCfgs.Count; i++)
             {
                 GiftBagCfg cfg = _giftCfgs[i];
-                bool isUnLock = StoreDataManager.Instance.GetGiftStateById(cfg.id);
-                int buyNum = StoreDataManager.Instance.GetGiftBuyNumById(cfg.id);
+                bool isUnLock = ShopDataManager.Instance.GetGiftStateById(cfg.id);
+                int buyNum = ShopDataManager.Instance.GetGiftBuyNumById(cfg.id);
                 bool canBuy = cfg.maxBuyNum == 0 || buyNum < cfg.maxBuyNum ? true : false;
                 if (isUnLock && canBuy && cfg.price == 0) return true;
 

+ 331 - 6
GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs

@@ -1,19 +1,344 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
 using ET;
 
 namespace GFGGame
 {
+    public class RechargeStoreType
+    {
+        public static int RECHARGE = 0;
+        public static int GIFT = 1;
+        public static int EXCHANGE = 2;
+
+    }
+    public class LockType
+    {
+        public static int NONE = 0;
+        public static int STORY_LV = 1;
+        public static int ROLE_LV = 2;
+    }
+
+    public class CostType
+    {
+        public static int FREE = 0;
+        public static int ITEM = 1;
+        public static int RMB = 2;
+    }
+
     public class ShopDataManager : SingletonBase<ShopDataManager>
     {
-        // public int SHOP_TYPE;
+        public string[] refreshType = { "永久限购", "每日限购", "每周限购", "每月限购" };
+
+        private Dictionary<int, int> _rechargeDic = new Dictionary<int, int>();
+        private Dictionary<int, int> _giftDic = new Dictionary<int, int>();
+        private Dictionary<int, int> _exchangeDic = new Dictionary<int, int>();
+        public void Clear()
+        {
+            _rechargeDic.Clear();
+            _giftDic.Clear();
+            _exchangeDic.Clear();
+        }
+        public void UpdateRechargeData(int rechargeId, int num)
+        {
+            if (!_rechargeDic.ContainsKey(rechargeId))
+            {
+                _rechargeDic.Add(rechargeId, num);
+            }
+            else
+            {
+                _rechargeDic[rechargeId] = num;
+            }
+        }
+        public void UpdateGiftData(int giftId, int num)
+        {
+            if (!_giftDic.ContainsKey(giftId))
+            {
+                _giftDic.Add(giftId, num);
+            }
+            else
+            {
+                _giftDic[giftId] = num;
+            }
+        }
+        public void UpdateExchangeData(int exchangeId, int num)
+        {
+            if (!_exchangeDic.ContainsKey(exchangeId))
+            {
+                _exchangeDic.Add(exchangeId, num);
+            }
+            else
+            {
+                _exchangeDic[exchangeId] = num;
+            }
+        }
+        /************************************************************************************************************/
+
+        // /// <summary>
+        // /// 
+        // /// </summary>
+        // /// <param name="type">StoreTabCfg:index,ShopCfg:menu1</param>
+        // /// <param name="subType">StoreTabCfg:subTab[1] ,ShopCfg:menu1</param>
+        // /// <returns></returns>
+        // public List<ShopCfg> GetShopCfgs(string functonId, int menu2)
+        // {
+        //     StoreTabCfg tabCfg = StoreTabCfgArray.Instance.GetCfgByfunctionId(functonId);
+        //     List<ShopCfg> clothingShopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(tabCfg.index, menu2);
+        //     return clothingShopCfgs;
+        // }
+
+
+        public List<ShopCfg> GetList(int storeId, int typeIndex, int scoreType)
+        {
+            List<ShopCfg> shopCfgs = null;
+            switch (storeId)
+            {
+                case ConstStoreId.CLOTHING_STORE_ID:
+                    shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2AndtypeIndex(ConstStoreTabId.FU_ZHUANG_DIAN, ConstStoreSubId.FU_ZHUANG_DIAN, typeIndex);
+                    break;
+                case ConstStoreId.GALLERY_STORE_ID:
+                    shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2AndtypeIndex(ConstStoreTabId.STORE_EXCHANGE, ConstStoreSubId.STORE_EXCHANGE_GALLERY, typeIndex);
+                    break;
+            }
+            SortItemListByScore(shopCfgs, scoreType);
+            return shopCfgs;
+        }
+
+        public void GetMoneyIdAndNum(int buyId, int count, int shopType, out int costId, out int costNum, out int buyNum)
+        {
+            ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(buyId);
+
+            costId = shopCfg.costId;
+            costNum = shopCfg.price * count;
+            buyNum = count;
+        }
+
+
+        private List<ShopCfg> SortItemListByScore(List<ShopCfg> arrayList, int scoreType)
+        {
+            arrayList.Sort((ShopCfg a, ShopCfg b) =>
+            {
+                long numA = ItemDataManager.GetItemNum(a.itemId);
+                long numB = ItemDataManager.GetItemNum(b.itemId);
+                bool hasA = numA > 0;
+                bool hasB = numB > 0;
+                if (hasA && !hasB)
+                {
+                    return 1;
+                }
+                else if (!hasA && hasB)
+                {
+                    return -1;
+                }
+                else if (scoreType > 0 && !hasA && !hasB)
+                {
+                    int scoreA = ItemDataManager.GetItemAdditionScore(a.itemId, scoreType);
+                    int scoreB = ItemDataManager.GetItemAdditionScore(b.itemId, scoreType);
+                    if (scoreB > scoreA)
+                    {
+                        return 1;
+                    }
+                    else if (scoreB < scoreA)
+                    {
+                        return -1;
+                    }
+                }
+
+                return a.itemId.CompareTo(b.itemId);
+            });
+            return arrayList;
+        }
+
+
+        /**************************************************************************************************************************/
+        /// <summary>
+        /// 根据充值id获取购买次数
+        /// </summary>
+        /// <param name="rechargeId"></param>
+        /// <returns></returns>
+        public int GetRechargeBuyNumById(int rechargeId)
+        {
+            return !_rechargeDic.ContainsKey(rechargeId) ? 0 : _rechargeDic[rechargeId];
+        }
+        /// <summary>
+        /// 根据礼包id获取购买次数
+        /// </summary>
+        /// <param name="giftId"></param>
+        /// <returns></returns>
+        public int GetGiftBuyNumById(int giftId)
+        {
+            return !_giftDic.ContainsKey(giftId) ? 0 : _giftDic[giftId];
+        }
+        /// <summary>
+        /// 根据充值id获取购买次数
+        /// </summary>
+        /// <param name="exchangeId"></param>
+        /// <returns></returns>
+        public int GetExchangeBuyNumById(int exchangeId)
+        {
+            return !_exchangeDic.ContainsKey(exchangeId) ? 0 : _exchangeDic[exchangeId];
+        }
+
+
+        public List<GiftBagCfg> GetGiftBagCfgs()
+        {
+            List<GiftBagCfg> giftBagCfgs = new List<GiftBagCfg>();
 
-        public void BuyItem(int itemId, int itemCount, int shopType, ShopCfg shopCfg)
+            List<GiftBagCfg> noneGiftBagCfgs = GetNoneGiftCfg();
+            giftBagCfgs = giftBagCfgs.Concat(noneGiftBagCfgs).ToList<GiftBagCfg>();
+
+            GiftBagCfg StoryLvGiftCfg = GetStoryLvGiftCfg();
+            if (StoryLvGiftCfg != null) giftBagCfgs.Add(StoryLvGiftCfg);
+            GiftBagCfg RoleLvGiftCfg = GetRoleLvGiftCfg();
+            if (RoleLvGiftCfg != null) giftBagCfgs.Add(RoleLvGiftCfg);
+            giftBagCfgs = RemoveNotOpenCfg(giftBagCfgs);
+            SortGiftBagCfgs(giftBagCfgs);
+            return giftBagCfgs;
+        }
+
+        private List<GiftBagCfg> SortGiftBagCfgs(List<GiftBagCfg> giftBagCfgs)
         {
-            BuyItemConteoller.Show(itemId, itemCount, ConstBuyType.TYPE_SHOP, shopType, () =>
+            giftBagCfgs.Sort((GiftBagCfg a, GiftBagCfg b) =>
             {
-                LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.FU_ZHUANG_DIAN, 2);
-                GetSuitItemController.TryShow(0);
 
-            }, true, false, GameConst.MAX_COUNT_TO_BUY_ITEMS);
+                //未售罄的>未解锁>已售罄的
+                int buyTypeA = (a.maxBuyNum == 0 || a.maxBuyNum - GetGiftBuyNumById(a.id) > 0) ? 1 : -1;
+                int buyTypeB = (b.maxBuyNum == 0 || b.maxBuyNum - GetGiftBuyNumById(b.id) > 0) ? 1 : -1;
+                if (buyTypeA > buyTypeB) return -1;
+                if (buyTypeA < buyTypeB) return 1;
+
+                //解锁状态
+                int lockA = GetGiftStateById(a.id) ? 1 : -1;
+                int lockB = GetGiftStateById(b.id) ? 1 : -1;
+                if (lockA > lockB) return -1;
+                if (lockA < lockB) return 1;
+
+                //免费>钻石>现金>道具
+                if (a.costType < b.costType) return -1;
+                if (a.costType > b.costType) return 1;
+
+                //有下架时间的 > 没有下架时间的
+                int endTimeA = a.endTime != "" ? 1 : -1;
+                int endTimeB = b.endTime != "" ? 1 : -1;
+                if (endTimeA > endTimeB) return -1;
+                if (endTimeA < endTimeB) return 1;
+
+
+
+                int descA = a.desc == "" ? 0 : int.Parse(a.desc);
+                int descB = b.desc == "" ? 0 : int.Parse(b.desc);
+                if (descA != descB) return descA - descB;
+
+                if (a.price != b.price) return a.price - b.price;
+
+
+                return 0;
+            });
+            return giftBagCfgs;
+        }
+        private List<GiftBagCfg> RemoveNotOpenCfg(List<GiftBagCfg> giftBagCfgs)
+        {
+            for (int i = giftBagCfgs.Count - 1; i >= 0; i--)
+            {
+                if (giftBagCfgs[i].startTime != "" && !TimeUtil.IsBeforeCurTime(giftBagCfgs[i].startTime) || giftBagCfgs[i].endTime != "" && !TimeUtil.IsLaterCurTime(giftBagCfgs[i].endTime))
+                {
+                    giftBagCfgs.RemoveAt(i);
+                }
+            }
+            return giftBagCfgs;
+        }
+        private List<GiftBagCfg> GetNoneGiftCfg()
+        {
+            List<GiftBagCfg> giftBagCfgs = new List<GiftBagCfg>(GiftBagCfgArray.Instance.GetCfgsBylockType(LockType.NONE));
+
+            return giftBagCfgs;
+        }
+        private GiftBagCfg GetStoryLvGiftCfg()
+        {
+            List<GiftBagCfg> giftBagCfgs = GiftBagCfgArray.Instance.GetCfgsBylockType(LockType.STORY_LV);
+            if (giftBagCfgs.Count == 0) return null;
+            giftBagCfgs.Sort((GiftBagCfg a, GiftBagCfg b) =>
+            {
+                if (a.storyLevelId.CompareTo(b.storyLevelId) != 0)
+                {
+                    return a.storyLevelId.CompareTo(b.storyLevelId);
+                }
+                return -1;
+            });
+            for (int i = 0; i < giftBagCfgs.Count; i++)
+            {
+                if (GetGiftStateById(giftBagCfgs[i].id) && (GetGiftBuyNumById(giftBagCfgs[i].id) < giftBagCfgs[i].maxBuyNum)) return giftBagCfgs[i];
+            }
+            return giftBagCfgs[0];
+        }
+        private GiftBagCfg GetRoleLvGiftCfg()
+        {
+            List<GiftBagCfg> giftBagCfgs = GiftBagCfgArray.Instance.GetCfgsBylockType(LockType.ROLE_LV);
+            if (giftBagCfgs.Count == 0) return null;
+            giftBagCfgs.Sort((GiftBagCfg a, GiftBagCfg b) =>
+            {
+                if (a.lv.CompareTo(b.lv) != 0)
+                {
+                    return a.lv.CompareTo(b.lv);
+                }
+                return -1;
+            });
+            for (int i = 0; i < giftBagCfgs.Count; i++)
+            {
+                if (GetGiftStateById(giftBagCfgs[i].id) && (GetGiftBuyNumById(giftBagCfgs[i].id) < giftBagCfgs[i].maxBuyNum)) return giftBagCfgs[i];
+            }
+            return giftBagCfgs[0];
+        }
+
+        public List<ShopExchangeCfg> GetExchangeCfgs()
+        {
+            List<ShopExchangeCfg> shopExchangeCfgs = new List<ShopExchangeCfg>(ShopExchangeCfgArray.Instance.dataArray);
+            shopExchangeCfgs.Sort((ShopExchangeCfg a, ShopExchangeCfg b) =>
+            {
+                //未售罄的>已售罄的
+                int buyTypeA = (a.maxLimit == 0 || a.maxLimit - GetExchangeBuyNumById(a.id) > 0) ? 1 : -1;
+                int buyTypeB = (b.maxLimit == 0 || b.maxLimit - GetExchangeBuyNumById(b.id) > 0) ? 1 : -1;
+                if (buyTypeA > buyTypeB) return -1;
+                if (buyTypeA < buyTypeB) return 1;
+                return 0;
+            });
+            return shopExchangeCfgs;
+        }
+        /// <summary>
+        /// 根据礼包Id获取礼包解锁状态
+        /// /// </summary>
+        /// <param name="giftId"></param>
+        /// <returns></returns>
+        public bool GetGiftStateById(int giftId)
+        {
+            GiftBagCfg cfg = GiftBagCfgArray.Instance.GetCfg(giftId);
+
+            if (cfg.lockType == LockType.NONE)
+            {
+                return true;
+            }
+            else if (cfg.lockType == LockType.STORY_LV)
+            {
+                return InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId);
+            }
+            else
+            {
+                return GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) >= cfg.lv;
+            }
+        }
+        /// <summary>
+        /// 根据礼包id获取下架时间
+        /// </summary>
+        /// <param name="giftId"></param>
+        /// <returns></returns>
+        public string GetEndTime(int giftId)
+        {
+            long endTime = 0;
+            GiftBagCfg cfg = GiftBagCfgArray.Instance.GetCfg(giftId);
+            if (cfg.endTime == "") return "";
+
+            endTime = TimeUtil.DateTimeToTimestamp(cfg.endTime);
+            return TimeUtil.FormattingTime(TimeHelper.ServerNow(), endTime);
         }
     }
 }

+ 21 - 0
GameClient/Assets/Game/HotUpdate/Data/ShopViewManager.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using ET;
+
+namespace GFGGame
+{
+
+    public class ShopViewManager : SingletonBase<ShopViewManager>
+    {
+        public void BuyItem(int itemId, int itemCount, int shopType, ShopCfg shopCfg)
+        {
+            BuyItemConteoller.Show(itemId, itemCount, ConstBuyType.TYPE_SHOP, shopType, () =>
+            {
+                LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.FU_ZHUANG_DIAN, 2);
+                GetSuitItemController.TryShow(0);
+
+            }, true, false, GameConst.MAX_COUNT_TO_BUY_ITEMS);
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Data/ShopViewManager.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6ba5f9d477a4fbb41baa20978875a1f9
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 0 - 266
GameClient/Assets/Game/HotUpdate/Data/StoreDataManager.cs

@@ -1,266 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using ET;
-
-namespace GFGGame
-{
-    public class RechargeStoreType
-    {
-        public static int RECHARGE = 0;
-        public static int GIFT = 1;
-        public static int EXCHANGE = 2;
-
-    }
-    public class LockType
-    {
-        public static int NONE = 0;
-        public static int STORY_LV = 1;
-        public static int ROLE_LV = 2;
-    }
-
-    public class CostType
-    {
-        public static int FREE = 0;
-        public static int ITEM = 1;
-        public static int RMB = 2;
-    }
-
-    public class StoreDataManager : SingletonBase<StoreDataManager>
-    {
-        public string[] refreshType = { "永久限购", "每日限购", "每周限购", "每月限购" };
-
-        private Dictionary<int, int> _rechargeDic = new Dictionary<int, int>();
-        private Dictionary<int, int> _giftDic = new Dictionary<int, int>();
-        private Dictionary<int, int> _exchangeDic = new Dictionary<int, int>();
-        public void Clear()
-        {
-            _rechargeDic.Clear();
-            _giftDic.Clear();
-            _exchangeDic.Clear();
-        }
-        public void UpdateRechargeData(int rechargeId, int num)
-        {
-            if (!_rechargeDic.ContainsKey(rechargeId))
-            {
-                _rechargeDic.Add(rechargeId, num);
-            }
-            else
-            {
-                _rechargeDic[rechargeId] = num;
-            }
-        }
-        public void UpdateGiftData(int giftId, int num)
-        {
-            if (!_giftDic.ContainsKey(giftId))
-            {
-                _giftDic.Add(giftId, num);
-            }
-            else
-            {
-                _giftDic[giftId] = num;
-            }
-        }
-        public void UpdateExchangeData(int exchangeId, int num)
-        {
-            if (!_exchangeDic.ContainsKey(exchangeId))
-            {
-                _exchangeDic.Add(exchangeId, num);
-            }
-            else
-            {
-                _exchangeDic[exchangeId] = num;
-            }
-        }
-
-        /// <summary>
-        /// 根据充值id获取购买次数
-        /// </summary>
-        /// <param name="rechargeId"></param>
-        /// <returns></returns>
-        public int GetRechargeBuyNumById(int rechargeId)
-        {
-            return !_rechargeDic.ContainsKey(rechargeId) ? 0 : _rechargeDic[rechargeId];
-        }
-        /// <summary>
-        /// 根据礼包id获取购买次数
-        /// </summary>
-        /// <param name="giftId"></param>
-        /// <returns></returns>
-        public int GetGiftBuyNumById(int giftId)
-        {
-            return !_giftDic.ContainsKey(giftId) ? 0 : _giftDic[giftId];
-        }
-        /// <summary>
-        /// 根据充值id获取购买次数
-        /// </summary>
-        /// <param name="exchangeId"></param>
-        /// <returns></returns>
-        public int GetExchangeBuyNumById(int exchangeId)
-        {
-            return !_exchangeDic.ContainsKey(exchangeId) ? 0 : _exchangeDic[exchangeId];
-        }
-
-
-        public List<GiftBagCfg> GetGiftBagCfgs()
-        {
-            List<GiftBagCfg> giftBagCfgs = new List<GiftBagCfg>();
-
-            List<GiftBagCfg> noneGiftBagCfgs = GetNoneGiftCfg();
-            giftBagCfgs = giftBagCfgs.Concat(noneGiftBagCfgs).ToList<GiftBagCfg>();
-
-            GiftBagCfg StoryLvGiftCfg = GetStoryLvGiftCfg();
-            if (StoryLvGiftCfg != null) giftBagCfgs.Add(StoryLvGiftCfg);
-            GiftBagCfg RoleLvGiftCfg = GetRoleLvGiftCfg();
-            if (RoleLvGiftCfg != null) giftBagCfgs.Add(RoleLvGiftCfg);
-            giftBagCfgs = RemoveNotOpenCfg(giftBagCfgs);
-            SortGiftBagCfgs(giftBagCfgs);
-            return giftBagCfgs;
-        }
-
-        private List<GiftBagCfg> SortGiftBagCfgs(List<GiftBagCfg> giftBagCfgs)
-        {
-            giftBagCfgs.Sort((GiftBagCfg a, GiftBagCfg b) =>
-            {
-
-                //未售罄的>未解锁>已售罄的
-                int buyTypeA = (a.maxBuyNum == 0 || a.maxBuyNum - GetGiftBuyNumById(a.id) > 0) ? 1 : -1;
-                int buyTypeB = (b.maxBuyNum == 0 || b.maxBuyNum - GetGiftBuyNumById(b.id) > 0) ? 1 : -1;
-                if (buyTypeA > buyTypeB) return -1;
-                if (buyTypeA < buyTypeB) return 1;
-
-                //解锁状态
-                int lockA = GetGiftStateById(a.id) ? 1 : -1;
-                int lockB = GetGiftStateById(b.id) ? 1 : -1;
-                if (lockA > lockB) return -1;
-                if (lockA < lockB) return 1;
-
-                //免费>钻石>现金>道具
-                if (a.costType < b.costType) return -1;
-                if (a.costType > b.costType) return 1;
-
-                //有下架时间的 > 没有下架时间的
-                int endTimeA = a.endTime != "" ? 1 : -1;
-                int endTimeB = b.endTime != "" ? 1 : -1;
-                if (endTimeA > endTimeB) return -1;
-                if (endTimeA < endTimeB) return 1;
-
-
-
-                int descA = a.desc == "" ? 0 : int.Parse(a.desc);
-                int descB = b.desc == "" ? 0 : int.Parse(b.desc);
-                if (descA != descB) return descA - descB;
-
-                if (a.price != b.price) return a.price - b.price;
-
-
-                return 0;
-            });
-            return giftBagCfgs;
-        }
-        private List<GiftBagCfg> RemoveNotOpenCfg(List<GiftBagCfg> giftBagCfgs)
-        {
-            for (int i = giftBagCfgs.Count - 1; i >= 0; i--)
-            {
-                if (giftBagCfgs[i].startTime != "" && !TimeUtil.IsBeforeCurTime(giftBagCfgs[i].startTime) || giftBagCfgs[i].endTime != "" && !TimeUtil.IsLaterCurTime(giftBagCfgs[i].endTime))
-                {
-                    giftBagCfgs.RemoveAt(i);
-                }
-            }
-            return giftBagCfgs;
-        }
-        private List<GiftBagCfg> GetNoneGiftCfg()
-        {
-            List<GiftBagCfg> giftBagCfgs = new List<GiftBagCfg>(GiftBagCfgArray.Instance.GetCfgsBylockType(LockType.NONE));
-
-            return giftBagCfgs;
-        }
-        private GiftBagCfg GetStoryLvGiftCfg()
-        {
-            List<GiftBagCfg> giftBagCfgs = GiftBagCfgArray.Instance.GetCfgsBylockType(LockType.STORY_LV);
-            if (giftBagCfgs.Count == 0) return null;
-            giftBagCfgs.Sort((GiftBagCfg a, GiftBagCfg b) =>
-            {
-                if (a.storyLevelId.CompareTo(b.storyLevelId) != 0)
-                {
-                    return a.storyLevelId.CompareTo(b.storyLevelId);
-                }
-                return -1;
-            });
-            for (int i = 0; i < giftBagCfgs.Count; i++)
-            {
-                if (GetGiftStateById(giftBagCfgs[i].id) && (GetGiftBuyNumById(giftBagCfgs[i].id) < giftBagCfgs[i].maxBuyNum)) return giftBagCfgs[i];
-            }
-            return giftBagCfgs[0];
-        }
-        private GiftBagCfg GetRoleLvGiftCfg()
-        {
-            List<GiftBagCfg> giftBagCfgs = GiftBagCfgArray.Instance.GetCfgsBylockType(LockType.ROLE_LV);
-            if (giftBagCfgs.Count == 0) return null;
-            giftBagCfgs.Sort((GiftBagCfg a, GiftBagCfg b) =>
-            {
-                if (a.lv.CompareTo(b.lv) != 0)
-                {
-                    return a.lv.CompareTo(b.lv);
-                }
-                return -1;
-            });
-            for (int i = 0; i < giftBagCfgs.Count; i++)
-            {
-                if (GetGiftStateById(giftBagCfgs[i].id) && (GetGiftBuyNumById(giftBagCfgs[i].id) < giftBagCfgs[i].maxBuyNum)) return giftBagCfgs[i];
-            }
-            return giftBagCfgs[0];
-        }
-
-        public List<ShopExchangeCfg> GetExchangeCfgs()
-        {
-            List<ShopExchangeCfg> shopExchangeCfgs = new List<ShopExchangeCfg>(ShopExchangeCfgArray.Instance.dataArray);
-            shopExchangeCfgs.Sort((ShopExchangeCfg a, ShopExchangeCfg b) =>
-            {
-                //未售罄的>已售罄的
-                int buyTypeA = (a.maxLimit == 0 || a.maxLimit - GetExchangeBuyNumById(a.id) > 0) ? 1 : -1;
-                int buyTypeB = (b.maxLimit == 0 || b.maxLimit - GetExchangeBuyNumById(b.id) > 0) ? 1 : -1;
-                if (buyTypeA > buyTypeB) return -1;
-                if (buyTypeA < buyTypeB) return 1;
-                return 0;
-            });
-            return shopExchangeCfgs;
-        }
-        /// <summary>
-        /// 根据礼包Id获取礼包解锁状态
-        /// /// </summary>
-        /// <param name="giftId"></param>
-        /// <returns></returns>
-        public bool GetGiftStateById(int giftId)
-        {
-            GiftBagCfg cfg = GiftBagCfgArray.Instance.GetCfg(giftId);
-
-            if (cfg.lockType == LockType.NONE)
-            {
-                return true;
-            }
-            else if (cfg.lockType == LockType.STORY_LV)
-            {
-                return InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId);
-            }
-            else
-            {
-                return GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) >= cfg.lv;
-            }
-        }
-        /// <summary>
-        /// 根据礼包id获取下架时间
-        /// </summary>
-        /// <param name="giftId"></param>
-        /// <returns></returns>
-        public string GetEndTime(int giftId)
-        {
-            long endTime = 0;
-            GiftBagCfg cfg = GiftBagCfgArray.Instance.GetCfg(giftId);
-            if (cfg.endTime == "") return "";
-
-            endTime = TimeUtil.DateTimeToTimestamp(cfg.endTime);
-            return TimeUtil.FormattingTime(TimeHelper.ServerNow(), endTime);
-        }
-    }
-}

+ 0 - 103
GameClient/Assets/Game/HotUpdate/ExcelConfig/Manager/ClothingShopCfgManager.cs

@@ -5,109 +5,6 @@ namespace GFGGame
     public class ClothingShopCfgManager : SingletonBase<ClothingShopCfgManager>
     {
 
-        public List<ShopCfg> GetList(int storeId, int typeIndex, int scoreType)
-        {
-            List<ShopCfg> shopCfgs = null;
-            switch (storeId)
-            {
-                case ConstStoreId.CLOTHING_STORE_ID:
-                    shopCfgs = ShopCfgClothingArray.Instance.GetCfgsBytypeIndex(typeIndex);
-                    break;
-                case ConstStoreId.LUCKY_BOX_STORE_ID:
-                    shopCfgs = ShopCfgCJArray.Instance.GetCfgsBytypeIndex(typeIndex);
-                    break;
-                case ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID:
-                    shopCfgs = ShopCfgCJAArray.Instance.GetCfgsBytypeIndex(typeIndex);
-                    break;
-                case ConstStoreId.GALLERY_STORE_ID:
-                    shopCfgs = ShopCfgGalleryArray.Instance.GetCfgsBytypeIndex(typeIndex);
-                    break;
-            }
-            SortItemListByScore(shopCfgs, scoreType);
-            return shopCfgs;
-        }
 
-        public ShopCfg GetShopCfg(int buyId, int shopType)
-        {
-            switch (shopType)
-            {
-                case ConstStoreId.CLOTHING_STORE_ID:
-                    return ShopCfgClothingArray.Instance.GetCfg(buyId);
-
-                case ConstStoreId.LUCKY_BOX_STORE_ID:
-                    return ShopCfgCJArray.Instance.GetCfg(buyId);
-
-                case ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID:
-                    return ShopCfgCJAArray.Instance.GetCfg(buyId);
-
-                case ConstStoreId.GALLERY_STORE_ID:
-                    return ShopCfgGalleryArray.Instance.GetCfg(buyId);
-            }
-            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;
-                case ConstStoreId.GALLERY_STORE_ID:
-
-                    return ShopCfgGalleryArray.Instance.dataArray;
-            }
-            return null;
-        }
-
-        public void GetMoneyIdAndNum(int buyId, int count, int shopType, out int costId, out int costNum, out int buyNum)
-        {
-            ShopCfg shopCfg = GetShopCfg(buyId, shopType);
-
-            costId = shopCfg.costID;
-            costNum = shopCfg.costNum * count;
-            buyNum = count;
-        }
-
-
-        private List<ShopCfg> SortItemListByScore(List<ShopCfg> arrayList, int scoreType)
-        {
-            arrayList.Sort((ShopCfg a, ShopCfg b) =>
-            {
-                long numA = ItemDataManager.GetItemNum(a.itemID);
-                long numB = ItemDataManager.GetItemNum(b.itemID);
-                bool hasA = numA > 0;
-                bool hasB = numB > 0;
-                if (hasA && !hasB)
-                {
-                    return 1;
-                }
-                else if (!hasA && hasB)
-                {
-                    return -1;
-                }
-                else if (scoreType > 0 && !hasA && !hasB)
-                {
-                    int scoreA = ItemDataManager.GetItemAdditionScore(a.itemID, scoreType);
-                    int scoreB = ItemDataManager.GetItemAdditionScore(b.itemID, scoreType);
-                    if (scoreB > scoreA)
-                    {
-                        return 1;
-                    }
-                    else if (scoreB < scoreA)
-                    {
-                        return -1;
-                    }
-                }
-
-                return a.itemID.CompareTo(b.itemID);
-            });
-            return arrayList;
-        }
     }
 }

+ 6 - 6
GameClient/Assets/Game/HotUpdate/ServerProxy/RechargeSProxy.cs

@@ -12,7 +12,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    StoreDataManager.Instance.UpdateRechargeData(response.RechargeId, response.RechargedTimes);
+                    ShopDataManager.Instance.UpdateRechargeData(response.RechargeId, response.RechargedTimes);
                     PromptController.Instance.ShowFloatTextPrompt("虚拟充值成功", MessageType.SUCCESS);
                     EventAgent.DispatchEvent(ConstMessage.BUY_RECHARGE_SUCCESS);
 
@@ -29,7 +29,7 @@ namespace GFGGame
                 {
                     for (int i = 0; i < response.ks.Count; i++)
                     {
-                        StoreDataManager.Instance.UpdateRechargeData(response.ks[i], response.vs[i]);
+                        ShopDataManager.Instance.UpdateRechargeData(response.ks[i], response.vs[i]);
                     }
                 }
             }
@@ -44,7 +44,7 @@ namespace GFGGame
                 {
                     for (int i = 0; i < response.ks.Count; i++)
                     {
-                        StoreDataManager.Instance.UpdateGiftData(response.ks[i], response.vs[i]);
+                        ShopDataManager.Instance.UpdateGiftData(response.ks[i], response.vs[i]);
                     }
                 }
             }
@@ -57,7 +57,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    StoreDataManager.Instance.UpdateGiftData(response.GiftBagId, response.BuyTimes);
+                    ShopDataManager.Instance.UpdateGiftData(response.GiftBagId, response.BuyTimes);
                     BonusController.TryShowBonusList(GiftBagCfgArray.Instance.GetCfg(response.GiftBagId).itemsArr);
                     EventAgent.DispatchEvent(ConstMessage.BUY_GIFT_SUCCESS);
                     EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
@@ -76,7 +76,7 @@ namespace GFGGame
                 {
                     for (int i = 0; i < response.ks.Count; i++)
                     {
-                        StoreDataManager.Instance.UpdateExchangeData(response.ks[i], response.vs[i]);
+                        ShopDataManager.Instance.UpdateExchangeData(response.ks[i], response.vs[i]);
                     }
                 }
             }
@@ -89,7 +89,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    StoreDataManager.Instance.UpdateExchangeData(response.ExchangeId, response.ExchangedTimes);
+                    ShopDataManager.Instance.UpdateExchangeData(response.ExchangeId, response.ExchangedTimes);
                     EventAgent.DispatchEvent(ConstMessage.BUY_EXCHANGE_SUCCESS);
                     ShopExchangeCfg cfg = ShopExchangeCfgArray.Instance.GetCfg(response.ExchangeId);
                     BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(cfg.itemId, cfg.num * response.Times));

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

@@ -31,7 +31,7 @@ namespace GFGGame
         private int _selectedItemId;//打开界面时选中的物品id
         private int _selectedType = 0;//打开界面时选中的物品类型
         private int _selectedItemCount;
-        private int _selectedItemClothingId;
+        private int _selectedId;
 
         public override void Dispose()
         {
@@ -128,13 +128,13 @@ namespace GFGGame
                     _selectedItemId = (int)objs[2];//从物品来源面板跳转到商店,需要物品id方便打开界面时做选中处理
                     long selectedItemCount = (long)objs[3];
                     _selectedItemCount = (int)selectedItemCount;
-                    ShopCfg[] dataArray = ClothingShopCfgManager.Instance.GetShopCfgs(_storeId);
-                    for (int i = 0; i < dataArray.Length; i++)
+                    List<ShopCfg> dataArray = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.FU_ZHUANG_DIAN, ConstStoreSubId.FU_ZHUANG_DIAN);
+                    for (int i = 0; i < dataArray.Count; i++)
                     {
-                        if (dataArray[i].itemID == _selectedItemId)
+                        if (dataArray[i].itemId == _selectedItemId)
                         {
                             _selectedType = dataArray[i].typeIndex;
-                            _selectedItemClothingId = dataArray[i].id;
+                            _selectedId = dataArray[i].id;
                             // ShopCfg clothingShopCfg = ShopCfgClothingArray.Instance.GetCfg(_selectedItemClothingId);
                             _ui.m_listType.selectedIndex = _selectedType;
                             break;
@@ -174,7 +174,7 @@ namespace GFGGame
             }
             if (_selectedItemId > 0 && _selectedItemCount > 0)
             {
-                ShopDataManager.Instance.BuyItem(_cfgSelected.id, _selectedItemCount, _storeId, _cfgSelected);
+                ShopViewManager.Instance.BuyItem(_cfgSelected.id, _selectedItemCount, _storeId, _cfgSelected);
             }
 
             Timers.inst.AddUpdate(CheckGuide);
@@ -205,10 +205,10 @@ namespace GFGGame
 
         private void OnclickBtnBuy()
         {
-            int count = _selectedItemId > 0 && _cfgSelected.itemID == _selectedItemId ? _selectedItemCount : INIT_COUNT;
+            int count = _selectedItemId > 0 && _cfgSelected.itemId == _selectedItemId ? _selectedItemCount : INIT_COUNT;
             // BuyItemConteoller.Show(_cfgSelected.itemID, _cfgSelected.costID, INIT_COUNT, _cfgSelected.costNum, count, null, true, false, MAX_COUNT);
             count = Math.Max(1, count);
-            ShopDataManager.Instance.BuyItem(_cfgSelected.id, count, _storeId, _cfgSelected);
+            ShopViewManager.Instance.BuyItem(_cfgSelected.id, count, _storeId, _cfgSelected);
         }
         private void UpdateItemChange()
         {
@@ -231,9 +231,9 @@ namespace GFGGame
         private void UpdateRole(bool tween)
         {
             _dressUpObjUI.ResetSceneObj(70, false, true, null, false);
-            _dressUpObjUI.dressUpObj.AddOrRemove(_cfgSelected.itemID, true);
+            _dressUpObjUI.dressUpObj.AddOrRemove(_cfgSelected.itemId, true);
             _dressUpObjUI.UpdateWrapper(_ui.m_compHolder.m_compMover.m_holder);
-            int type = ItemUtilCS.GetItemSubType(_cfgSelected.itemID);
+            int type = ItemUtilCS.GetItemSubType(_cfgSelected.itemId);
             float duration = DURATION;
             if (!tween)
             {
@@ -260,20 +260,20 @@ namespace GFGGame
         {
             _ui.m_listShop.RemoveChildrenToPool();
             int typeIndex = _ui.m_listType.selectedIndex;
-            _dataList = ClothingShopCfgManager.Instance.GetList(_storeId, typeIndex, _scoreType);
+            _dataList = ShopDataManager.Instance.GetList(_storeId, typeIndex, _scoreType);
             _ui.m_listShop.numItems = _dataList.Count;
 
 
             if (_ui.m_listShop.numItems > 0)
             {
-                ShopCfg clothingShopCfg = ClothingShopCfgManager.Instance.GetShopCfg(_selectedItemClothingId, _storeId);//  ShopCfgClothingArray.Instance.GetCfg(_selectedItemClothingId);
+                ShopCfg clothingShopCfg = ShopCfgArray.Instance.GetCfg(_selectedId);
                 int itemIndex = 0;
                 if (_selectedItemId > 0 && clothingShopCfg != null)
                 {
                     // itemIndex = _dataList.IndexOf(clothingShopCfg);
                     for (int i = 0; i < _dataList.Count; i++)
                     {
-                        if (_dataList[i].id == _selectedItemClothingId)
+                        if (_dataList[i].id == _selectedId)
                         {
                             itemIndex = i;
                             break;
@@ -308,15 +308,15 @@ namespace GFGGame
             ShopCfg cfg = _dataList[index];
             listItem.target.data = cfg;
             // listItem.m_grpSelect.visible = false;
-            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.itemID);
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.itemId);
             listItem.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
             string itemName = itemCfg.name;
             listItem.m_txtName.text = itemName;
-            RarityIconController.UpdateRarityIcon(listItem.m_rarity, cfg.itemID, false);
-            ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(cfg.costID);
+            RarityIconController.UpdateRarityIcon(listItem.m_rarity, cfg.itemId, false);
+            ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(cfg.costId);
             listItem.m_iconPrice.url = "ui://CommonGame/" + costItemCfg.res;
-            listItem.m_imgOwned.visible = ItemDataManager.GetItemNum(cfg.itemID) > 0;
-            listItem.m_txtPrice.text = ItemDataManager.GetItemNum(cfg.costID) >= cfg.costNum ? StringUtil.GetColorText(cfg.costNum.ToString(), "#DD994A") : StringUtil.GetColorText(cfg.costNum.ToString(), "#F2989B");
+            listItem.m_imgOwned.visible = ItemDataManager.GetItemNum(cfg.itemId) > 0;
+            listItem.m_txtPrice.text = ItemDataManager.GetItemNum(cfg.costId) >= cfg.price ? StringUtil.GetColorText(cfg.price.ToString(), "#DD994A") : StringUtil.GetColorText(cfg.price.ToString(), "#F2989B");
             listItem.m_loaMainScore.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (itemCfg.mainScore));
 
             UI_ListClothingShopItem.ProxyEnd();
@@ -338,28 +338,28 @@ namespace GFGGame
 
         private void UpdateSelectedItemInfo()
         {
-            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.itemID);
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.itemId);
             string itemName = itemCfg.name;
             _ui.m_compItemInfo.m_txtName.text = itemName;
             _ui.m_compItemInfo.m_txtDesc.text = itemCfg.desc;
-            RarityIconController.UpdateRarityIcon(_ui.m_compItemInfo.m_rarity, _cfgSelected.itemID, false);
-            ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.costID);
+            RarityIconController.UpdateRarityIcon(_ui.m_compItemInfo.m_rarity, _cfgSelected.itemId, false);
+            ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.costId);
             _ui.m_compItemInfo.m_iconPrice.url = "ui://CommonGame/" + costItemCfg.res;
-            _ui.m_compItemInfo.m_txtPrice.text = "" + _cfgSelected.costNum;
+            _ui.m_compItemInfo.m_txtPrice.text = "" + _cfgSelected.price;
             _ui.m_compItemInfo.m_txtGong.text = "" + itemCfg.score1;
             _ui.m_compItemInfo.m_txtShang.text = "" + itemCfg.score2;
             _ui.m_compItemInfo.m_txtJue.text = "" + itemCfg.score3;
             _ui.m_compItemInfo.m_txtZhi.text = "" + itemCfg.score4;
-            _ui.m_compItemInfo.m_txtOwned.SetVar("v1", "" + ItemDataManager.GetItemNum(_cfgSelected.itemID)).FlushVars();
+            _ui.m_compItemInfo.m_txtOwned.SetVar("v1", "" + ItemDataManager.GetItemNum(_cfgSelected.itemId)).FlushVars();
             UI_ListClothingShopItem listItem = UI_ListClothingShopItem.Proxy(_selectedListItem);
-            listItem.m_imgOwned.visible = ItemDataManager.GetItemNum(_cfgSelected.itemID) > 0;
+            listItem.m_imgOwned.visible = ItemDataManager.GetItemNum(_cfgSelected.itemId) > 0;
             UI_ListClothingShopItem.ProxyEnd();
             _ui.m_compItemInfo.m_listTag.numItems = itemCfg.tagsArr.Length;
         }
 
         private void RenderListTagItem(int index, GObject obj)
         {
-            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.itemID);
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.itemId);
 
             UI_ListTagItem item = UI_ListTagItem.Proxy(obj);
 

+ 17 - 17
GameClient/Assets/Game/HotUpdate/Views/ClothingShop/GalleryShopView.cs

@@ -31,7 +31,7 @@ namespace GFGGame
         private int _selectedItemId;//打开界面时选中的物品id
         private int _selectedType = 0;//打开界面时选中的物品类型
         private int _selectedItemCount;
-        private int _selectedItemClothingId;
+        private int _selectedId;
 
         public override void Dispose()
         {
@@ -111,13 +111,13 @@ namespace GFGGame
                 {
                     _selectedItemId = (int)objs[2];//从物品来源面板跳转到商店,需要物品id方便打开界面时做选中处理
                     _selectedItemCount = (int)objs[3];
-                    ShopCfg[] dataArray = ClothingShopCfgManager.Instance.GetShopCfgs(_storeId);
-                    for (int i = 0; i < dataArray.Length; i++)
+                    List<ShopCfg> dataArray = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_EXCHANGE, ConstStoreSubId.STORE_EXCHANGE_GALLERY);
+                    for (int i = 0; i < dataArray.Count; i++)
                     {
-                        if (dataArray[i].itemID == _selectedItemId)
+                        if (dataArray[i].itemId == _selectedItemId)
                         {
                             _selectedType = dataArray[i].typeIndex;
-                            _selectedItemClothingId = dataArray[i].id;
+                            _selectedId = dataArray[i].id;
                             _ui.m_comItemList.m_comBtnTab.m_c1.selectedIndex = _selectedType;
                             break;
                         }
@@ -135,7 +135,7 @@ namespace GFGGame
 
             if (_selectedItemId > 0 && _selectedItemCount > 0)
             {
-                ShopDataManager.Instance.BuyItem(_cfgSelected.id, _selectedItemCount, _storeId, _cfgSelected);
+                ShopViewManager.Instance.BuyItem(_cfgSelected.id, _selectedItemCount, _storeId, _cfgSelected);
             }
 
 
@@ -165,10 +165,10 @@ namespace GFGGame
 
         private void OnclickBtnBuy()
         {
-            int count = _selectedItemId > 0 && _cfgSelected.itemID == _selectedItemId ? _selectedItemCount : INIT_COUNT;
+            int count = _selectedItemId > 0 && _cfgSelected.itemId == _selectedItemId ? _selectedItemCount : INIT_COUNT;
             // BuyItemConteoller.Show(_cfgSelected.itemID, _cfgSelected.costID, INIT_COUNT, _cfgSelected.costNum, count, null, true, false, MAX_COUNT);
             count = Math.Max(1, count);
-            ShopDataManager.Instance.BuyItem(_cfgSelected.id, count, _storeId, _cfgSelected);
+            ShopViewManager.Instance.BuyItem(_cfgSelected.id, count, _storeId, _cfgSelected);
         }
         private void UpdateItemChange()
         {
@@ -182,19 +182,19 @@ namespace GFGGame
         {
 
             int typeIndex = _ui.m_comItemList.m_comBtnTab.m_c1.selectedIndex;
-            _dataList = ClothingShopCfgManager.Instance.GetList(_storeId, typeIndex, _scoreType);
+            _dataList = ShopDataManager.Instance.GetList(_storeId, typeIndex, _scoreType);
             _ui.m_comItemList.m_list.numItems = _dataList.Count;
 
 
             if (_ui.m_comItemList.m_list.numItems > 0)
             {
-                ShopCfg clothingShopCfg = ClothingShopCfgManager.Instance.GetShopCfg(_selectedItemClothingId, _storeId);
+                ShopCfg clothingShopCfg = ShopCfgArray.Instance.GetCfg(_selectedId);
                 int itemIndex = 0;
                 if (_selectedItemId > 0 && clothingShopCfg != null)
                 {
                     for (int i = 0; i < _dataList.Count; i++)
                     {
-                        if (_dataList[i].id == _selectedItemClothingId)
+                        if (_dataList[i].id == _selectedId)
                         {
                             itemIndex = i;
                             break;
@@ -221,16 +221,16 @@ namespace GFGGame
             ShopCfg cfg = _dataList[index];
             listItem.target.data = cfg;
             // listItem.m_grpSelect.visible = false;
-            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.itemID);
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.itemId);
             listItem.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
             string itemName = itemCfg.name;
             listItem.m_txtName.text = itemName;
             // RarityIconController.UpdateRarityIcon(listItem.m_rarity, cfg.itemID, false);
-            ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(cfg.costID);
+            ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(cfg.costId);
             listItem.m_iconPrice.url = "ui://CommonGame/" + costItemCfg.res;
-            listItem.m_imgOwned.visible = ItemDataManager.GetItemNum(cfg.itemID) > 0;
+            listItem.m_imgOwned.visible = ItemDataManager.GetItemNum(cfg.itemId) > 0;
             // listItem.m_txtPrice.text = ItemDataManager.GetItemNum(cfg.costID) >= cfg.costNum ? StringUtil.GetColorText(cfg.costNum.ToString(), "#DD994A") : StringUtil.GetColorText(cfg.costNum.ToString(), "#F2989B");
-            listItem.m_txtPrice.text = cfg.costNum.ToString();
+            listItem.m_txtPrice.text = cfg.price.ToString();
             UI_ListGalleryShopItem.ProxyEnd();
         }
         private void OnClickListShopItem(EventContext context)
@@ -252,7 +252,7 @@ namespace GFGGame
         }
         private void UpdateRole(bool tween)
         {
-            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.itemID);
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.itemId);
             string ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType);
             _ui.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg); ;
             // _ui.m_comRes.m_loaBg.visible = false;
@@ -332,7 +332,7 @@ namespace GFGGame
         }
         private void UpdateSelectedItemInfo()
         {
-            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.itemID);
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.itemId);
             _ui.m_txtName.text = itemCfg.name;
             _ui.m_txtDesc.text = itemCfg.desc;
         }

+ 10 - 10
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachView.cs

@@ -165,16 +165,16 @@ namespace GFGGame
                     // this.Hide();
                     isJump = ViewManager.Show<ClothingDecomposeView>(null, _fromeViewDatas);
                     break;
-                case ConstFunctionId.SHOP_GIFT_BAG:
-                    // this.Hide();
-                    int giftBagValue = int.Parse(infos[1]);
-                    isJump = ViewManager.Show<StoreView>(new object[] { ConstFunctionId.STORE_CHARGE, giftBagValue }, _fromeViewDatas);
-                    break;
-                case ConstFunctionId.SHOP_EXCHANGE:
-                    // this.Hide();
-                    int exchangeValue = int.Parse(infos[1]);
-                    isJump = ViewManager.Show<StoreView>(new object[] { ConstFunctionId.STORE_CHARGE, exchangeValue }, _fromeViewDatas);
-                    break;
+                // case ConstFunctionId.SHOP_GIFT_BAG:
+                //     // this.Hide();
+                //     int giftBagValue = int.Parse(infos[1]);
+                //     isJump = ViewManager.Show<StoreView>(new object[] { ConstFunctionId.STORE_CHARGE, giftBagValue }, _fromeViewDatas);
+                //     break;
+                // case ConstFunctionId.SHOP_EXCHANGE:
+                //     // this.Hide();
+                //     int exchangeValue = int.Parse(infos[1]);
+                //     isJump = ViewManager.Show<StoreView>(new object[] { ConstFunctionId.STORE_CHARGE, exchangeValue }, _fromeViewDatas);
+                //     break;
                 case ConstFunctionId.JU_QING_GUAN_QIA:
 
                     string value = infos[1];

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyCountView.cs

@@ -110,10 +110,10 @@ namespace GFGGame
             _shopType = shopType;
             if (buyType == ConstBuyType.TYPE_SHOP)
             {
-                ShopCfg shopCfg = ClothingShopCfgManager.Instance.GetShopCfg(buyId, shopType);
-                int maxBuyCount = (int)Math.Floor((decimal)(ItemDataManager.GetItemNum(shopCfg.costID) / shopCfg.costNum));
+                ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(buyId);
+                int maxBuyCount = (int)Math.Floor((decimal)(ItemDataManager.GetItemNum(shopCfg.costId) / shopCfg.price));
                 _maxCanBuy = Math.Min(maxCount, maxBuyCount);
-                _itemId = shopCfg.itemID;
+                _itemId = shopCfg.itemId;
 
             }
             else if (buyType == ConstBuyType.TYPE_ITEM)
@@ -281,7 +281,7 @@ namespace GFGGame
             if (_buyType == ConstBuyType.TYPE_SHOP)
             {
 
-                ClothingShopCfgManager.Instance.GetMoneyIdAndNum(_buyId, (int)count, _shopType, out _costId, out _costNum, out _buyNum);
+                ShopDataManager.Instance.GetMoneyIdAndNum(_buyId, (int)count, _shopType, out _costId, out _costNum, out _buyNum);
 
             }
             else if (_buyType == ConstBuyType.TYPE_ITEM)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/RechargeStore/ChargeStoreView.cs

@@ -74,7 +74,7 @@ namespace GFGGame
             item.target.data = index;
             item.m_txtName.text = string.Format("{0}{1}", itemData.itemNum, itemData.name);
             item.m_txtDesc.text = string.Format("首充赠送+{0}{1}", itemData.itemNum, itemData.name);
-            bool isDouble = StoreDataManager.Instance.GetRechargeBuyNumById(itemData.id) < itemData.doubleTimes;
+            bool isDouble = ShopDataManager.Instance.GetRechargeBuyNumById(itemData.id) < itemData.doubleTimes;
             item.m_imgDouble.visible = isDouble;
             item.m_txtDesc.visible = isDouble;
             item.m_icon.url = "ui://Store/sc_zizhuan_" + itemData.id;

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/RechargeStore/GiftBagBuyView.cs

@@ -46,7 +46,7 @@ namespace GFGGame
             _ui.m_txtName.text = cfg.name;
             _ui.m_loaIcon.url = ResPathUtil.GetIconPath(cfg.res, "png");//string.Format("ui://RechargeStore/{0}", cfg.res);
             _ui.m_list.numItems = cfg.itemsArr.Length;
-            _ui.m_c1.selectedIndex = StoreDataManager.Instance.GetGiftStateById(_giftId) ? 0 : 1;
+            _ui.m_c1.selectedIndex = ShopDataManager.Instance.GetGiftStateById(_giftId) ? 0 : 1;
             if (cfg.lockType == LockType.STORY_LV)
             {
                 StoryLevelCfg storyLevelCfg = StoryLevelCfgArray.Instance.GetCfg(cfg.storyLevelId);
@@ -56,10 +56,10 @@ namespace GFGGame
             {
                 _ui.m_txtLock.text = string.Format("角色达到{0}级解锁", cfg.lv);
             }
-            int buyNum = StoreDataManager.Instance.GetGiftBuyNumById(cfg.id);
-            _ui.m_txtLimit.text = string.Format("{0}({1}/{2})", StoreDataManager.Instance.refreshType[cfg.refreshType], StringUtil.GetColorText(buyNum.ToString(), "#DA8870"), cfg.maxBuyNum);
+            int buyNum = ShopDataManager.Instance.GetGiftBuyNumById(cfg.id);
+            _ui.m_txtLimit.text = string.Format("{0}({1}/{2})", ShopDataManager.Instance.refreshType[cfg.refreshType], StringUtil.GetColorText(buyNum.ToString(), "#DA8870"), cfg.maxBuyNum);
             // if (cfg.refreshType == RefreshType.NONE) _ui.m_txtLimit.text = "永久限购";
-            _ui.m_txtEndTime.text = StoreDataManager.Instance.GetEndTime(cfg.id);
+            _ui.m_txtEndTime.text = ShopDataManager.Instance.GetEndTime(cfg.id);
             _ui.m_grpEndTime.visible = cfg.endTime != "";
 
             _ui.m_txtOriginalPrice.text = NumberUtil.ChangeNumberUnit(cfg.originalPrice);// cfg.originalPrice.ToString();

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/RechargeStore/ItemExchangeView.cs

@@ -58,7 +58,7 @@ namespace GFGGame
             }
             else
             {
-                int lastBuyCount = cfg.maxLimit - StoreDataManager.Instance.GetExchangeBuyNumById(cfg.id);//剩余购买次数
+                int lastBuyCount = cfg.maxLimit - ShopDataManager.Instance.GetExchangeBuyNumById(cfg.id);//剩余购买次数
                 _maxCanBuy = Math.Min(curMoneyCanBuy, lastBuyCount);
             }
             _maxCanBuy = Math.Max(1, _maxCanBuy);

二进制
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes