瀏覽代碼

修改配置导出直接到server目录,与unity分开

大爷 2 年之前
父節點
當前提交
8d4b2075dc

+ 37 - 0
DotNet/Model/ConfigPartial/StartProcessConfig.cs

@@ -0,0 +1,37 @@
+using System.Net;
+
+namespace ET
+{
+    public partial class StartProcessConfig
+    {
+        private IPEndPoint innerIPPort;
+
+        public long SceneId;
+
+        public IPEndPoint InnerIPPort
+        {
+            get
+            {
+                if (this.innerIPPort == null)
+                {
+                    this.innerIPPort = NetworkHelper.ToIPEndPoint($"{this.InnerIP}:{this.InnerPort}");
+                }
+
+                return this.innerIPPort;
+            }
+        }
+
+        public string InnerIP => this.StartMachineConfig.InnerIP;
+
+        public string OuterIP => this.StartMachineConfig.OuterIP;
+
+        public StartMachineConfig StartMachineConfig => StartMachineConfigCategory.Instance.Get(this.MachineId);
+
+        public override void AfterEndInit()
+        {
+            InstanceIdStruct instanceIdStruct = new InstanceIdStruct((int)this.Id, 0);
+            this.SceneId = instanceIdStruct.ToLong();
+            Log.Info($"StartProcess info: machineId={this.MachineId}, id={this.Id}, sceneId={this.SceneId}");
+        }
+    }
+}

+ 11 - 0
DotNet/Model/ConfigPartial/StartProcessConfig.cs.meta

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

+ 133 - 0
DotNet/Model/ConfigPartial/StartSceneConfig.cs

@@ -0,0 +1,133 @@
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Net;
+
+namespace ET
+{
+    public partial class StartSceneConfigCategory
+    {
+        public MultiMap<int, StartSceneConfig> Gates = new MultiMap<int, StartSceneConfig>();
+        
+        public MultiMap<int, StartSceneConfig> ProcessScenes = new MultiMap<int, StartSceneConfig>();
+        
+        public Dictionary<long, Dictionary<string, StartSceneConfig>> ClientScenesByName = new Dictionary<long, Dictionary<string, StartSceneConfig>>();
+
+        public StartSceneConfig LocationConfig;
+
+        public List<StartSceneConfig> Realms = new List<StartSceneConfig>();
+        
+        public List<StartSceneConfig> Routers = new List<StartSceneConfig>();
+        
+        public List<StartSceneConfig> Robots = new List<StartSceneConfig>();
+
+        public StartSceneConfig BenchmarkServer;
+        
+        public List<StartSceneConfig> GetByProcess(int process)
+        {
+            return this.ProcessScenes[process];
+        }
+        
+        public StartSceneConfig GetBySceneName(int zone, string name)
+        {
+            return this.ClientScenesByName[zone][name];
+        }
+
+        public override void AfterEndInit()
+        {
+            foreach (StartSceneConfig startSceneConfig in this.GetAll().Values)
+            {
+                this.ProcessScenes.Add(startSceneConfig.Process, startSceneConfig);
+                
+                if (!this.ClientScenesByName.ContainsKey(startSceneConfig.Zone))
+                {
+                    this.ClientScenesByName.Add(startSceneConfig.Zone, new Dictionary<string, StartSceneConfig>());
+                }
+                this.ClientScenesByName[startSceneConfig.Zone].Add(startSceneConfig.Name, startSceneConfig);
+                
+                switch (startSceneConfig.Type)
+                {
+                    case SceneType.Realm:
+                        this.Realms.Add(startSceneConfig);
+                        break;
+                    case SceneType.Gate:
+                        this.Gates.Add(startSceneConfig.Zone, startSceneConfig);
+                        break;
+                    case SceneType.Location:
+                        this.LocationConfig = startSceneConfig;
+                        break;
+                    case SceneType.Robot:
+                        this.Robots.Add(startSceneConfig);
+                        break;
+                    case SceneType.Router:
+                        this.Routers.Add(startSceneConfig);
+                        break;
+                    case SceneType.BenchmarkServer:
+                        this.BenchmarkServer = startSceneConfig;
+                        break;
+                }
+            }
+        }
+    }
+    
+    public partial class StartSceneConfig: ISupportInitialize
+    {
+        public long InstanceId;
+        
+        public SceneType Type;
+
+        public StartProcessConfig StartProcessConfig
+        {
+            get
+            {
+                return StartProcessConfigCategory.Instance.Get(this.Process);
+            }
+        }
+        
+        public StartZoneConfig StartZoneConfig
+        {
+            get
+            {
+                return StartZoneConfigCategory.Instance.Get(this.Zone);
+            }
+        }
+
+        // 内网地址外网端口,通过防火墙映射端口过来
+        private IPEndPoint innerIPOutPort;
+
+        public IPEndPoint InnerIPOutPort
+        {
+            get
+            {
+                if (innerIPOutPort == null)
+                {
+                    this.innerIPOutPort = NetworkHelper.ToIPEndPoint($"{this.StartProcessConfig.InnerIP}:{this.OuterPort}");
+                }
+
+                return this.innerIPOutPort;
+            }
+        }
+
+        private IPEndPoint outerIPPort;
+
+        // 外网地址外网端口
+        public IPEndPoint OuterIPPort
+        {
+            get
+            {
+                if (this.outerIPPort == null)
+                {
+                    this.outerIPPort = NetworkHelper.ToIPEndPoint($"{this.StartProcessConfig.OuterIP}:{this.OuterPort}");
+                }
+
+                return this.outerIPPort;
+            }
+        }
+
+        public override void AfterEndInit()
+        {
+            this.Type = EnumHelper.FromString<SceneType>(this.SceneType);
+            InstanceIdStruct instanceIdStruct = new InstanceIdStruct(this.Process, (uint) this.Id);
+            this.InstanceId = instanceIdStruct.ToLong();
+        }
+    }
+}

+ 11 - 0
DotNet/Model/ConfigPartial/StartSceneConfig.cs.meta

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

+ 0 - 3
DotNet/Model/DotNet.Model.csproj

@@ -27,9 +27,6 @@
         <Compile Include="..\..\Unity\Assets\Scripts\Codes\Model\Share\**\*.cs">
             <Link>Share\%(RecursiveDir)%(FileName)%(Extension)</Link>
         </Compile>
-        <Compile Include="..\..\Unity\Assets\Scripts\Codes\Model\Generate\Server\**\*.cs"> 
-            <Link>Generate\%(RecursiveDir)%(FileName)%(Extension)</Link>
-        </Compile>
         
     </ItemGroup> 
     <ItemGroup> 

+ 91 - 0
DotNet/Model/Generate/Config/AIConfig.cs

@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using MongoDB.Bson.Serialization.Attributes;
+using ProtoBuf;
+
+namespace ET
+{
+    [ProtoContract]
+    [Config]
+    public partial class AIConfigCategory : ConfigSingleton<AIConfigCategory>, IMerge
+    {
+        [ProtoIgnore]
+        [BsonIgnore]
+        private Dictionary<int, AIConfig> dict = new Dictionary<int, AIConfig>();
+		
+        [BsonElement]
+        [ProtoMember(1)]
+        private List<AIConfig> list = new List<AIConfig>();
+		
+        public void Merge(object o)
+        {
+            AIConfigCategory s = o as AIConfigCategory;
+            this.list.AddRange(s.list);
+        }
+		
+		[ProtoAfterDeserialization]        
+        public void ProtoEndInit()
+        {
+            foreach (AIConfig config in list)
+            {
+                config.AfterEndInit();
+                this.dict.Add(config.Id, config);
+            }
+            this.list.Clear();
+            
+            this.AfterEndInit();
+        }
+		
+        public AIConfig Get(int id)
+        {
+            this.dict.TryGetValue(id, out AIConfig item);
+
+            if (item == null)
+            {
+                throw new Exception($"配置找不到,配置表名: {nameof (AIConfig)},配置id: {id}");
+            }
+
+            return item;
+        }
+		
+        public bool Contain(int id)
+        {
+            return this.dict.ContainsKey(id);
+        }
+
+        public Dictionary<int, AIConfig> GetAll()
+        {
+            return this.dict;
+        }
+
+        public AIConfig GetOne()
+        {
+            if (this.dict == null || this.dict.Count <= 0)
+            {
+                return null;
+            }
+            return this.dict.Values.GetEnumerator().Current;
+        }
+    }
+
+    [ProtoContract]
+	public partial class AIConfig: ProtoObject, IConfig
+	{
+		/// <summary>Id</summary>
+		[ProtoMember(1)]
+		public int Id { get; set; }
+		/// <summary>所属ai</summary>
+		[ProtoMember(2)]
+		public int AIConfigId { get; set; }
+		/// <summary>此ai中的顺序</summary>
+		[ProtoMember(3)]
+		public int Order { get; set; }
+		/// <summary>节点名字</summary>
+		[ProtoMember(4)]
+		public string Name { get; set; }
+		/// <summary>节点参数</summary>
+		[ProtoMember(5)]
+		public int[] NodeParams { get; set; }
+
+	}
+}

+ 91 - 0
DotNet/Model/Generate/Config/StartMachineConfig.cs

@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using MongoDB.Bson.Serialization.Attributes;
+using ProtoBuf;
+
+namespace ET
+{
+    [ProtoContract]
+    [Config]
+    public partial class StartMachineConfigCategory : ConfigSingleton<StartMachineConfigCategory>, IMerge
+    {
+        [ProtoIgnore]
+        [BsonIgnore]
+        private Dictionary<int, StartMachineConfig> dict = new Dictionary<int, StartMachineConfig>();
+		
+        [BsonElement]
+        [ProtoMember(1)]
+        private List<StartMachineConfig> list = new List<StartMachineConfig>();
+		
+        public void Merge(object o)
+        {
+            StartMachineConfigCategory s = o as StartMachineConfigCategory;
+            this.list.AddRange(s.list);
+        }
+		
+		[ProtoAfterDeserialization]        
+        public void ProtoEndInit()
+        {
+            foreach (StartMachineConfig config in list)
+            {
+                config.AfterEndInit();
+                this.dict.Add(config.Id, config);
+            }
+            this.list.Clear();
+            
+            this.AfterEndInit();
+        }
+		
+        public StartMachineConfig Get(int id)
+        {
+            this.dict.TryGetValue(id, out StartMachineConfig item);
+
+            if (item == null)
+            {
+                throw new Exception($"配置找不到,配置表名: {nameof (StartMachineConfig)},配置id: {id}");
+            }
+
+            return item;
+        }
+		
+        public bool Contain(int id)
+        {
+            return this.dict.ContainsKey(id);
+        }
+
+        public Dictionary<int, StartMachineConfig> GetAll()
+        {
+            return this.dict;
+        }
+
+        public StartMachineConfig GetOne()
+        {
+            if (this.dict == null || this.dict.Count <= 0)
+            {
+                return null;
+            }
+            return this.dict.Values.GetEnumerator().Current;
+        }
+    }
+
+    [ProtoContract]
+	public partial class StartMachineConfig: ProtoObject, IConfig
+	{
+		/// <summary>Id</summary>
+		[ProtoMember(1)]
+		public int Id { get; set; }
+		/// <summary>内网地址</summary>
+		[ProtoMember(2)]
+		public string InnerIP { get; set; }
+		/// <summary>外网地址</summary>
+		[ProtoMember(3)]
+		public string OuterIP { get; set; }
+		/// <summary>守护进程端口</summary>
+		[ProtoMember(4)]
+		public string WatcherPort { get; set; }
+		/// <summary>与战斗服交互用,游戏服id</summary>
+		[ProtoMember(5)]
+		public int GameServerId { get; set; }
+
+	}
+}

+ 85 - 0
DotNet/Model/Generate/Config/StartProcessConfig.cs

@@ -0,0 +1,85 @@
+using System;
+using System.Collections.Generic;
+using MongoDB.Bson.Serialization.Attributes;
+using ProtoBuf;
+
+namespace ET
+{
+    [ProtoContract]
+    [Config]
+    public partial class StartProcessConfigCategory : ConfigSingleton<StartProcessConfigCategory>, IMerge
+    {
+        [ProtoIgnore]
+        [BsonIgnore]
+        private Dictionary<int, StartProcessConfig> dict = new Dictionary<int, StartProcessConfig>();
+		
+        [BsonElement]
+        [ProtoMember(1)]
+        private List<StartProcessConfig> list = new List<StartProcessConfig>();
+		
+        public void Merge(object o)
+        {
+            StartProcessConfigCategory s = o as StartProcessConfigCategory;
+            this.list.AddRange(s.list);
+        }
+		
+		[ProtoAfterDeserialization]        
+        public void ProtoEndInit()
+        {
+            foreach (StartProcessConfig config in list)
+            {
+                config.AfterEndInit();
+                this.dict.Add(config.Id, config);
+            }
+            this.list.Clear();
+            
+            this.AfterEndInit();
+        }
+		
+        public StartProcessConfig Get(int id)
+        {
+            this.dict.TryGetValue(id, out StartProcessConfig item);
+
+            if (item == null)
+            {
+                throw new Exception($"配置找不到,配置表名: {nameof (StartProcessConfig)},配置id: {id}");
+            }
+
+            return item;
+        }
+		
+        public bool Contain(int id)
+        {
+            return this.dict.ContainsKey(id);
+        }
+
+        public Dictionary<int, StartProcessConfig> GetAll()
+        {
+            return this.dict;
+        }
+
+        public StartProcessConfig GetOne()
+        {
+            if (this.dict == null || this.dict.Count <= 0)
+            {
+                return null;
+            }
+            return this.dict.Values.GetEnumerator().Current;
+        }
+    }
+
+    [ProtoContract]
+	public partial class StartProcessConfig: ProtoObject, IConfig
+	{
+		/// <summary>Id</summary>
+		[ProtoMember(1)]
+		public int Id { get; set; }
+		/// <summary>所属机器</summary>
+		[ProtoMember(2)]
+		public int MachineId { get; set; }
+		/// <summary>内网端口</summary>
+		[ProtoMember(3)]
+		public int InnerPort { get; set; }
+
+	}
+}

+ 94 - 0
DotNet/Model/Generate/Config/StartSceneConfig.cs

@@ -0,0 +1,94 @@
+using System;
+using System.Collections.Generic;
+using MongoDB.Bson.Serialization.Attributes;
+using ProtoBuf;
+
+namespace ET
+{
+    [ProtoContract]
+    [Config]
+    public partial class StartSceneConfigCategory : ConfigSingleton<StartSceneConfigCategory>, IMerge
+    {
+        [ProtoIgnore]
+        [BsonIgnore]
+        private Dictionary<int, StartSceneConfig> dict = new Dictionary<int, StartSceneConfig>();
+		
+        [BsonElement]
+        [ProtoMember(1)]
+        private List<StartSceneConfig> list = new List<StartSceneConfig>();
+		
+        public void Merge(object o)
+        {
+            StartSceneConfigCategory s = o as StartSceneConfigCategory;
+            this.list.AddRange(s.list);
+        }
+		
+		[ProtoAfterDeserialization]        
+        public void ProtoEndInit()
+        {
+            foreach (StartSceneConfig config in list)
+            {
+                config.AfterEndInit();
+                this.dict.Add(config.Id, config);
+            }
+            this.list.Clear();
+            
+            this.AfterEndInit();
+        }
+		
+        public StartSceneConfig Get(int id)
+        {
+            this.dict.TryGetValue(id, out StartSceneConfig item);
+
+            if (item == null)
+            {
+                throw new Exception($"配置找不到,配置表名: {nameof (StartSceneConfig)},配置id: {id}");
+            }
+
+            return item;
+        }
+		
+        public bool Contain(int id)
+        {
+            return this.dict.ContainsKey(id);
+        }
+
+        public Dictionary<int, StartSceneConfig> GetAll()
+        {
+            return this.dict;
+        }
+
+        public StartSceneConfig GetOne()
+        {
+            if (this.dict == null || this.dict.Count <= 0)
+            {
+                return null;
+            }
+            return this.dict.Values.GetEnumerator().Current;
+        }
+    }
+
+    [ProtoContract]
+	public partial class StartSceneConfig: ProtoObject, IConfig
+	{
+		/// <summary>Id</summary>
+		[ProtoMember(1)]
+		public int Id { get; set; }
+		/// <summary>所属进程</summary>
+		[ProtoMember(2)]
+		public int Process { get; set; }
+		/// <summary>所属区</summary>
+		[ProtoMember(3)]
+		public int Zone { get; set; }
+		/// <summary>类型</summary>
+		[ProtoMember(4)]
+		public string SceneType { get; set; }
+		/// <summary>名字</summary>
+		[ProtoMember(5)]
+		public string Name { get; set; }
+		/// <summary>外网端口</summary>
+		[ProtoMember(6)]
+		public int OuterPort { get; set; }
+
+	}
+}

+ 85 - 0
DotNet/Model/Generate/Config/StartZoneConfig.cs

@@ -0,0 +1,85 @@
+using System;
+using System.Collections.Generic;
+using MongoDB.Bson.Serialization.Attributes;
+using ProtoBuf;
+
+namespace ET
+{
+    [ProtoContract]
+    [Config]
+    public partial class StartZoneConfigCategory : ConfigSingleton<StartZoneConfigCategory>, IMerge
+    {
+        [ProtoIgnore]
+        [BsonIgnore]
+        private Dictionary<int, StartZoneConfig> dict = new Dictionary<int, StartZoneConfig>();
+		
+        [BsonElement]
+        [ProtoMember(1)]
+        private List<StartZoneConfig> list = new List<StartZoneConfig>();
+		
+        public void Merge(object o)
+        {
+            StartZoneConfigCategory s = o as StartZoneConfigCategory;
+            this.list.AddRange(s.list);
+        }
+		
+		[ProtoAfterDeserialization]        
+        public void ProtoEndInit()
+        {
+            foreach (StartZoneConfig config in list)
+            {
+                config.AfterEndInit();
+                this.dict.Add(config.Id, config);
+            }
+            this.list.Clear();
+            
+            this.AfterEndInit();
+        }
+		
+        public StartZoneConfig Get(int id)
+        {
+            this.dict.TryGetValue(id, out StartZoneConfig item);
+
+            if (item == null)
+            {
+                throw new Exception($"配置找不到,配置表名: {nameof (StartZoneConfig)},配置id: {id}");
+            }
+
+            return item;
+        }
+		
+        public bool Contain(int id)
+        {
+            return this.dict.ContainsKey(id);
+        }
+
+        public Dictionary<int, StartZoneConfig> GetAll()
+        {
+            return this.dict;
+        }
+
+        public StartZoneConfig GetOne()
+        {
+            if (this.dict == null || this.dict.Count <= 0)
+            {
+                return null;
+            }
+            return this.dict.Values.GetEnumerator().Current;
+        }
+    }
+
+    [ProtoContract]
+	public partial class StartZoneConfig: ProtoObject, IConfig
+	{
+		/// <summary>Id</summary>
+		[ProtoMember(1)]
+		public int Id { get; set; }
+		/// <summary>数据库地址</summary>
+		[ProtoMember(2)]
+		public string DBConnection { get; set; }
+		/// <summary>数据库名</summary>
+		[ProtoMember(3)]
+		public string DBName { get; set; }
+
+	}
+}

+ 91 - 0
DotNet/Model/Generate/Config/UnitConfig.cs

@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using MongoDB.Bson.Serialization.Attributes;
+using ProtoBuf;
+
+namespace ET
+{
+    [ProtoContract]
+    [Config]
+    public partial class UnitConfigCategory : ConfigSingleton<UnitConfigCategory>, IMerge
+    {
+        [ProtoIgnore]
+        [BsonIgnore]
+        private Dictionary<int, UnitConfig> dict = new Dictionary<int, UnitConfig>();
+		
+        [BsonElement]
+        [ProtoMember(1)]
+        private List<UnitConfig> list = new List<UnitConfig>();
+		
+        public void Merge(object o)
+        {
+            UnitConfigCategory s = o as UnitConfigCategory;
+            this.list.AddRange(s.list);
+        }
+		
+		[ProtoAfterDeserialization]        
+        public void ProtoEndInit()
+        {
+            foreach (UnitConfig config in list)
+            {
+                config.AfterEndInit();
+                this.dict.Add(config.Id, config);
+            }
+            this.list.Clear();
+            
+            this.AfterEndInit();
+        }
+		
+        public UnitConfig Get(int id)
+        {
+            this.dict.TryGetValue(id, out UnitConfig item);
+
+            if (item == null)
+            {
+                throw new Exception($"配置找不到,配置表名: {nameof (UnitConfig)},配置id: {id}");
+            }
+
+            return item;
+        }
+		
+        public bool Contain(int id)
+        {
+            return this.dict.ContainsKey(id);
+        }
+
+        public Dictionary<int, UnitConfig> GetAll()
+        {
+            return this.dict;
+        }
+
+        public UnitConfig GetOne()
+        {
+            if (this.dict == null || this.dict.Count <= 0)
+            {
+                return null;
+            }
+            return this.dict.Values.GetEnumerator().Current;
+        }
+    }
+
+    [ProtoContract]
+	public partial class UnitConfig: ProtoObject, IConfig
+	{
+		/// <summary>Id</summary>
+		[ProtoMember(1)]
+		public int Id { get; set; }
+		/// <summary>Type</summary>
+		[ProtoMember(2)]
+		public int Type { get; set; }
+		/// <summary>名字</summary>
+		[ProtoMember(3)]
+		public string Name { get; set; }
+		/// <summary>位置</summary>
+		[ProtoMember(4)]
+		public int Position { get; set; }
+		/// <summary>体重</summary>
+		[ProtoMember(6)]
+		public int Weight { get; set; }
+
+	}
+}

+ 369 - 0
DotNet/Model/Generate/Message/InnerMessage_S_20001.cs

@@ -0,0 +1,369 @@
+using ET;
+using ProtoBuf;
+using System.Collections.Generic;
+namespace ET
+{
+// using
+	[ResponseType(nameof(ObjectQueryResponse))]
+	[Message(InnerMessage.ObjectQueryRequest)]
+	[ProtoContract]
+	public partial class ObjectQueryRequest: ProtoObject, IActorRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public long Key { get; set; }
+
+		[ProtoMember(3)]
+		public long InstanceId { get; set; }
+
+	}
+
+	[Message(InnerMessage.ObjectQueryResponse)]
+	[ProtoContract]
+	public partial class ObjectQueryResponse: ProtoObject, IActorResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+		[ProtoMember(4)]
+		public byte[] Entity { get; set; }
+
+	}
+
+	[ResponseType(nameof(A2M_Reload))]
+	[Message(InnerMessage.M2A_Reload)]
+	[ProtoContract]
+	public partial class M2A_Reload: ProtoObject, IActorRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+	}
+
+	[Message(InnerMessage.A2M_Reload)]
+	[ProtoContract]
+	public partial class A2M_Reload: ProtoObject, IActorResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	[ResponseType(nameof(G2G_LockResponse))]
+	[Message(InnerMessage.G2G_LockRequest)]
+	[ProtoContract]
+	public partial class G2G_LockRequest: ProtoObject, IActorRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public long Id { get; set; }
+
+		[ProtoMember(3)]
+		public string Address { get; set; }
+
+	}
+
+	[Message(InnerMessage.G2G_LockResponse)]
+	[ProtoContract]
+	public partial class G2G_LockResponse: ProtoObject, IActorResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	[ResponseType(nameof(G2G_LockReleaseResponse))]
+	[Message(InnerMessage.G2G_LockReleaseRequest)]
+	[ProtoContract]
+	public partial class G2G_LockReleaseRequest: ProtoObject, IActorRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public long Id { get; set; }
+
+		[ProtoMember(3)]
+		public string Address { get; set; }
+
+	}
+
+	[Message(InnerMessage.G2G_LockReleaseResponse)]
+	[ProtoContract]
+	public partial class G2G_LockReleaseResponse: ProtoObject, IActorResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	[ResponseType(nameof(ObjectAddResponse))]
+	[Message(InnerMessage.ObjectAddRequest)]
+	[ProtoContract]
+	public partial class ObjectAddRequest: ProtoObject, IActorRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public long Key { get; set; }
+
+		[ProtoMember(3)]
+		public long InstanceId { get; set; }
+
+	}
+
+	[Message(InnerMessage.ObjectAddResponse)]
+	[ProtoContract]
+	public partial class ObjectAddResponse: ProtoObject, IActorResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	[ResponseType(nameof(ObjectLockResponse))]
+	[Message(InnerMessage.ObjectLockRequest)]
+	[ProtoContract]
+	public partial class ObjectLockRequest: ProtoObject, IActorRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public long Key { get; set; }
+
+		[ProtoMember(3)]
+		public long InstanceId { get; set; }
+
+		[ProtoMember(4)]
+		public int Time { get; set; }
+
+	}
+
+	[Message(InnerMessage.ObjectLockResponse)]
+	[ProtoContract]
+	public partial class ObjectLockResponse: ProtoObject, IActorResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	[ResponseType(nameof(ObjectUnLockResponse))]
+	[Message(InnerMessage.ObjectUnLockRequest)]
+	[ProtoContract]
+	public partial class ObjectUnLockRequest: ProtoObject, IActorRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public long Key { get; set; }
+
+		[ProtoMember(3)]
+		public long OldInstanceId { get; set; }
+
+		[ProtoMember(4)]
+		public long InstanceId { get; set; }
+
+	}
+
+	[Message(InnerMessage.ObjectUnLockResponse)]
+	[ProtoContract]
+	public partial class ObjectUnLockResponse: ProtoObject, IActorResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	[ResponseType(nameof(ObjectRemoveResponse))]
+	[Message(InnerMessage.ObjectRemoveRequest)]
+	[ProtoContract]
+	public partial class ObjectRemoveRequest: ProtoObject, IActorRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public long Key { get; set; }
+
+	}
+
+	[Message(InnerMessage.ObjectRemoveResponse)]
+	[ProtoContract]
+	public partial class ObjectRemoveResponse: ProtoObject, IActorResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	[ResponseType(nameof(ObjectGetResponse))]
+	[Message(InnerMessage.ObjectGetRequest)]
+	[ProtoContract]
+	public partial class ObjectGetRequest: ProtoObject, IActorRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public long Key { get; set; }
+
+	}
+
+	[Message(InnerMessage.ObjectGetResponse)]
+	[ProtoContract]
+	public partial class ObjectGetResponse: ProtoObject, IActorResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+		[ProtoMember(4)]
+		public long InstanceId { get; set; }
+
+	}
+
+	[Message(InnerMessage.R2G_LoginVerifySuccess)]
+	[ProtoContract]
+	public partial class R2G_LoginVerifySuccess: ProtoObject, IActorLocationMessage
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public long UserId { get; set; }
+
+		[ProtoMember(3)]
+		public string Token { get; set; }
+
+	}
+
+	[Message(InnerMessage.G2M_SessionDisconnect)]
+	[ProtoContract]
+	public partial class G2M_SessionDisconnect: ProtoObject, IActorLocationMessage
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+	}
+
+	[ResponseType(nameof(M2M_UnitTransferResponse))]
+	[Message(InnerMessage.M2M_UnitTransferRequest)]
+	[ProtoContract]
+	public partial class M2M_UnitTransferRequest: ProtoObject, IActorRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public long OldInstanceId { get; set; }
+
+		[ProtoMember(3)]
+		public byte[] Unit { get; set; }
+
+		[ProtoMember(4)]
+		public List<byte[]> Entitys { get; set; }
+
+	}
+
+	[Message(InnerMessage.M2M_UnitTransferResponse)]
+	[ProtoContract]
+	public partial class M2M_UnitTransferResponse: ProtoObject, IActorResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	public static class InnerMessage
+	{
+		 public const ushort ObjectQueryRequest = 20002;
+		 public const ushort ObjectQueryResponse = 20003;
+		 public const ushort M2A_Reload = 20004;
+		 public const ushort A2M_Reload = 20005;
+		 public const ushort G2G_LockRequest = 20006;
+		 public const ushort G2G_LockResponse = 20007;
+		 public const ushort G2G_LockReleaseRequest = 20008;
+		 public const ushort G2G_LockReleaseResponse = 20009;
+		 public const ushort ObjectAddRequest = 20010;
+		 public const ushort ObjectAddResponse = 20011;
+		 public const ushort ObjectLockRequest = 20012;
+		 public const ushort ObjectLockResponse = 20013;
+		 public const ushort ObjectUnLockRequest = 20014;
+		 public const ushort ObjectUnLockResponse = 20015;
+		 public const ushort ObjectRemoveRequest = 20016;
+		 public const ushort ObjectRemoveResponse = 20017;
+		 public const ushort ObjectGetRequest = 20018;
+		 public const ushort ObjectGetResponse = 20019;
+		 public const ushort R2G_LoginVerifySuccess = 20020;
+		 public const ushort G2M_SessionDisconnect = 20021;
+		 public const ushort M2M_UnitTransferRequest = 20022;
+		 public const ushort M2M_UnitTransferResponse = 20023;
+	}
+}

+ 516 - 0
DotNet/Model/Generate/Message/OuterMessage_C_10001.cs

@@ -0,0 +1,516 @@
+using ET;
+using ProtoBuf;
+using System.Collections.Generic;
+namespace ET
+{
+	[Message(OuterMessage.HttpGetRouterResponse)]
+	[ProtoContract]
+	public partial class HttpGetRouterResponse: ProtoObject
+	{
+		[ProtoMember(1)]
+		public List<string> Realms { get; set; }
+
+		[ProtoMember(2)]
+		public List<string> Routers { get; set; }
+
+	}
+
+	[Message(OuterMessage.RouterSync)]
+	[ProtoContract]
+	public partial class RouterSync: ProtoObject
+	{
+		[ProtoMember(1)]
+		public uint ConnectId { get; set; }
+
+		[ProtoMember(2)]
+		public string Address { get; set; }
+
+	}
+
+	[ResponseType(nameof(M2C_TestResponse))]
+	[Message(OuterMessage.C2M_TestRequest)]
+	[ProtoContract]
+	public partial class C2M_TestRequest: ProtoObject, IActorLocationRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public string request { get; set; }
+
+	}
+
+	[Message(OuterMessage.M2C_TestResponse)]
+	[ProtoContract]
+	public partial class M2C_TestResponse: ProtoObject, IActorLocationResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+		[ProtoMember(4)]
+		public string response { get; set; }
+
+	}
+
+	[ResponseType(nameof(Actor_TransferResponse))]
+	[Message(OuterMessage.Actor_TransferRequest)]
+	[ProtoContract]
+	public partial class Actor_TransferRequest: ProtoObject, IActorLocationRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int MapIndex { get; set; }
+
+	}
+
+	[Message(OuterMessage.Actor_TransferResponse)]
+	[ProtoContract]
+	public partial class Actor_TransferResponse: ProtoObject, IActorLocationResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	[ResponseType(nameof(G2C_EnterMap))]
+	[Message(OuterMessage.C2G_EnterMap)]
+	[ProtoContract]
+	public partial class C2G_EnterMap: ProtoObject, IRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+	}
+
+	[Message(OuterMessage.G2C_EnterMap)]
+	[ProtoContract]
+	public partial class G2C_EnterMap: ProtoObject, IResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+// 自己unitId
+		[ProtoMember(4)]
+		public long MyId { get; set; }
+
+	}
+
+	[Message(OuterMessage.MoveInfo)]
+	[ProtoContract]
+	public partial class MoveInfo: ProtoObject
+	{
+		[ProtoMember(1)]
+		public List<Unity.Mathematics.float3> Points { get; set; }
+
+		[ProtoMember(2)]
+		public Unity.Mathematics.quaternion Rotation { get; set; }
+
+		[ProtoMember(3)]
+		public int TurnSpeed { get; set; }
+
+	}
+
+	[Message(OuterMessage.UnitInfo)]
+	[ProtoContract]
+	public partial class UnitInfo: ProtoObject
+	{
+		[ProtoMember(1)]
+		public long UnitId { get; set; }
+
+		[ProtoMember(2)]
+		public int ConfigId { get; set; }
+
+		[ProtoMember(3)]
+		public int Type { get; set; }
+
+		[ProtoMember(4)]
+		public Unity.Mathematics.float3 Position { get; set; }
+
+		[ProtoMember(5)]
+		public Unity.Mathematics.float3 Forward { get; set; }
+
+		[MongoDB.Bson.Serialization.Attributes.BsonDictionaryOptions(MongoDB.Bson.Serialization.Options.DictionaryRepresentation.ArrayOfArrays)]
+		[ProtoMember(6)]
+		public Dictionary<int, long> KV { get; set; }
+		[ProtoMember(7)]
+		public MoveInfo MoveInfo { get; set; }
+
+	}
+
+	[Message(OuterMessage.M2C_CreateUnits)]
+	[ProtoContract]
+	public partial class M2C_CreateUnits: ProtoObject, IActorMessage
+	{
+		[ProtoMember(1)]
+		public List<UnitInfo> Units { get; set; }
+
+	}
+
+	[Message(OuterMessage.M2C_CreateMyUnit)]
+	[ProtoContract]
+	public partial class M2C_CreateMyUnit: ProtoObject, IActorMessage
+	{
+		[ProtoMember(1)]
+		public UnitInfo Unit { get; set; }
+
+	}
+
+	[Message(OuterMessage.M2C_StartSceneChange)]
+	[ProtoContract]
+	public partial class M2C_StartSceneChange: ProtoObject, IActorMessage
+	{
+		[ProtoMember(1)]
+		public long SceneInstanceId { get; set; }
+
+		[ProtoMember(2)]
+		public string SceneName { get; set; }
+
+	}
+
+	[Message(OuterMessage.M2C_RemoveUnits)]
+	[ProtoContract]
+	public partial class M2C_RemoveUnits: ProtoObject, IActorMessage
+	{
+		[ProtoMember(2)]
+		public List<long> Units { get; set; }
+
+	}
+
+	[Message(OuterMessage.C2M_PathfindingResult)]
+	[ProtoContract]
+	public partial class C2M_PathfindingResult: ProtoObject, IActorLocationMessage
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public Unity.Mathematics.float3 Position { get; set; }
+
+	}
+
+	[Message(OuterMessage.C2M_Stop)]
+	[ProtoContract]
+	public partial class C2M_Stop: ProtoObject, IActorLocationMessage
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+	}
+
+	[Message(OuterMessage.M2C_PathfindingResult)]
+	[ProtoContract]
+	public partial class M2C_PathfindingResult: ProtoObject, IActorMessage
+	{
+		[ProtoMember(1)]
+		public long Id { get; set; }
+
+		[ProtoMember(2)]
+		public Unity.Mathematics.float3 Position { get; set; }
+
+		[ProtoMember(3)]
+		public List<Unity.Mathematics.float3> Points { get; set; }
+
+	}
+
+	[Message(OuterMessage.M2C_Stop)]
+	[ProtoContract]
+	public partial class M2C_Stop: ProtoObject, IActorMessage
+	{
+		[ProtoMember(1)]
+		public int Error { get; set; }
+
+		[ProtoMember(2)]
+		public long Id { get; set; }
+
+		[ProtoMember(3)]
+		public Unity.Mathematics.float3 Position { get; set; }
+
+		[ProtoMember(4)]
+		public Unity.Mathematics.quaternion Rotation { get; set; }
+
+	}
+
+	[ResponseType(nameof(G2C_Ping))]
+	[Message(OuterMessage.C2G_Ping)]
+	[ProtoContract]
+	public partial class C2G_Ping: ProtoObject, IRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+	}
+
+	[Message(OuterMessage.G2C_Ping)]
+	[ProtoContract]
+	public partial class G2C_Ping: ProtoObject, IResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+		[ProtoMember(4)]
+		public long Time { get; set; }
+
+	}
+
+	[Message(OuterMessage.G2C_Test)]
+	[ProtoContract]
+	public partial class G2C_Test: ProtoObject, IMessage
+	{
+	}
+
+	[ResponseType(nameof(M2C_Reload))]
+	[Message(OuterMessage.C2M_Reload)]
+	[ProtoContract]
+	public partial class C2M_Reload: ProtoObject, IRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public string Account { get; set; }
+
+		[ProtoMember(3)]
+		public string Password { get; set; }
+
+	}
+
+	[Message(OuterMessage.M2C_Reload)]
+	[ProtoContract]
+	public partial class M2C_Reload: ProtoObject, IResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	[ResponseType(nameof(R2C_Login))]
+	[Message(OuterMessage.C2R_Login)]
+	[ProtoContract]
+	public partial class C2R_Login: ProtoObject, IRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public string Account { get; set; }
+
+		[ProtoMember(3)]
+		public string Password { get; set; }
+
+	}
+
+	[Message(OuterMessage.R2C_Login)]
+	[ProtoContract]
+	public partial class R2C_Login: ProtoObject, IResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+		[ProtoMember(4)]
+		public string Address { get; set; }
+
+		[ProtoMember(5)]
+		public string Token { get; set; }
+
+		[ProtoMember(6)]
+		public long UserId { get; set; }
+
+	}
+
+	[ResponseType(nameof(G2C_LoginGate))]
+	[Message(OuterMessage.C2G_LoginGate)]
+	[ProtoContract]
+	public partial class C2G_LoginGate: ProtoObject, IRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public string Token { get; set; }
+
+	}
+
+	[Message(OuterMessage.G2C_LoginGate)]
+	[ProtoContract]
+	public partial class G2C_LoginGate: ProtoObject, IResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+		[ProtoMember(4)]
+		public long PlayerId { get; set; }
+
+	}
+
+	[Message(OuterMessage.G2C_TestHotfixMessage)]
+	[ProtoContract]
+	public partial class G2C_TestHotfixMessage: ProtoObject, IMessage
+	{
+		[ProtoMember(1)]
+		public string Info { get; set; }
+
+	}
+
+	[ResponseType(nameof(M2C_TestRobotCase))]
+	[Message(OuterMessage.C2M_TestRobotCase)]
+	[ProtoContract]
+	public partial class C2M_TestRobotCase: ProtoObject, IActorLocationRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int N { get; set; }
+
+	}
+
+	[Message(OuterMessage.M2C_TestRobotCase)]
+	[ProtoContract]
+	public partial class M2C_TestRobotCase: ProtoObject, IActorLocationResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+		[ProtoMember(4)]
+		public int N { get; set; }
+
+	}
+
+	[ResponseType(nameof(M2C_TransferMap))]
+	[Message(OuterMessage.C2M_TransferMap)]
+	[ProtoContract]
+	public partial class C2M_TransferMap: ProtoObject, IActorLocationRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+	}
+
+	[Message(OuterMessage.M2C_TransferMap)]
+	[ProtoContract]
+	public partial class M2C_TransferMap: ProtoObject, IActorLocationResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	[ResponseType(nameof(G2C_Benchmark))]
+	[Message(OuterMessage.C2G_Benchmark)]
+	[ProtoContract]
+	public partial class C2G_Benchmark: ProtoObject, IRequest
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+	}
+
+	[Message(OuterMessage.G2C_Benchmark)]
+	[ProtoContract]
+	public partial class G2C_Benchmark: ProtoObject, IResponse
+	{
+		[ProtoMember(1)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(2)]
+		public int Error { get; set; }
+
+		[ProtoMember(3)]
+		public string Message { get; set; }
+
+	}
+
+	public static class OuterMessage
+	{
+		 public const ushort HttpGetRouterResponse = 10002;
+		 public const ushort RouterSync = 10003;
+		 public const ushort C2M_TestRequest = 10004;
+		 public const ushort M2C_TestResponse = 10005;
+		 public const ushort Actor_TransferRequest = 10006;
+		 public const ushort Actor_TransferResponse = 10007;
+		 public const ushort C2G_EnterMap = 10008;
+		 public const ushort G2C_EnterMap = 10009;
+		 public const ushort MoveInfo = 10010;
+		 public const ushort UnitInfo = 10011;
+		 public const ushort M2C_CreateUnits = 10012;
+		 public const ushort M2C_CreateMyUnit = 10013;
+		 public const ushort M2C_StartSceneChange = 10014;
+		 public const ushort M2C_RemoveUnits = 10015;
+		 public const ushort C2M_PathfindingResult = 10016;
+		 public const ushort C2M_Stop = 10017;
+		 public const ushort M2C_PathfindingResult = 10018;
+		 public const ushort M2C_Stop = 10019;
+		 public const ushort C2G_Ping = 10020;
+		 public const ushort G2C_Ping = 10021;
+		 public const ushort G2C_Test = 10022;
+		 public const ushort C2M_Reload = 10023;
+		 public const ushort M2C_Reload = 10024;
+		 public const ushort C2R_Login = 10025;
+		 public const ushort R2C_Login = 10026;
+		 public const ushort C2G_LoginGate = 10027;
+		 public const ushort G2C_LoginGate = 10028;
+		 public const ushort G2C_TestHotfixMessage = 10029;
+		 public const ushort C2M_TestRobotCase = 10030;
+		 public const ushort M2C_TestRobotCase = 10031;
+		 public const ushort C2M_TransferMap = 10032;
+		 public const ushort M2C_TransferMap = 10033;
+		 public const ushort C2G_Benchmark = 10034;
+		 public const ushort G2C_Benchmark = 10035;
+	}
+}

+ 3 - 7
Share/Tool/ExcelExporter/ExcelExporter.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
@@ -56,7 +56,7 @@ namespace ET
 
         private const string ClientClassDir = "../Unity/Assets/Scripts/Codes/Model/Generate/Client/Config";
         // 服务端因为机器人的存在必须包含客户端所有配置,所以单独的c字段没有意义,单独的c就表示cs
-        private const string ServerClassDir = "../Unity/Assets/Scripts/Codes/Model/Generate/Server/Config";
+        private const string ServerClassDir = "../DotNet/Model/Generate/Config";
 
         private const string CSClassDir = "../Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Config";
 
@@ -171,13 +171,11 @@ namespace ET
                     {
                         ExportClass(kv.Key, kv.Value.HeadInfos, ConfigType.s);
                     }
-                    ExportClass(kv.Key, kv.Value.HeadInfos, ConfigType.cs);
                 }
 
                 // 动态编译生成的配置代码
                 configAssemblies[(int) ConfigType.c] = DynamicBuild(ConfigType.c);
                 configAssemblies[(int) ConfigType.s] = DynamicBuild(ConfigType.s);
-                configAssemblies[(int) ConfigType.cs] = DynamicBuild(ConfigType.cs);
 
                 List<string> excels = FileHelper.GetAllFiles(excelDir, "*.xlsx");
                 
@@ -258,8 +256,6 @@ namespace ET
                 ExportExcelJson(p, fileNameWithoutCS, table, ConfigType.s, relativePath);
                 ExportExcelProtobuf(ConfigType.s, protoName, relativePath);
             }
-            ExportExcelJson(p, fileNameWithoutCS, table, ConfigType.cs, relativePath);
-            ExportExcelProtobuf(ConfigType.cs, protoName, relativePath);
         }
 
         private static string GetProtoDir(ConfigType configType, string relativeDir)
@@ -612,4 +608,4 @@ namespace ET
             Serializer.Serialize(file, final);
         }
     }
-}
+}

+ 2 - 10
Share/Tool/Proto2CS/Proto2CS.cs

@@ -25,8 +25,7 @@ namespace ET
     {
         private const string protoDir = "../Config/Proto";
         private const string clientMessagePath = "../Unity/Assets/Scripts/Codes/Model/Generate/Client/Message/";
-        private const string serverMessagePath = "../Unity/Assets/Scripts/Codes/Model/Generate/Server/Message/";
-        private const string clientServerMessagePath = "../Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/";
+        private const string serverMessagePath = "../DotNet/Model/Generate/Message/";
         private static readonly char[] splitChars = { ' ', '\t' };
         private static readonly List<OpcodeInfo> msgOpcode = new List<OpcodeInfo>();
 
@@ -43,11 +42,6 @@ namespace ET
             {
                 Directory.Delete(serverMessagePath, true);
             }
-            
-            if (Directory.Exists(clientServerMessagePath))
-            {
-                Directory.Delete(clientServerMessagePath, true);
-            }
 
             List<string> list = FileHelper.GetAllFiles(protoDir, "*proto");
             foreach (string s in list)
@@ -191,13 +185,11 @@ namespace ET
             {
                 GenerateCS(sb, clientMessagePath, proto);
                 GenerateCS(sb, serverMessagePath, proto);
-                GenerateCS(sb, clientServerMessagePath, proto);
             }
             
             if (cs.Contains("S"))
             {
                 GenerateCS(sb, serverMessagePath, proto);
-                GenerateCS(sb, clientServerMessagePath, proto);
             }
         }
 
@@ -311,4 +303,4 @@ namespace ET
             }
         }
     }
-}
+}