Kaynağa Gözat

修复导表没有数据的问题

tanghai 4 yıl önce
ebeveyn
işleme
62265228bd
31 değiştirilmiş dosya ile 89 ekleme ve 56 silme
  1. 4 0
      Config/AIConfigCategory.bytes
  2. 2 0
      Config/StartMachineConfigCategory.bytes
  3. 3 0
      Config/StartProcessConfigCategory.bytes
  4. 7 0
      Config/StartSceneConfigCategory.bytes
  5. 3 0
      Config/StartZoneConfigCategory.bytes
  6. 2 0
      Config/UnitConfigCategory.bytes
  7. 1 0
      Server/App/Program.cs
  8. 1 3
      Server/App/Template.txt
  9. 21 2
      Server/Hotfix/AppStart_Init.cs
  10. 4 2
      Server/Model/ExcelExporter/ExcelExporter.cs
  11. 1 3
      Server/Model/Generate/Config/AIConfig.cs
  12. 1 3
      Server/Model/Generate/Config/StartMachineConfig.cs
  13. 1 3
      Server/Model/Generate/Config/StartProcessConfig.cs
  14. 1 3
      Server/Model/Generate/Config/StartSceneConfig.cs
  15. 1 3
      Server/Model/Generate/Config/StartZoneConfig.cs
  16. 1 3
      Server/Model/Generate/Config/UnitConfig.cs
  17. 0 4
      Server/Model/Server.Model.csproj
  18. 7 7
      ThirdParty/ShareLib/ShareLib.csproj
  19. 4 0
      Unity/Assets/Bundles/Config/AIConfigCategory.bytes
  20. 2 0
      Unity/Assets/Bundles/Config/StartMachineConfigCategory.bytes
  21. 3 0
      Unity/Assets/Bundles/Config/StartProcessConfigCategory.bytes
  22. 7 0
      Unity/Assets/Bundles/Config/StartSceneConfigCategory.bytes
  23. 3 0
      Unity/Assets/Bundles/Config/StartZoneConfigCategory.bytes
  24. 2 0
      Unity/Assets/Bundles/Config/UnitConfigCategory.bytes
  25. 1 5
      Unity/Codes/Model/Generate/Config/AIConfig.cs
  26. 1 3
      Unity/Codes/Model/Generate/Config/StartMachineConfig.cs
  27. 1 3
      Unity/Codes/Model/Generate/Config/StartProcessConfig.cs
  28. 1 3
      Unity/Codes/Model/Generate/Config/StartSceneConfig.cs
  29. 1 3
      Unity/Codes/Model/Generate/Config/StartZoneConfig.cs
  30. 1 3
      Unity/Codes/Model/Generate/Config/UnitConfig.cs
  31. 1 0
      Unity/Codes/Model/Module/AI/AIConfig.cs

+ 4 - 0
Config/AIConfigCategory.bytes

@@ -0,0 +1,4 @@
+
+e"	AI_Attack
+f"	AI_XunLuo
+É"	AI_XunLuo

+ 2 - 0
Config/StartMachineConfigCategory.bytes

@@ -0,0 +1,2 @@
+
+	127.0.0.1	127.0.0.1"10000

+ 3 - 0
Config/StartProcessConfigCategory.bytes

@@ -0,0 +1,3 @@
+
+¡œ"Server
+¢œ"Robot

+ 7 - 0
Config/StartSceneConfigCategory.bytes

@@ -0,0 +1,7 @@
+
+"Realm*Realm0’N
+"Gate*Gate10“N
+"Gate*Gate20”N
+"Location*Location0•N
+"Map*Map0–N
+È"Robot*Robot01

+ 3 - 0
Config/StartZoneConfigCategory.bytes

@@ -0,0 +1,3 @@
+
+mongdb://127.0.0.1ET1
+mongdb://127.0.0.1ET2

+ 2 - 0
Config/UnitConfigCategory.bytes

@@ -0,0 +1,2 @@
+
+/é	米克尔带有强力攻击技能 (²0D

+ 1 - 0
Server/App/Program.cs

@@ -3,6 +3,7 @@ using System.Diagnostics;
 using System.IO;
 using System.Threading;
 using CommandLine;
+using MongoDB.Bson;
 using NLog;
 
 namespace ET

+ 1 - 3
Server/App/Template.txt

@@ -29,9 +29,7 @@ namespace ET
             foreach ((ConfigName) config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 21 - 2
Server/Hotfix/AppStart_Init.cs

@@ -1,3 +1,4 @@
+using System;
 using System.Net;
 
 namespace ET
@@ -11,13 +12,31 @@ namespace ET
                 case AppType.ExcelExporter:
                 {
                     Game.Options.Console = 1;
-                    ExcelExporter.Export();
+                    try
+                    {
+                        ExcelExporter.Export();
+                    }
+                    catch (Exception e)
+                    {
+                        Log.Console(e.ToString());
+                        System.Environment.Exit(1);
+                    }
+                    System.Environment.Exit(0);
                     return;
                 }
                 case AppType.Proto2CS:
                 {
                     Game.Options.Console = 1;
-                    Proto2CS.Export();
+                    try
+                    {
+                        Proto2CS.Export();
+                    }
+                    catch (Exception e)
+                    {
+                        Log.Console(e.ToString());
+                        System.Environment.Exit(1);
+                    }
+                    System.Environment.Exit(0);
                     return;
                 }
             }

+ 4 - 2
Server/Model/ExcelExporter/ExcelExporter.cs

@@ -6,6 +6,7 @@ using System.Text;
 using Microsoft.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp;
 using Microsoft.CodeAnalysis.Emit;
+using MongoDB.Bson;
 using MongoDB.Bson.Serialization;
 using OfficeOpenXml;
 using ProtoBuf;
@@ -172,7 +173,7 @@ namespace ET
             sb.AppendLine("{\"list\":[");
             foreach (ExcelWorksheet worksheet in p.Workbook.Worksheets)
             {
-                ExportSheetJson(worksheet, configType, sb);
+                ExportSheetJson(worksheet, name, configType, sb);
             }
             sb.AppendLine("]}");
             
@@ -188,7 +189,7 @@ namespace ET
             sw.Write(sb.ToString());
         }
         
-        static void ExportSheetJson(ExcelWorksheet worksheet, ConfigType configType, StringBuilder sb)
+        static void ExportSheetJson(ExcelWorksheet worksheet, string name, ConfigType configType, StringBuilder sb)
         {
             int infoRow = 2;
             HeadInfo[] headInfos = new HeadInfo[100];
@@ -219,6 +220,7 @@ namespace ET
                     continue;
                 }
                 sb.Append("{");
+                sb.Append($"\"_t\":\"{name}\",");
                 for (int col = 3; col <= worksheet.Dimension.End.Column; ++col)
                 {
                     HeadInfo headInfo = headInfos[col];

+ 1 - 3
Server/Model/Generate/Config/AIConfig.cs

@@ -29,9 +29,7 @@ namespace ET
             foreach (AIConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 1 - 3
Server/Model/Generate/Config/StartMachineConfig.cs

@@ -29,9 +29,7 @@ namespace ET
             foreach (StartMachineConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 1 - 3
Server/Model/Generate/Config/StartProcessConfig.cs

@@ -29,9 +29,7 @@ namespace ET
             foreach (StartProcessConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 1 - 3
Server/Model/Generate/Config/StartSceneConfig.cs

@@ -29,9 +29,7 @@ namespace ET
             foreach (StartSceneConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 1 - 3
Server/Model/Generate/Config/StartZoneConfig.cs

@@ -29,9 +29,7 @@ namespace ET
             foreach (StartZoneConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 1 - 3
Server/Model/Generate/Config/UnitConfig.cs

@@ -29,9 +29,7 @@ namespace ET
             foreach (UnitConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 0 - 4
Server/Model/Server.Model.csproj

@@ -106,10 +106,6 @@
       <Link>Module\Message\%(RecursiveDir)%(FileName)%(Extension)</Link>
     </Compile>
   </ItemGroup>
-  
-  <ItemGroup>
-    <PackageReference Include="MongoDB.Driver" Version="2.13.0" />
-  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\ThirdParty\ShareLib\ShareLib.csproj" />
     <ProjectReference Include="..\..\ThirdParty\UnityEngine\UnityEngine.csproj" />

+ 7 - 7
ThirdParty/ShareLib/ShareLib.csproj

@@ -47,14 +47,14 @@
 
     <ItemGroup>
       <PackageReference Include="CommandLineParser" Version="2.8.0" />
-      <PackageReference Include="EPPlus" Version="5.7.4" />
-      <PackageReference Include="Microsoft.CodeAnalysis.Common" Version="3.11.0" />
-      <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.11.0" />
-      <PackageReference Include="mongocsharpdriver" Version="2.13.0" />
-      <PackageReference Include="MongoDB.Bson" Version="2.13.0" />
-      <PackageReference Include="NLog" Version="4.7.10" />
+      <PackageReference Include="EPPlus" Version="5.8.3" />
+      <PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.0.1" />
+      <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
+      <PackageReference Include="mongocsharpdriver" Version="2.13.3" />
+      <PackageReference Include="MongoDB.Bson" Version="2.13.3" />
+      <PackageReference Include="NLog" Version="4.7.12" />
       <PackageReference Include="protobuf-net" Version="2.4.0" />
-      <PackageReference Include="SharpZipLib" Version="1.3.2" />
+      <PackageReference Include="SharpZipLib" Version="1.3.3" />
     </ItemGroup>
 
 </Project>

+ 4 - 0
Unity/Assets/Bundles/Config/AIConfigCategory.bytes

@@ -0,0 +1,4 @@
+
+e"	AI_Attack
+f"	AI_XunLuo
+É"	AI_XunLuo

+ 2 - 0
Unity/Assets/Bundles/Config/StartMachineConfigCategory.bytes

@@ -0,0 +1,2 @@
+
+	127.0.0.1	127.0.0.1"10000

+ 3 - 0
Unity/Assets/Bundles/Config/StartProcessConfigCategory.bytes

@@ -0,0 +1,3 @@
+
+¡œ"Server
+¢œ"Robot

+ 7 - 0
Unity/Assets/Bundles/Config/StartSceneConfigCategory.bytes

@@ -0,0 +1,7 @@
+
+"Realm*Realm0’N
+"Gate*Gate10“N
+"Gate*Gate20”N
+"Location*Location0•N
+"Map*Map0–N
+È"Robot*Robot01

+ 3 - 0
Unity/Assets/Bundles/Config/StartZoneConfigCategory.bytes

@@ -0,0 +1,3 @@
+
+mongdb://127.0.0.1ET1
+mongdb://127.0.0.1ET2

+ 2 - 0
Unity/Assets/Bundles/Config/UnitConfigCategory.bytes

@@ -0,0 +1,2 @@
+
+/é	米克尔带有强力攻击技能 (²0D

+ 1 - 5
Unity/Codes/Model/Generate/Config/AIConfig.cs

@@ -26,14 +26,10 @@ namespace ET
 		
         public override void EndInit()
         {
-            Log.Debug($"1111111111111111111111111111: {this.list.Count}");
-            
             foreach (AIConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 1 - 3
Unity/Codes/Model/Generate/Config/StartMachineConfig.cs

@@ -29,9 +29,7 @@ namespace ET
             foreach (StartMachineConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 1 - 3
Unity/Codes/Model/Generate/Config/StartProcessConfig.cs

@@ -29,9 +29,7 @@ namespace ET
             foreach (StartProcessConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 1 - 3
Unity/Codes/Model/Generate/Config/StartSceneConfig.cs

@@ -29,9 +29,7 @@ namespace ET
             foreach (StartSceneConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 1 - 3
Unity/Codes/Model/Generate/Config/StartZoneConfig.cs

@@ -29,9 +29,7 @@ namespace ET
             foreach (StartZoneConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 1 - 3
Unity/Codes/Model/Generate/Config/UnitConfig.cs

@@ -29,9 +29,7 @@ namespace ET
             foreach (UnitConfig config in list)
             {
                 this.dict.Add(config.Id, config);
-            }
-            list.Clear();
-            
+            }            
             this.AfterEndInit();
         }
 		

+ 1 - 0
Unity/Codes/Model/Module/AI/AIConfig.cs

@@ -9,6 +9,7 @@ namespace ET
 	public partial class AIConfigCategory
 	{
 		[ProtoIgnore]
+		[BsonIgnore]
 		public Dictionary<int, SortedDictionary<int, AIConfig>> AIConfigs = new Dictionary<int, SortedDictionary<int, AIConfig>>();
 
 		public SortedDictionary<int, AIConfig> GetAI(int aiConfigId)