Prechádzať zdrojové kódy

优化C2G_LoginGame协议,增加IsInRoom字段

johnclot69 1 rok pred
rodič
commit
c3af634596
19 zmenil súbory, kde vykonal 65 pridanie a 947 odobranie
  1. 1 0
      Config/Proto/OuterMessage_C_30001.proto
  2. 1 5
      DotNet/Hotfix/Helper/PlayerHelper.cs
  3. 1 0
      DotNet/Hotfix/Scenes/Game/Handler/C2G_LoginGameHandler.cs
  4. 4 0
      DotNet/Hotfix/Scenes/Game/Player/PlayerSystem.cs
  5. 2 4
      DotNet/Hotfix/Scenes/Game/Session/SessionPlayerComponentSystem.cs
  6. 2 14
      DotNet/Model/Generate/Message/CommonProto_CS_10001.cs
  7. 1 47
      DotNet/Model/Generate/Message/InnerMessage_S_20001.cs
  8. 15 248
      DotNet/Model/Generate/Message/OuterMessage_C_30001.cs
  9. 3 3
      DotNet/Model/Scenes/Game/Player/Player.cs
  10. 2 14
      Unity/Assets/Scripts/Codes/Model/Generate/Client/Message/CommonProto_CS_10001.cs
  11. 0 11
      Unity/Assets/Scripts/Codes/Model/Generate/Client/Message/CommonProto_CS_10001.cs.meta
  12. 15 248
      Unity/Assets/Scripts/Codes/Model/Generate/Client/Message/OuterMessage_C_30001.cs
  13. 0 11
      Unity/Assets/Scripts/Codes/Model/Generate/Client/Message/OuterMessage_C_30001.cs.meta
  14. 2 14
      Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/CommonProto_CS_10001.cs
  15. 0 11
      Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/CommonProto_CS_10001.cs.meta
  16. 1 47
      Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/InnerMessage_S_20001.cs
  17. 0 11
      Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/InnerMessage_S_20001.cs.meta
  18. 15 248
      Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/OuterMessage_C_30001.cs
  19. 0 11
      Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/OuterMessage_C_30001.cs.meta

+ 1 - 0
Config/Proto/OuterMessage_C_30001.proto

@@ -108,6 +108,7 @@ message G2C_LoginGame // IResponse
 	int32 Error = 2;
 	string Message = 3;
 	Player Player = 4;
+	bool IsInRoom = 5;	// 是否在房间中
 }
 
 message G2C_TestHotfixMessage // IMessage

+ 1 - 5
DotNet/Hotfix/Helper/PlayerHelper.cs

@@ -17,13 +17,9 @@
                 id = player.Id,
                 name = player.Name,
                 sex = player.Sex,
-                pro = player.Pro,
                 exp = player.Exp,
                 level = player.Level,
-                vip = 0,
-                hp = 1000,
-                mp = 0,
-                fightPower = 5
+                vip = 0
             };
         }
 

+ 1 - 0
DotNet/Hotfix/Scenes/Game/Handler/C2G_LoginGameHandler.cs

@@ -38,6 +38,7 @@ namespace ET.Server
 			session.AddComponent<MailBoxComponent, MailboxType>(MailboxType.GameSession);
 
 			response.Player = PlayerHelper.PlayerInfoToProto(player);
+			response.IsInRoom = player.IsInRoom;
 			reply();
 			await ETTask.CompletedTask;
 		}

+ 4 - 0
DotNet/Hotfix/Scenes/Game/Player/PlayerSystem.cs

@@ -12,6 +12,8 @@
                 self.Account = a;
                 self.IsOnline = true;
                 self.LoginTime = TimeHelper.ServerNow();
+                // 测试数据,后面需要改成正式版
+                self.IsInRoom = false;
                 // 添加本地玩家数据
                 self.DomainScene().GetComponent<GamePlayerComponent>().Add(self);
             }
@@ -23,6 +25,8 @@
             protected override void Destroy(Player self)
             {
                 Log.Info($"销毁玩家实体...");
+                self.IsOnline = false;
+                self.LogoutTime = TimeHelper.ServerNow();
                 // 移除本地玩家数据
                 self.DomainScene().GetComponent<GamePlayerComponent>()?.Remove(self.Id);
             }

+ 2 - 4
DotNet/Hotfix/Scenes/Game/Session/SessionPlayerComponentSystem.cs

@@ -1,6 +1,4 @@
-
-
-namespace ET.Server
+namespace ET.Server
 {
 	[FriendOf(typeof (SessionPlayerComponent))]
 	public static class SessionPlayerComponentSystem
@@ -18,7 +16,7 @@ namespace ET.Server
 				Log.Info($"玩家断线了, playerId={self.PlayerId}, name={player.Name}");
 				
 				// 发送断线消息
-				ActorLocationSenderComponent.Instance?.Send(self.PlayerId, new G2M_SessionDisconnect());
+				// ActorLocationSenderComponent.Instance?.Send(self.PlayerId, new G2M_SessionDisconnect());
 				// 销毁玩家实体
 				player.Dispose();
 			}

+ 2 - 14
DotNet/Model/Generate/Message/CommonProto_CS_10001.cs

@@ -17,26 +17,14 @@ namespace ET
 		public int sex { get; set; }
 
 		[ProtoMember(4)]
-		public int pro { get; set; }
-
-		[ProtoMember(5)]
 		public long exp { get; set; }
 
-		[ProtoMember(6)]
+		[ProtoMember(5)]
 		public int level { get; set; }
 
-		[ProtoMember(7)]
+		[ProtoMember(6)]
 		public int vip { get; set; }
 
-		[ProtoMember(8)]
-		public int hp { get; set; }
-
-		[ProtoMember(9)]
-		public int mp { get; set; }
-
-		[ProtoMember(10)]
-		public long fightPower { get; set; }
-
 	}
 
 	public static class CommonProto

+ 1 - 47
DotNet/Model/Generate/Message/InnerMessage_S_20001.cs

@@ -299,15 +299,6 @@ namespace ET
 
 	}
 
-	[Message(InnerMessage.G2M_SessionDisconnect)]
-	[ProtoContract]
-	public partial class G2M_SessionDisconnect: ProtoObject, IActorLocationMessage
-	{
-		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-	}
-
 	[Message(InnerMessage.ObjectQueryResponse)]
 	[ProtoContract]
 	public partial class ObjectQueryResponse: ProtoObject, IActorResponse
@@ -326,40 +317,6 @@ namespace ET
 
 	}
 
-	[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;
@@ -381,9 +338,6 @@ namespace ET
 		 public const ushort ObjectGetResponse = 20018;
 		 public const ushort R2G_GetLoginKey = 20019;
 		 public const ushort G2R_GetLoginKey = 20020;
-		 public const ushort G2M_SessionDisconnect = 20021;
-		 public const ushort ObjectQueryResponse = 20022;
-		 public const ushort M2M_UnitTransferRequest = 20023;
-		 public const ushort M2M_UnitTransferResponse = 20024;
+		 public const ushort ObjectQueryResponse = 20021;
 	}
 }

+ 15 - 248
DotNet/Model/Generate/Message/OuterMessage_C_30001.cs

@@ -86,170 +86,6 @@ namespace ET
 
 	}
 
-	[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]
@@ -387,6 +223,9 @@ namespace ET
 		[ProtoMember(4)]
 		public Player Player { get; set; }
 
+		[ProtoMember(5)]
+		public bool IsInRoom { get; set; }
+
 	}
 
 	[Message(OuterMessage.G2C_TestHotfixMessage)]
@@ -398,62 +237,6 @@ namespace ET
 
 	}
 
-	[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]
@@ -487,33 +270,17 @@ namespace ET
 		 public const ushort M2C_TestResponse = 30005;
 		 public const ushort Actor_TransferRequest = 30006;
 		 public const ushort Actor_TransferResponse = 30007;
-		 public const ushort C2G_EnterMap = 30008;
-		 public const ushort G2C_EnterMap = 30009;
-		 public const ushort MoveInfo = 30010;
-		 public const ushort UnitInfo = 30011;
-		 public const ushort M2C_CreateUnits = 30012;
-		 public const ushort M2C_CreateMyUnit = 30013;
-		 public const ushort M2C_StartSceneChange = 30014;
-		 public const ushort M2C_RemoveUnits = 30015;
-		 public const ushort C2M_PathfindingResult = 30016;
-		 public const ushort C2M_Stop = 30017;
-		 public const ushort M2C_PathfindingResult = 30018;
-		 public const ushort M2C_Stop = 30019;
-		 public const ushort C2G_Ping = 30020;
-		 public const ushort G2C_Ping = 30021;
-		 public const ushort G2C_Test = 30022;
-		 public const ushort C2M_Reload = 30023;
-		 public const ushort M2C_Reload = 30024;
-		 public const ushort C2R_Login = 30025;
-		 public const ushort R2C_Login = 30026;
-		 public const ushort C2G_LoginGame = 30027;
-		 public const ushort G2C_LoginGame = 30028;
-		 public const ushort G2C_TestHotfixMessage = 30029;
-		 public const ushort C2M_TestRobotCase = 30030;
-		 public const ushort M2C_TestRobotCase = 30031;
-		 public const ushort C2M_TransferMap = 30032;
-		 public const ushort M2C_TransferMap = 30033;
-		 public const ushort C2G_Benchmark = 30034;
-		 public const ushort G2C_Benchmark = 30035;
+		 public const ushort C2G_Ping = 30008;
+		 public const ushort G2C_Ping = 30009;
+		 public const ushort G2C_Test = 30010;
+		 public const ushort C2M_Reload = 30011;
+		 public const ushort M2C_Reload = 30012;
+		 public const ushort C2R_Login = 30013;
+		 public const ushort R2C_Login = 30014;
+		 public const ushort C2G_LoginGame = 30015;
+		 public const ushort G2C_LoginGame = 30016;
+		 public const ushort G2C_TestHotfixMessage = 30017;
+		 public const ushort C2G_Benchmark = 30018;
+		 public const ushort G2C_Benchmark = 30019;
 	}
 }

+ 3 - 3
DotNet/Model/Scenes/Game/Player/Player.cs

@@ -17,15 +17,15 @@
         /** 在线状态 **/
         public bool IsOnline { get; set; }
         
+        /** 是否在房间中 **/
+        public bool IsInRoom { get; set; }
+
         /** 头像 **/
         public string AvatarUrl { get; set; }
         /** 名称 **/
         public string Name { get; set; }
         /** 性别 **/
         public int Sex { get; set; }
-        /** 职业 **/
-        public int Pro { get; set; }
-
         /** 经验 **/
         public long Exp { get; set; }
         /** 等级 **/

+ 2 - 14
Unity/Assets/Scripts/Codes/Model/Generate/Client/Message/CommonProto_CS_10001.cs

@@ -17,26 +17,14 @@ namespace ET
 		public int sex { get; set; }
 
 		[ProtoMember(4)]
-		public int pro { get; set; }
-
-		[ProtoMember(5)]
 		public long exp { get; set; }
 
-		[ProtoMember(6)]
+		[ProtoMember(5)]
 		public int level { get; set; }
 
-		[ProtoMember(7)]
+		[ProtoMember(6)]
 		public int vip { get; set; }
 
-		[ProtoMember(8)]
-		public int hp { get; set; }
-
-		[ProtoMember(9)]
-		public int mp { get; set; }
-
-		[ProtoMember(10)]
-		public long fightPower { get; set; }
-
 	}
 
 	public static class CommonProto

+ 0 - 11
Unity/Assets/Scripts/Codes/Model/Generate/Client/Message/CommonProto_CS_10001.cs.meta

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

+ 15 - 248
Unity/Assets/Scripts/Codes/Model/Generate/Client/Message/OuterMessage_C_30001.cs

@@ -86,170 +86,6 @@ namespace ET
 
 	}
 
-	[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]
@@ -387,6 +223,9 @@ namespace ET
 		[ProtoMember(4)]
 		public Player Player { get; set; }
 
+		[ProtoMember(5)]
+		public bool IsInRoom { get; set; }
+
 	}
 
 	[Message(OuterMessage.G2C_TestHotfixMessage)]
@@ -398,62 +237,6 @@ namespace ET
 
 	}
 
-	[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]
@@ -487,33 +270,17 @@ namespace ET
 		 public const ushort M2C_TestResponse = 30005;
 		 public const ushort Actor_TransferRequest = 30006;
 		 public const ushort Actor_TransferResponse = 30007;
-		 public const ushort C2G_EnterMap = 30008;
-		 public const ushort G2C_EnterMap = 30009;
-		 public const ushort MoveInfo = 30010;
-		 public const ushort UnitInfo = 30011;
-		 public const ushort M2C_CreateUnits = 30012;
-		 public const ushort M2C_CreateMyUnit = 30013;
-		 public const ushort M2C_StartSceneChange = 30014;
-		 public const ushort M2C_RemoveUnits = 30015;
-		 public const ushort C2M_PathfindingResult = 30016;
-		 public const ushort C2M_Stop = 30017;
-		 public const ushort M2C_PathfindingResult = 30018;
-		 public const ushort M2C_Stop = 30019;
-		 public const ushort C2G_Ping = 30020;
-		 public const ushort G2C_Ping = 30021;
-		 public const ushort G2C_Test = 30022;
-		 public const ushort C2M_Reload = 30023;
-		 public const ushort M2C_Reload = 30024;
-		 public const ushort C2R_Login = 30025;
-		 public const ushort R2C_Login = 30026;
-		 public const ushort C2G_LoginGame = 30027;
-		 public const ushort G2C_LoginGame = 30028;
-		 public const ushort G2C_TestHotfixMessage = 30029;
-		 public const ushort C2M_TestRobotCase = 30030;
-		 public const ushort M2C_TestRobotCase = 30031;
-		 public const ushort C2M_TransferMap = 30032;
-		 public const ushort M2C_TransferMap = 30033;
-		 public const ushort C2G_Benchmark = 30034;
-		 public const ushort G2C_Benchmark = 30035;
+		 public const ushort C2G_Ping = 30008;
+		 public const ushort G2C_Ping = 30009;
+		 public const ushort G2C_Test = 30010;
+		 public const ushort C2M_Reload = 30011;
+		 public const ushort M2C_Reload = 30012;
+		 public const ushort C2R_Login = 30013;
+		 public const ushort R2C_Login = 30014;
+		 public const ushort C2G_LoginGame = 30015;
+		 public const ushort G2C_LoginGame = 30016;
+		 public const ushort G2C_TestHotfixMessage = 30017;
+		 public const ushort C2G_Benchmark = 30018;
+		 public const ushort G2C_Benchmark = 30019;
 	}
 }

+ 0 - 11
Unity/Assets/Scripts/Codes/Model/Generate/Client/Message/OuterMessage_C_30001.cs.meta

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

+ 2 - 14
Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/CommonProto_CS_10001.cs

@@ -17,26 +17,14 @@ namespace ET
 		public int sex { get; set; }
 
 		[ProtoMember(4)]
-		public int pro { get; set; }
-
-		[ProtoMember(5)]
 		public long exp { get; set; }
 
-		[ProtoMember(6)]
+		[ProtoMember(5)]
 		public int level { get; set; }
 
-		[ProtoMember(7)]
+		[ProtoMember(6)]
 		public int vip { get; set; }
 
-		[ProtoMember(8)]
-		public int hp { get; set; }
-
-		[ProtoMember(9)]
-		public int mp { get; set; }
-
-		[ProtoMember(10)]
-		public long fightPower { get; set; }
-
 	}
 
 	public static class CommonProto

+ 0 - 11
Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/CommonProto_CS_10001.cs.meta

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

+ 1 - 47
Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/InnerMessage_S_20001.cs

@@ -299,15 +299,6 @@ namespace ET
 
 	}
 
-	[Message(InnerMessage.G2M_SessionDisconnect)]
-	[ProtoContract]
-	public partial class G2M_SessionDisconnect: ProtoObject, IActorLocationMessage
-	{
-		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-	}
-
 	[Message(InnerMessage.ObjectQueryResponse)]
 	[ProtoContract]
 	public partial class ObjectQueryResponse: ProtoObject, IActorResponse
@@ -326,40 +317,6 @@ namespace ET
 
 	}
 
-	[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;
@@ -381,9 +338,6 @@ namespace ET
 		 public const ushort ObjectGetResponse = 20018;
 		 public const ushort R2G_GetLoginKey = 20019;
 		 public const ushort G2R_GetLoginKey = 20020;
-		 public const ushort G2M_SessionDisconnect = 20021;
-		 public const ushort ObjectQueryResponse = 20022;
-		 public const ushort M2M_UnitTransferRequest = 20023;
-		 public const ushort M2M_UnitTransferResponse = 20024;
+		 public const ushort ObjectQueryResponse = 20021;
 	}
 }

+ 0 - 11
Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/InnerMessage_S_20001.cs.meta

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

+ 15 - 248
Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/OuterMessage_C_30001.cs

@@ -86,170 +86,6 @@ namespace ET
 
 	}
 
-	[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]
@@ -387,6 +223,9 @@ namespace ET
 		[ProtoMember(4)]
 		public Player Player { get; set; }
 
+		[ProtoMember(5)]
+		public bool IsInRoom { get; set; }
+
 	}
 
 	[Message(OuterMessage.G2C_TestHotfixMessage)]
@@ -398,62 +237,6 @@ namespace ET
 
 	}
 
-	[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]
@@ -487,33 +270,17 @@ namespace ET
 		 public const ushort M2C_TestResponse = 30005;
 		 public const ushort Actor_TransferRequest = 30006;
 		 public const ushort Actor_TransferResponse = 30007;
-		 public const ushort C2G_EnterMap = 30008;
-		 public const ushort G2C_EnterMap = 30009;
-		 public const ushort MoveInfo = 30010;
-		 public const ushort UnitInfo = 30011;
-		 public const ushort M2C_CreateUnits = 30012;
-		 public const ushort M2C_CreateMyUnit = 30013;
-		 public const ushort M2C_StartSceneChange = 30014;
-		 public const ushort M2C_RemoveUnits = 30015;
-		 public const ushort C2M_PathfindingResult = 30016;
-		 public const ushort C2M_Stop = 30017;
-		 public const ushort M2C_PathfindingResult = 30018;
-		 public const ushort M2C_Stop = 30019;
-		 public const ushort C2G_Ping = 30020;
-		 public const ushort G2C_Ping = 30021;
-		 public const ushort G2C_Test = 30022;
-		 public const ushort C2M_Reload = 30023;
-		 public const ushort M2C_Reload = 30024;
-		 public const ushort C2R_Login = 30025;
-		 public const ushort R2C_Login = 30026;
-		 public const ushort C2G_LoginGame = 30027;
-		 public const ushort G2C_LoginGame = 30028;
-		 public const ushort G2C_TestHotfixMessage = 30029;
-		 public const ushort C2M_TestRobotCase = 30030;
-		 public const ushort M2C_TestRobotCase = 30031;
-		 public const ushort C2M_TransferMap = 30032;
-		 public const ushort M2C_TransferMap = 30033;
-		 public const ushort C2G_Benchmark = 30034;
-		 public const ushort G2C_Benchmark = 30035;
+		 public const ushort C2G_Ping = 30008;
+		 public const ushort G2C_Ping = 30009;
+		 public const ushort G2C_Test = 30010;
+		 public const ushort C2M_Reload = 30011;
+		 public const ushort M2C_Reload = 30012;
+		 public const ushort C2R_Login = 30013;
+		 public const ushort R2C_Login = 30014;
+		 public const ushort C2G_LoginGame = 30015;
+		 public const ushort G2C_LoginGame = 30016;
+		 public const ushort G2C_TestHotfixMessage = 30017;
+		 public const ushort C2G_Benchmark = 30018;
+		 public const ushort G2C_Benchmark = 30019;
 	}
 }

+ 0 - 11
Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/OuterMessage_C_30001.cs.meta

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