Browse Source

商店配置

guodong 3 years ago
parent
commit
ca83b9d856

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

@@ -122,9 +122,9 @@ namespace GFGEditor
 
         private static void CheckClothingShopCfg()
         {
-            ClothingShopCfgArray cfgArray = ClothingShopCfgArray.Instance;
-            ClothingShopCfg[] dataArray = cfgArray.dataArray;
-            foreach(ClothingShopCfg cfg in dataArray)
+            ShopCfgClothingArray cfgArray = ShopCfgClothingArray.Instance;
+            ShopCfg[] dataArray = cfgArray.dataArray;
+            foreach(ShopCfg cfg in dataArray)
             {
                 CheckItemIdExist(cfg.itemID, "商城ClothingShopCfg.itemID");
                 CheckItemIdExist(cfg.costID, "商城ClothingShopCfg.costID");

+ 3 - 3
GameClient/Assets/Editor/Excel/Scanner/ItemApproachScanner.cs

@@ -87,9 +87,9 @@ namespace GFGEditor
         /// <returns></returns>
         private static string GetClothingShopApproach(int itemId)
         {
-            ClothingShopCfgArray manager = ClothingShopCfgArray.Instance;
-            ClothingShopCfg[] dataArray = manager.dataArray;
-            foreach (ClothingShopCfg cfg in dataArray)
+            ShopCfgClothingArray manager = ShopCfgClothingArray.Instance;
+            ShopCfg[] dataArray = manager.dataArray;
+            foreach (ShopCfg cfg in dataArray)
             {
                 if (cfg.itemID == itemId)
                 {

+ 1 - 1
GameClient/Assets/Game/CSShare

@@ -1 +1 @@
-Subproject commit 294f9d5d7fd36d34c9e4810b49b534f864203b5c
+Subproject commit d87939e6c69cdb1f76627f49516295bdca99eeb2

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

@@ -5,11 +5,11 @@ namespace GFGGame
     public class ClothingShopCfgManager : SingletonBase<ClothingShopCfgManager>
     {
         private bool _inited;
-        private Dictionary<int, Dictionary<int, List<ClothingShopCfg>>> _dataDic = new Dictionary<int, Dictionary<int, List<ClothingShopCfg>>>();
+        private Dictionary<int, Dictionary<int, List<ShopCfg>>> _dataDic = new Dictionary<int, Dictionary<int, List<ShopCfg>>>();
 
-        public List<ClothingShopCfg> GetList(int storeId, int typeIndex, int scoreType)
+        public List<ShopCfg> GetList(int storeId, int typeIndex, int scoreType)
         {
-            List<ClothingShopCfg> list = new List<ClothingShopCfg>();
+            List<ShopCfg> list = new List<ShopCfg>();
             InitData();
             if (_dataDic.ContainsKey(storeId) && _dataDic[storeId].ContainsKey(typeIndex))
             {
@@ -19,9 +19,9 @@ namespace GFGGame
             return list;
         }
 
-        private List<ClothingShopCfg> SortItemListByScore(List<ClothingShopCfg> arrayList, int scoreType)
+        private List<ShopCfg> SortItemListByScore(List<ShopCfg> arrayList, int scoreType)
         {
-            arrayList.Sort((ClothingShopCfg a, ClothingShopCfg b) =>
+            arrayList.Sort((ShopCfg a, ShopCfg b) =>
             {
                 int numA = ItemDataManager.GetItemNum(a.itemID);
                 int numB = ItemDataManager.GetItemNum(b.itemID);
@@ -60,43 +60,43 @@ namespace GFGGame
                 return;
             }
             _inited = true;
-            ClothingShopCfg[] clotiongDataArray = ClothingShopCfgArray.Instance.dataArray;
-            foreach (ClothingShopCfg cfg in clotiongDataArray)
+            ShopCfg[] clotiongDataArray = ShopCfgClothingArray.Instance.dataArray;
+            foreach (ShopCfg cfg in clotiongDataArray)
             {
                 if (_dataDic.ContainsKey(ConstStoreId.CLOTHING_STORE_ID)==false){
-                    _dataDic[ConstStoreId.CLOTHING_STORE_ID] = new Dictionary<int, List<ClothingShopCfg>>();
+                    _dataDic[ConstStoreId.CLOTHING_STORE_ID] = new Dictionary<int, List<ShopCfg>>();
                 }
                 if (_dataDic[ConstStoreId.CLOTHING_STORE_ID].ContainsKey(cfg.typeIndex)==false)
                 {
-                    _dataDic[ConstStoreId.CLOTHING_STORE_ID][cfg.typeIndex] = new List<ClothingShopCfg>();
+                    _dataDic[ConstStoreId.CLOTHING_STORE_ID][cfg.typeIndex] = new List<ShopCfg>();
                 }
                 _dataDic[ConstStoreId.CLOTHING_STORE_ID][cfg.typeIndex].Add(cfg);
             }
 
-            ClothingShopCfg[] clothingCJDataArray = ClothingShopCfgCJArray.Instance.dataArray;
-            foreach (ClothingShopCfg cfg in clothingCJDataArray)
+            ShopCfg[] clothingCJDataArray = ShopCfgCJArray.Instance.dataArray;
+            foreach (ShopCfg cfg in clothingCJDataArray)
             {
                 if (_dataDic.ContainsKey(ConstStoreId.LUCKY_BOX_STORE_ID) == false)
                 {
-                    _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID] = new Dictionary<int, List<ClothingShopCfg>>();
+                    _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID] = new Dictionary<int, List<ShopCfg>>();
                 }
                 if (_dataDic[ConstStoreId.LUCKY_BOX_STORE_ID].ContainsKey(cfg.typeIndex) == false)
                 {
-                    _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID][cfg.typeIndex] = new List<ClothingShopCfg>();
+                    _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID][cfg.typeIndex] = new List<ShopCfg>();
                 }
                 _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID][cfg.typeIndex].Add(cfg);
             }
 
-            ClothingShopCfg[] clothingCJADataArray = ClothingShopCfgCJArray.Instance.dataArray;
-            foreach (ClothingShopCfg cfg in clothingCJADataArray)
+            ShopCfg[] clothingCJADataArray = ShopCfgCJArray.Instance.dataArray;
+            foreach (ShopCfg cfg in clothingCJADataArray)
             {
                 if (_dataDic.ContainsKey(ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID) == false)
                 {
-                    _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID] = new Dictionary<int, List<ClothingShopCfg>>();
+                    _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID] = new Dictionary<int, List<ShopCfg>>();
                 }
                 if (_dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID].ContainsKey(cfg.typeIndex) == false)
                 {
-                    _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID][cfg.typeIndex] = new List<ClothingShopCfg>();
+                    _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID][cfg.typeIndex] = new List<ShopCfg>();
                 }
                 _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID][cfg.typeIndex].Add(cfg);
             }

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

@@ -22,9 +22,9 @@ namespace GFGGame
         private GoWrapper _wrapper;
         private DressUpObjDataCache _dressUpObjDataCache;
         private ValueBarController _valueBarController;
-        private List<ClothingShopCfg> _dataList;
+        private List<ShopCfg> _dataList;
         private GLoader _imgSelected;
-        private ClothingShopCfg _cfgSelected;
+        private ShopCfg _cfgSelected;
         private const int MAX_COUNT = 99;
         private const int INIT_COUNT = 1;
         private int _scoreType;
@@ -120,7 +120,7 @@ namespace GFGGame
                 {
                     _selectedItemId = (int)objs[2];//从物品来源面板跳转到商店,需要物品id方便打开界面时做选中处理
                     _selectedItemCount = (int)objs[3];
-                    ClothingShopCfg[] dataArray = ClothingShopCfgArray.Instance.dataArray;
+                    ShopCfg[] dataArray = ShopCfgClothingArray.Instance.dataArray;
                     for (int i = 0; i < dataArray.Length; i++)
                     {
                         if (dataArray[i].itemID == _selectedItemId)
@@ -269,7 +269,7 @@ namespace GFGGame
 
             if (_ui.m_listShop.numItems > 0)
             {
-                ClothingShopCfg clothingShopCfg = ClothingShopCfgArray.Instance.GetCfg(_selectedItemClothingId);
+                ShopCfg clothingShopCfg = ShopCfgClothingArray.Instance.GetCfg(_selectedItemClothingId);
                 int itemIndex = 0;
                 if (_selectedItemId > 0 && clothingShopCfg != null)
                 {
@@ -297,7 +297,7 @@ namespace GFGGame
         private void ListShopItemRender(int index, GObject item)
         {
             UI_ShopListItemRender listItem = UI_ShopListItemRender.Proxy(item);
-            ClothingShopCfg cfg = _dataList[index];
+            ShopCfg cfg = _dataList[index];
             listItem.target.data = cfg;
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.itemID);
             listItem.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
@@ -314,7 +314,7 @@ namespace GFGGame
         {
             _selectedListItem = listItem;
             listItem.AddChild(_imgSelected);
-            ClothingShopCfg cfg = listItem.data as ClothingShopCfg;
+            ShopCfg cfg = listItem.data as ShopCfg;
             _cfgSelected = cfg;
             UpdateRole(tween);
             UpdateSelectedItemInfo();

BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes