diff --git a/Luban/Proto/Gen/ProtoBase.cs b/Luban/Proto/Gen/proto_cs.cs similarity index 79% rename from Luban/Proto/Gen/ProtoBase.cs rename to Luban/Proto/Gen/proto_cs.cs index 3d388751..0fe8ca93 100644 --- a/Luban/Proto/Gen/ProtoBase.cs +++ b/Luban/Proto/Gen/proto_cs.cs @@ -51,6 +51,21 @@ namespace GameProto [Serializable,global::ProtoBuf.ProtoContract(Name = @"CSPkgBody")] public partial class CSPkgBody { + [global::ProtoBuf.ProtoMember(1)] + public CSActLoginReq ActLoginReq { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public CSActLoginRes ActLoginRes { get; set; } + + } + + // 消息结果 + [Serializable,global::ProtoBuf.ProtoContract(Name = @"ProtoResult")] + public partial class ProtoResult + { + [global::ProtoBuf.ProtoMember(3)] + public List Params = new List(); + } // 协议ID diff --git a/Luban/Proto/Gen/proto_cs_player.cs b/Luban/Proto/Gen/proto_cs_player.cs new file mode 100644 index 00000000..64f3f5db --- /dev/null +++ b/Luban/Proto/Gen/proto_cs_player.cs @@ -0,0 +1,47 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using ProtoBuf; +using TEngine; +using System.Collections.Generic; + +namespace GameProto +{ + // 这个文件只放协议,和协议头 + // 角色登录结果请求 + [Serializable,global::ProtoBuf.ProtoContract(Name = @"CSActLoginReq")] + public partial class CSActLoginReq + { + [global::ProtoBuf.ProtoMember(1)] + public uint Uin { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public uint SvrID { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public uint AuthTime { get; set; } + + } + + // 角色登录结果返回 + [Serializable,global::ProtoBuf.ProtoContract(Name = @"CSActLoginRes")] + public partial class CSActLoginRes + { + [global::ProtoBuf.ProtoMember(1)] + public ProtoResult Result { get; set; } + + [global::ProtoBuf.ProtoMember(2)] + public uint Uin { get; set; } + + [global::ProtoBuf.ProtoMember(3)] + public uint RoleID { get; set; } + + } + +} diff --git a/Luban/Proto/pb_schemas/ExternalMessage.proto b/Luban/Proto/pb_schemas/ExternalMessage.proto deleted file mode 100644 index 350bc930..00000000 --- a/Luban/Proto/pb_schemas/ExternalMessage.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package GameProto; - -// 对外服数据协议 -message ExternalMessage { - // 请求命令类型: 0 心跳,1 业务 - int32 cmdCode = 1; - // 协议开关,用于一些协议级别的开关控制,比如 安全加密校验等。 : 0 不校验 - int32 protocolSwitch = 2; - // 业务路由(高16为主, 低16为子) - int32 cmdMerge = 3; - // 响应码: 0:成功, 其他为有错误 - sint32 responseStatus = 4; - // 验证信息: 当 responseStatus == -1001 时, 会有值 - string validMsg = 5; - // 业务请求数据 - bytes data = 6; -} - -// int 包装类 -message IntPb { - // int 值 - sint32 intValue = 1; -} - -// int list 包装类 -message IntListPb { - // intList - repeated sint32 intValues = 1; -} - -// long 包装类 -message LongPb { - // long 值 - sint64 longValue = 1; -} - -// long list 包装类 -message LongListPb { - // longList - repeated sint64 longValues = 1; -} \ No newline at end of file diff --git a/Luban/Proto/pb_schemas/GameProto.proto b/Luban/Proto/pb_schemas/GameProto.proto deleted file mode 100644 index 6f476e76..00000000 --- a/Luban/Proto/pb_schemas/GameProto.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package GameProto; -// 游戏全局基础数据,和协议无关,就放结构 - -// 导入定义 -import "ProtoBase"; - diff --git a/Luban/Proto/pb_schemas/ProtoBase.proto b/Luban/Proto/pb_schemas/ProtoBase.proto deleted file mode 100644 index 55a40694..00000000 --- a/Luban/Proto/pb_schemas/ProtoBase.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package GameProto; -// 这个文件只放协议,和协议头 - -// 消息协议 -message CSPkg -{ - CSPkgHead Head = 1; //消息协议头 - CSPkgBody Body = 2; //消息协议体 -} - -// 消息协议头 -message CSPkgHead -{ - uint32 MsgId = 1; //协议号 - uint32 MsgLength = 2; //协议长度 - uint32 MsgVersion = 3; //协议版本 - uint32 Echo = 4; //回带字段 - uint32 SvrTime = 5; //服务器时间 -} - -// 消息协议体 -message CSPkgBody -{ - -} - - -// 协议ID -enum CSMsgID -{ - CS_START = 0; - CS_HeartBeat = 10001; - CS_END = 10000; -} diff --git a/Luban/Proto/pb_schemas/proto_cs_base.proto b/Luban/Proto/pb_schemas/proto_cs.proto similarity index 64% rename from Luban/Proto/pb_schemas/proto_cs_base.proto rename to Luban/Proto/pb_schemas/proto_cs.proto index 55a40694..c2fe39a3 100644 --- a/Luban/Proto/pb_schemas/proto_cs_base.proto +++ b/Luban/Proto/pb_schemas/proto_cs.proto @@ -23,7 +23,16 @@ message CSPkgHead // 消息协议体 message CSPkgBody { + CSActLoginReq ActLoginReq = 1; //帐号登录请求 + CSActLoginRes ActLoginRes = 2; //帐号登录回包 +} +// 消息结果 +message ProtoResult +{ + int32 Ret =1; //操作结果,0 为成功, 其他为错误码 + int32 ParamCnt =2; //文本参数数目 + repeated string Params = 3;//Ret描述的文本参数 } diff --git a/Luban/Proto/pb_schemas/proto_cs_player.proto b/Luban/Proto/pb_schemas/proto_cs_player.proto new file mode 100644 index 00000000..cf7dc01c --- /dev/null +++ b/Luban/Proto/pb_schemas/proto_cs_player.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package GameProto; +// 这个文件只放协议,和协议头 + +MsgId CS_CMD_ACT_LOGIN_REQ = 2001; //帐号登录请求 +// 角色登录结果请求 +message CSActLoginReq +{ + uint32 Uin = 1; //帐号Uin + uint32 SvrID = 2; //服务器ID + uint32 AuthTime = 3; //账户认证的时间 + uint32 NetworkType = 4, //网络类型 +} + +MsgId CS_CMD_ACT_LOGIN_RES = 2002; //帐号登录回包 +// 角色登录结果返回 +message CSActLoginRes +{ + ProtoResult Result = 1; //返回操作结果 + uint32 Uin = 2; //帐号Uin + uint32 RoleID = 3; //角色ID +}