浏览代码

修改BattleReady消息,放到BattleServerMsg中统一处理

大爷 2 年之前
父节点
当前提交
8775ce6f3c

+ 5 - 0
Config/Proto/BattleServerMsg_CS_40001.proto

@@ -12,4 +12,9 @@ message BattleEventPush // IActorMessage
 message BattleEventPushToServer // IMessage
 {
   bytes data = 1;
+}
+
+//客户端通知战斗服,i'm ready
+message BattleClientReady // IMessage
+{
 }

+ 0 - 13
Config/Proto/OuterMessage_C_10001.proto

@@ -59,19 +59,6 @@ message G2C_EnterMap // IResponse
 	int64 SceneId = 4;
 }
 
-//ResponseType G2C_EnterSceneReady
-message C2G_EnterSceneReady // IRequest
-{
-	int32 RpcId = 1;
-}
-
-message G2C_EnterSceneReady // IResponse
-{
-	int32 RpcId = 1;
-	int32 Error = 2;
-	string Message = 3;
-}
-
 message MoveInfo
 {
 	repeated Unity.Mathematics.float3 Points = 1;

+ 13 - 1
Config/Proto/PlayerProto_CS_30001.proto

@@ -25,4 +25,16 @@ message Player
   int64 gold = 10;
   int64 diamond = 11;
   int32 energy = 12;
-  }
+  }
+
+  message SkillKeyStruct
+  {
+   int32 keyPos = 1;
+   int32 baseSkillId = 2;  //基础技能
+   int32 advancedSkillId = 3;  //当前佩戴的技能 
+   string icon = 4;  //当前佩戴的技能icon
+   int32 flag = 5;//0为没开  1为开启
+   int32 unlockLevel = 6;//解锁等级
+   string name = 7;
+   string baseSkillIcon = 8;
+}

+ 12 - 0
DotNet/Hotfix/BattleServer/BattleEventHandler.cs

@@ -14,4 +14,16 @@
             await ETTask.CompletedTask;
         }
     }
+
+    [MessageHandler(SceneType.Gate)]
+    public class BattleClientReadyHandler : AMHandler<BattleClientReady>
+    {
+        protected override async ETTask Run(Session session, BattleClientReady message)
+        {
+            Scene scene = session.DomainScene();
+            scene.GetComponent<ObjectWait>().Notify(new Wait_PlayerReady());
+
+            await ETTask.CompletedTask;
+        }
+    }
 }

+ 0 - 18
DotNet/Hotfix/Demo/Scenes/Gate/Handler/C2G_EnterSceneReady.cs

@@ -1,18 +0,0 @@
-using System;
-using ET;
-
-namespace ET.Server
-{
-    [MessageHandler(SceneType.Gate)]
-    public class C2G_EnterSceneReadyHandler : AMRpcHandler<C2G_EnterSceneReady, G2C_EnterSceneReady>
-    {
-        protected override async ETTask Run(Session session, C2G_EnterSceneReady request, G2C_EnterSceneReady response, Action reply)
-        {
-            Scene scene = session.DomainScene();
-            scene.GetComponent<ObjectWait>().Notify(new Wait_PlayerReady());
-
-            reply();
-            await ETTask.CompletedTask;
-        }
-    }
-}

+ 8 - 0
DotNet/Model/Generate/Message/BattleServerMsg_CS_40001.cs

@@ -26,9 +26,17 @@ namespace ET
 
 	}
 
+//客户端通知战斗服,i'm ready
+	[Message(BattleServerMsg.BattleClientReady)]
+	[ProtoContract]
+	public partial class BattleClientReady: ProtoObject, IMessage
+	{
+	}
+
 	public static class BattleServerMsg
 	{
 		 public const ushort BattleEventPush = 40002;
 		 public const ushort BattleEventPushToServer = 40003;
+		 public const ushort BattleClientReady = 40004;
 	}
 }

+ 31 - 58
DotNet/Model/Generate/Message/OuterMessage_C_10001.cs

@@ -118,31 +118,6 @@ namespace ET
 
 	}
 
-	[ResponseType(nameof(G2C_EnterSceneReady))]
-	[Message(OuterMessage.C2G_EnterSceneReady)]
-	[ProtoContract]
-	public partial class C2G_EnterSceneReady: ProtoObject, IRequest
-	{
-		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-	}
-
-	[Message(OuterMessage.G2C_EnterSceneReady)]
-	[ProtoContract]
-	public partial class G2C_EnterSceneReady: ProtoObject, IResponse
-	{
-		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
-		public int Error { get; set; }
-
-		[ProtoMember(3)]
-		public string Message { get; set; }
-
-	}
-
 	[Message(OuterMessage.MoveInfo)]
 	[ProtoContract]
 	public partial class MoveInfo: ProtoObject
@@ -600,38 +575,36 @@ namespace ET
 		 public const ushort Actor_TransferResponse = 10007;
 		 public const ushort C2G_EnterMap = 10008;
 		 public const ushort G2C_EnterMap = 10009;
-		 public const ushort C2G_EnterSceneReady = 10010;
-		 public const ushort G2C_EnterSceneReady = 10011;
-		 public const ushort MoveInfo = 10012;
-		 public const ushort UnitInfo = 10013;
-		 public const ushort M2C_CreateUnits = 10014;
-		 public const ushort M2C_CreateMyUnit = 10015;
-		 public const ushort M2C_StartSceneChange = 10016;
-		 public const ushort M2C_RemoveUnits = 10017;
-		 public const ushort C2M_PathfindingResult = 10018;
-		 public const ushort M2C_PathfindingResult = 10019;
-		 public const ushort C2M_Stop = 10020;
-		 public const ushort M2C_Stop = 10021;
-		 public const ushort C2G_Ping = 10022;
-		 public const ushort G2C_Ping = 10023;
-		 public const ushort G2C_Test = 10024;
-		 public const ushort C2M_Reload = 10025;
-		 public const ushort M2C_Reload = 10026;
-		 public const ushort C2R_Login = 10027;
-		 public const ushort R2C_Login = 10028;
-		 public const ushort C2G_LoginGate = 10029;
-		 public const ushort G2C_LoginGate = 10030;
-		 public const ushort C2G_CreatePlayer = 10031;
-		 public const ushort G2C_CreatePlayer = 10032;
-		 public const ushort C2G_BindPlayer = 10033;
-		 public const ushort G2C_BindPlayer = 10034;
-		 public const ushort G2C_TestHotfixMessage = 10035;
-		 public const ushort C2M_TestRobotCase = 10036;
-		 public const ushort M2C_TestRobotCase = 10037;
-		 public const ushort C2M_TransferMap = 10038;
-		 public const ushort M2C_TransferMap = 10039;
-		 public const ushort C2G_Benchmark = 10040;
-		 public const ushort G2C_Benchmark = 10041;
-		 public const ushort R2C_Disconnect = 10042;
+		 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 M2C_PathfindingResult = 10017;
+		 public const ushort C2M_Stop = 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 C2G_CreatePlayer = 10029;
+		 public const ushort G2C_CreatePlayer = 10030;
+		 public const ushort C2G_BindPlayer = 10031;
+		 public const ushort G2C_BindPlayer = 10032;
+		 public const ushort G2C_TestHotfixMessage = 10033;
+		 public const ushort C2M_TestRobotCase = 10034;
+		 public const ushort M2C_TestRobotCase = 10035;
+		 public const ushort C2M_TransferMap = 10036;
+		 public const ushort M2C_TransferMap = 10037;
+		 public const ushort C2G_Benchmark = 10038;
+		 public const ushort G2C_Benchmark = 10039;
+		 public const ushort R2C_Disconnect = 10040;
 	}
 }

+ 31 - 0
DotNet/Model/Generate/Message/PlayerProto_CS_30001.cs

@@ -69,9 +69,40 @@ namespace ET
 
 	}
 
+	[Message(PlayerProto.SkillKeyStruct)]
+	[ProtoContract]
+	public partial class SkillKeyStruct: ProtoObject
+	{
+		[ProtoMember(1)]
+		public int keyPos { get; set; }
+
+		[ProtoMember(2)]
+		public int baseSkillId { get; set; }
+
+		[ProtoMember(3)]
+		public int advancedSkillId { get; set; }
+
+		[ProtoMember(4)]
+		public string icon { get; set; }
+
+		[ProtoMember(5)]
+		public int flag { get; set; }
+
+		[ProtoMember(6)]
+		public int unlockLevel { get; set; }
+
+		[ProtoMember(7)]
+		public string name { get; set; }
+
+		[ProtoMember(8)]
+		public string baseSkillIcon { get; set; }
+
+	}
+
 	public static class PlayerProto
 	{
 		 public const ushort PlayerBasic = 30002;
 		 public const ushort Player = 30003;
+		 public const ushort SkillKeyStruct = 30004;
 	}
 }

+ 8 - 0
Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/BattleServerMsg_CS_40001.cs

@@ -26,9 +26,17 @@ namespace ET
 
 	}
 
+//客户端通知战斗服,i'm ready
+	[Message(BattleServerMsg.BattleClientReady)]
+	[ProtoContract]
+	public partial class BattleClientReady: ProtoObject, IMessage
+	{
+	}
+
 	public static class BattleServerMsg
 	{
 		 public const ushort BattleEventPush = 40002;
 		 public const ushort BattleEventPushToServer = 40003;
+		 public const ushort BattleClientReady = 40004;
 	}
 }

+ 31 - 58
Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/OuterMessage_C_10001.cs

@@ -118,31 +118,6 @@ namespace ET
 
 	}
 
-	[ResponseType(nameof(G2C_EnterSceneReady))]
-	[Message(OuterMessage.C2G_EnterSceneReady)]
-	[ProtoContract]
-	public partial class C2G_EnterSceneReady: ProtoObject, IRequest
-	{
-		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-	}
-
-	[Message(OuterMessage.G2C_EnterSceneReady)]
-	[ProtoContract]
-	public partial class G2C_EnterSceneReady: ProtoObject, IResponse
-	{
-		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
-		public int Error { get; set; }
-
-		[ProtoMember(3)]
-		public string Message { get; set; }
-
-	}
-
 	[Message(OuterMessage.MoveInfo)]
 	[ProtoContract]
 	public partial class MoveInfo: ProtoObject
@@ -600,38 +575,36 @@ namespace ET
 		 public const ushort Actor_TransferResponse = 10007;
 		 public const ushort C2G_EnterMap = 10008;
 		 public const ushort G2C_EnterMap = 10009;
-		 public const ushort C2G_EnterSceneReady = 10010;
-		 public const ushort G2C_EnterSceneReady = 10011;
-		 public const ushort MoveInfo = 10012;
-		 public const ushort UnitInfo = 10013;
-		 public const ushort M2C_CreateUnits = 10014;
-		 public const ushort M2C_CreateMyUnit = 10015;
-		 public const ushort M2C_StartSceneChange = 10016;
-		 public const ushort M2C_RemoveUnits = 10017;
-		 public const ushort C2M_PathfindingResult = 10018;
-		 public const ushort M2C_PathfindingResult = 10019;
-		 public const ushort C2M_Stop = 10020;
-		 public const ushort M2C_Stop = 10021;
-		 public const ushort C2G_Ping = 10022;
-		 public const ushort G2C_Ping = 10023;
-		 public const ushort G2C_Test = 10024;
-		 public const ushort C2M_Reload = 10025;
-		 public const ushort M2C_Reload = 10026;
-		 public const ushort C2R_Login = 10027;
-		 public const ushort R2C_Login = 10028;
-		 public const ushort C2G_LoginGate = 10029;
-		 public const ushort G2C_LoginGate = 10030;
-		 public const ushort C2G_CreatePlayer = 10031;
-		 public const ushort G2C_CreatePlayer = 10032;
-		 public const ushort C2G_BindPlayer = 10033;
-		 public const ushort G2C_BindPlayer = 10034;
-		 public const ushort G2C_TestHotfixMessage = 10035;
-		 public const ushort C2M_TestRobotCase = 10036;
-		 public const ushort M2C_TestRobotCase = 10037;
-		 public const ushort C2M_TransferMap = 10038;
-		 public const ushort M2C_TransferMap = 10039;
-		 public const ushort C2G_Benchmark = 10040;
-		 public const ushort G2C_Benchmark = 10041;
-		 public const ushort R2C_Disconnect = 10042;
+		 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 M2C_PathfindingResult = 10017;
+		 public const ushort C2M_Stop = 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 C2G_CreatePlayer = 10029;
+		 public const ushort G2C_CreatePlayer = 10030;
+		 public const ushort C2G_BindPlayer = 10031;
+		 public const ushort G2C_BindPlayer = 10032;
+		 public const ushort G2C_TestHotfixMessage = 10033;
+		 public const ushort C2M_TestRobotCase = 10034;
+		 public const ushort M2C_TestRobotCase = 10035;
+		 public const ushort C2M_TransferMap = 10036;
+		 public const ushort M2C_TransferMap = 10037;
+		 public const ushort C2G_Benchmark = 10038;
+		 public const ushort G2C_Benchmark = 10039;
+		 public const ushort R2C_Disconnect = 10040;
 	}
 }

+ 31 - 0
Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/PlayerProto_CS_30001.cs

@@ -69,9 +69,40 @@ namespace ET
 
 	}
 
+	[Message(PlayerProto.SkillKeyStruct)]
+	[ProtoContract]
+	public partial class SkillKeyStruct: ProtoObject
+	{
+		[ProtoMember(1)]
+		public int keyPos { get; set; }
+
+		[ProtoMember(2)]
+		public int baseSkillId { get; set; }
+
+		[ProtoMember(3)]
+		public int advancedSkillId { get; set; }
+
+		[ProtoMember(4)]
+		public string icon { get; set; }
+
+		[ProtoMember(5)]
+		public int flag { get; set; }
+
+		[ProtoMember(6)]
+		public int unlockLevel { get; set; }
+
+		[ProtoMember(7)]
+		public string name { get; set; }
+
+		[ProtoMember(8)]
+		public string baseSkillIcon { get; set; }
+
+	}
+
 	public static class PlayerProto
 	{
 		 public const ushort PlayerBasic = 30002;
 		 public const ushort Player = 30003;
+		 public const ushort SkillKeyStruct = 30004;
 	}
 }