|
@@ -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();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|