zhaoyang 3 년 전
부모
커밋
fcd70895ff

+ 2 - 0
GameClient/Assets/Editor/Excel/ExcelScanner.cs

@@ -18,6 +18,8 @@ namespace GFGEditor
             InstanceZonesScanner.StartScan();
             //写入卡牌最大等级
             CardScanner.StartScan();
+
+            GiftBagScanner.StartScan();
         }
     }
 }

+ 59 - 0
GameClient/Assets/Editor/Excel/Scanner/GiftBagScanner.cs

@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using GFGGame;
+
+namespace GFGEditor
+{
+    public class GiftBagScanner
+    {//计算每个副本的关卡数
+        // private static Dictionary<int, int> levelCountDIc = new Dictionary<int, int>();
+        public static void StartScan()
+        {
+            var dataArray = GiftBagCfgArray.Instance.dataArray;
+            SQLiteHelper.Instance.OpenConnection();
+            try
+            {
+                foreach (var cfg in dataArray)
+                {
+                    int type = 0;
+                    if (cfg.costId == 0)
+                    {
+
+                    }
+                    switch (cfg.costId)
+                    {
+                        case 0:
+                            type = 0;
+                            break;
+                        case ConstItemID.DIAMOND_RED:
+                            type = 1;
+                            break;
+                        case 2:
+                            type = 2;
+                            break;
+                        default:
+                            type = 3;
+                            break;
+                    }
+                    // count++;
+
+                    var names = new string[] { nameof(cfg.costType) };
+                    var values = new string[] { "" + type };
+                    SQLiteHelper.Instance.UpdateValues(nameof(GiftBagCfgArray), names, values, nameof(cfg.id), cfg.id.ToString());
+                }
+            }
+            catch (Exception e)
+            {
+                ET.Log.Error(e.ToString());
+            }
+            finally
+            {
+                SQLiteHelper.Instance.CloseConnection();
+            }
+
+            //写入
+            // WriteStoryChapter();
+            // WriteStudioChapter();
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Editor/Excel/Scanner/GiftBagScanner.cs.meta

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

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