重写消息

This commit is contained in:
liuxiaobo 2025-06-08 22:42:58 +08:00
parent c2c836d6e6
commit 143c152b0e
3 changed files with 111 additions and 111 deletions

View File

@ -75,7 +75,7 @@ func (ChatType) EnumDescriptor() ([]byte, []int) {
} }
// 聊天消息 // 聊天消息
type C2SChat struct { type ReqChat struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
SrcUser *ChatUser `protobuf:"bytes,1,opt,name=src_user,json=srcUser,proto3" json:"src_user,omitempty"` // 说话的人 SrcUser *ChatUser `protobuf:"bytes,1,opt,name=src_user,json=srcUser,proto3" json:"src_user,omitempty"` // 说话的人
DstUser *ChatUser `protobuf:"bytes,2,opt,name=dst_user,json=dstUser,proto3" json:"dst_user,omitempty"` // 接收者 DstUser *ChatUser `protobuf:"bytes,2,opt,name=dst_user,json=dstUser,proto3" json:"dst_user,omitempty"` // 接收者
@ -86,20 +86,20 @@ type C2SChat struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *C2SChat) Reset() { func (x *ReqChat) Reset() {
*x = C2SChat{} *x = ReqChat{}
mi := &file_chat_proto_msgTypes[0] mi := &file_chat_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
func (x *C2SChat) String() string { func (x *ReqChat) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*C2SChat) ProtoMessage() {} func (*ReqChat) ProtoMessage() {}
func (x *C2SChat) ProtoReflect() protoreflect.Message { func (x *ReqChat) ProtoReflect() protoreflect.Message {
mi := &file_chat_proto_msgTypes[0] mi := &file_chat_proto_msgTypes[0]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -111,40 +111,40 @@ func (x *C2SChat) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use C2SChat.ProtoReflect.Descriptor instead. // Deprecated: Use ReqChat.ProtoReflect.Descriptor instead.
func (*C2SChat) Descriptor() ([]byte, []int) { func (*ReqChat) Descriptor() ([]byte, []int) {
return file_chat_proto_rawDescGZIP(), []int{0} return file_chat_proto_rawDescGZIP(), []int{0}
} }
func (x *C2SChat) GetSrcUser() *ChatUser { func (x *ReqChat) GetSrcUser() *ChatUser {
if x != nil { if x != nil {
return x.SrcUser return x.SrcUser
} }
return nil return nil
} }
func (x *C2SChat) GetDstUser() *ChatUser { func (x *ReqChat) GetDstUser() *ChatUser {
if x != nil { if x != nil {
return x.DstUser return x.DstUser
} }
return nil return nil
} }
func (x *C2SChat) GetType() ChatType { func (x *ReqChat) GetType() ChatType {
if x != nil { if x != nil {
return x.Type return x.Type
} }
return ChatType_CT_Unknown return ChatType_CT_Unknown
} }
func (x *C2SChat) GetGameId() ServiceTypeId { func (x *ReqChat) GetGameId() ServiceTypeId {
if x != nil { if x != nil {
return x.GameId return x.GameId
} }
return ServiceTypeId_STI_Unknown return ServiceTypeId_STI_Unknown
} }
func (x *C2SChat) GetContent() string { func (x *ReqChat) GetContent() string {
if x != nil { if x != nil {
return x.Content return x.Content
} }
@ -158,7 +158,7 @@ const file_chat_proto_rawDesc = "" +
"\n" + "\n" +
"chat.proto\x12\x02pb\x1a\n" + "chat.proto\x12\x02pb\x1a\n" +
"user.proto\x1a\rservice.proto\"\xc3\x01\n" + "user.proto\x1a\rservice.proto\"\xc3\x01\n" +
"\aC2SChat\x12'\n" + "\aReqChat\x12'\n" +
"\bsrc_user\x18\x01 \x01(\v2\f.pb.ChatUserR\asrcUser\x12'\n" + "\bsrc_user\x18\x01 \x01(\v2\f.pb.ChatUserR\asrcUser\x12'\n" +
"\bdst_user\x18\x02 \x01(\v2\f.pb.ChatUserR\adstUser\x12 \n" + "\bdst_user\x18\x02 \x01(\v2\f.pb.ChatUserR\adstUser\x12 \n" +
"\x04type\x18\x03 \x01(\x0e2\f.pb.ChatTypeR\x04type\x12*\n" + "\x04type\x18\x03 \x01(\x0e2\f.pb.ChatTypeR\x04type\x12*\n" +
@ -189,15 +189,15 @@ var file_chat_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_chat_proto_goTypes = []any{ var file_chat_proto_goTypes = []any{
(ChatType)(0), // 0: pb.ChatType (ChatType)(0), // 0: pb.ChatType
(*C2SChat)(nil), // 1: pb.C2SChat (*ReqChat)(nil), // 1: pb.ReqChat
(*ChatUser)(nil), // 2: pb.ChatUser (*ChatUser)(nil), // 2: pb.ChatUser
(ServiceTypeId)(0), // 3: pb.ServiceTypeId (ServiceTypeId)(0), // 3: pb.ServiceTypeId
} }
var file_chat_proto_depIdxs = []int32{ var file_chat_proto_depIdxs = []int32{
2, // 0: pb.C2SChat.src_user:type_name -> pb.ChatUser 2, // 0: pb.ReqChat.src_user:type_name -> pb.ChatUser
2, // 1: pb.C2SChat.dst_user:type_name -> pb.ChatUser 2, // 1: pb.ReqChat.dst_user:type_name -> pb.ChatUser
0, // 2: pb.C2SChat.type:type_name -> pb.ChatType 0, // 2: pb.ReqChat.type:type_name -> pb.ChatType
3, // 3: pb.C2SChat.game_id:type_name -> pb.ServiceTypeId 3, // 3: pb.ReqChat.game_id:type_name -> pb.ServiceTypeId
4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension type_name

View File

@ -22,7 +22,7 @@ const (
) )
// 玩家登陆 // 玩家登陆
type C2SUserLogin struct { type ReqUserLogin struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // 用户名 Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // 用户名
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // 密码或token Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // 密码或token
@ -33,20 +33,20 @@ type C2SUserLogin struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *C2SUserLogin) Reset() { func (x *ReqUserLogin) Reset() {
*x = C2SUserLogin{} *x = ReqUserLogin{}
mi := &file_login_proto_msgTypes[0] mi := &file_login_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
func (x *C2SUserLogin) String() string { func (x *ReqUserLogin) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*C2SUserLogin) ProtoMessage() {} func (*ReqUserLogin) ProtoMessage() {}
func (x *C2SUserLogin) ProtoReflect() protoreflect.Message { func (x *ReqUserLogin) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[0] mi := &file_login_proto_msgTypes[0]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -58,47 +58,47 @@ func (x *C2SUserLogin) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use C2SUserLogin.ProtoReflect.Descriptor instead. // Deprecated: Use ReqUserLogin.ProtoReflect.Descriptor instead.
func (*C2SUserLogin) Descriptor() ([]byte, []int) { func (*ReqUserLogin) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{0} return file_login_proto_rawDescGZIP(), []int{0}
} }
func (x *C2SUserLogin) GetUsername() string { func (x *ReqUserLogin) GetUsername() string {
if x != nil { if x != nil {
return x.Username return x.Username
} }
return "" return ""
} }
func (x *C2SUserLogin) GetPassword() string { func (x *ReqUserLogin) GetPassword() string {
if x != nil { if x != nil {
return x.Password return x.Password
} }
return "" return ""
} }
func (x *C2SUserLogin) GetIp() string { func (x *ReqUserLogin) GetIp() string {
if x != nil { if x != nil {
return x.Ip return x.Ip
} }
return "" return ""
} }
func (x *C2SUserLogin) GetDeviceId() string { func (x *ReqUserLogin) GetDeviceId() string {
if x != nil { if x != nil {
return x.DeviceId return x.DeviceId
} }
return "" return ""
} }
func (x *C2SUserLogin) GetVersion() string { func (x *ReqUserLogin) GetVersion() string {
if x != nil { if x != nil {
return x.Version return x.Version
} }
return "" return ""
} }
type S2CUserLogin struct { type RspUserLogin struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=pb.ErrCode" json:"code,omitempty"` Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=pb.ErrCode" json:"code,omitempty"`
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
@ -107,20 +107,20 @@ type S2CUserLogin struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *S2CUserLogin) Reset() { func (x *RspUserLogin) Reset() {
*x = S2CUserLogin{} *x = RspUserLogin{}
mi := &file_login_proto_msgTypes[1] mi := &file_login_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
func (x *S2CUserLogin) String() string { func (x *RspUserLogin) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*S2CUserLogin) ProtoMessage() {} func (*RspUserLogin) ProtoMessage() {}
func (x *S2CUserLogin) ProtoReflect() protoreflect.Message { func (x *RspUserLogin) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[1] mi := &file_login_proto_msgTypes[1]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -132,26 +132,26 @@ func (x *S2CUserLogin) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use S2CUserLogin.ProtoReflect.Descriptor instead. // Deprecated: Use RspUserLogin.ProtoReflect.Descriptor instead.
func (*S2CUserLogin) Descriptor() ([]byte, []int) { func (*RspUserLogin) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{1} return file_login_proto_rawDescGZIP(), []int{1}
} }
func (x *S2CUserLogin) GetCode() ErrCode { func (x *RspUserLogin) GetCode() ErrCode {
if x != nil { if x != nil {
return x.Code return x.Code
} }
return ErrCode_OK return ErrCode_OK
} }
func (x *S2CUserLogin) GetUserId() int64 { func (x *RspUserLogin) GetUserId() int64 {
if x != nil { if x != nil {
return x.UserId return x.UserId
} }
return 0 return 0
} }
func (x *S2CUserLogin) GetToken() string { func (x *RspUserLogin) GetToken() string {
if x != nil { if x != nil {
return x.Token return x.Token
} }
@ -204,26 +204,26 @@ func (x *NtfUserOnline) GetUserId() int64 {
} }
// 玩家登陆 // 玩家登陆
type C2SUserLogout struct { type ReqUserLogout struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *C2SUserLogout) Reset() { func (x *ReqUserLogout) Reset() {
*x = C2SUserLogout{} *x = ReqUserLogout{}
mi := &file_login_proto_msgTypes[3] mi := &file_login_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
func (x *C2SUserLogout) String() string { func (x *ReqUserLogout) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*C2SUserLogout) ProtoMessage() {} func (*ReqUserLogout) ProtoMessage() {}
func (x *C2SUserLogout) ProtoReflect() protoreflect.Message { func (x *ReqUserLogout) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[3] mi := &file_login_proto_msgTypes[3]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -235,32 +235,32 @@ func (x *C2SUserLogout) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use C2SUserLogout.ProtoReflect.Descriptor instead. // Deprecated: Use ReqUserLogout.ProtoReflect.Descriptor instead.
func (*C2SUserLogout) Descriptor() ([]byte, []int) { func (*ReqUserLogout) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{3} return file_login_proto_rawDescGZIP(), []int{3}
} }
type S2CUserLogout struct { type RspUserLogout struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=pb.ErrCode" json:"code,omitempty"` // 登出原因 Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=pb.ErrCode" json:"code,omitempty"` // 登出原因
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *S2CUserLogout) Reset() { func (x *RspUserLogout) Reset() {
*x = S2CUserLogout{} *x = RspUserLogout{}
mi := &file_login_proto_msgTypes[4] mi := &file_login_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
func (x *S2CUserLogout) String() string { func (x *RspUserLogout) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*S2CUserLogout) ProtoMessage() {} func (*RspUserLogout) ProtoMessage() {}
func (x *S2CUserLogout) ProtoReflect() protoreflect.Message { func (x *RspUserLogout) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[4] mi := &file_login_proto_msgTypes[4]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -272,12 +272,12 @@ func (x *S2CUserLogout) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use S2CUserLogout.ProtoReflect.Descriptor instead. // Deprecated: Use RspUserLogout.ProtoReflect.Descriptor instead.
func (*S2CUserLogout) Descriptor() ([]byte, []int) { func (*RspUserLogout) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{4} return file_login_proto_rawDescGZIP(), []int{4}
} }
func (x *S2CUserLogout) GetCode() ErrCode { func (x *RspUserLogout) GetCode() ErrCode {
if x != nil { if x != nil {
return x.Code return x.Code
} }
@ -335,21 +335,21 @@ const file_login_proto_rawDesc = "" +
"\n" + "\n" +
"\vlogin.proto\x12\x02pb\x1a\n" + "\vlogin.proto\x12\x02pb\x1a\n" +
"code.proto\"\x8d\x01\n" + "code.proto\"\x8d\x01\n" +
"\fC2SUserLogin\x12\x1a\n" + "\fReqUserLogin\x12\x1a\n" +
"\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" + "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
"\bpassword\x18\x02 \x01(\tR\bpassword\x12\x0e\n" + "\bpassword\x18\x02 \x01(\tR\bpassword\x12\x0e\n" +
"\x02ip\x18\x03 \x01(\tR\x02ip\x12\x1b\n" + "\x02ip\x18\x03 \x01(\tR\x02ip\x12\x1b\n" +
"\tdevice_id\x18\x04 \x01(\tR\bdeviceId\x12\x18\n" + "\tdevice_id\x18\x04 \x01(\tR\bdeviceId\x12\x18\n" +
"\aversion\x18\n" + "\aversion\x18\n" +
" \x01(\tR\aversion\"^\n" + " \x01(\tR\aversion\"^\n" +
"\fS2CUserLogin\x12\x1f\n" + "\fRspUserLogin\x12\x1f\n" +
"\x04code\x18\x01 \x01(\x0e2\v.pb.ErrCodeR\x04code\x12\x17\n" + "\x04code\x18\x01 \x01(\x0e2\v.pb.ErrCodeR\x04code\x12\x17\n" +
"\auser_id\x18\x02 \x01(\x03R\x06userId\x12\x14\n" + "\auser_id\x18\x02 \x01(\x03R\x06userId\x12\x14\n" +
"\x05token\x18\x03 \x01(\tR\x05token\"(\n" + "\x05token\x18\x03 \x01(\tR\x05token\"(\n" +
"\rNtfUserOnline\x12\x17\n" + "\rNtfUserOnline\x12\x17\n" +
"\auser_id\x18\x02 \x01(\x03R\x06userId\"\x0f\n" + "\auser_id\x18\x02 \x01(\x03R\x06userId\"\x0f\n" +
"\rC2SUserLogout\"0\n" + "\rReqUserLogout\"0\n" +
"\rS2CUserLogout\x12\x1f\n" + "\rRspUserLogout\x12\x1f\n" +
"\x04code\x18\x01 \x01(\x0e2\v.pb.ErrCodeR\x04code\")\n" + "\x04code\x18\x01 \x01(\x0e2\v.pb.ErrCodeR\x04code\")\n" +
"\x0eNtfUserOffline\x12\x17\n" + "\x0eNtfUserOffline\x12\x17\n" +
"\auser_id\x18\x02 \x01(\x03R\x06userIdB\x11Z\x0fcommon/proto/pbb\x06proto3" "\auser_id\x18\x02 \x01(\x03R\x06userIdB\x11Z\x0fcommon/proto/pbb\x06proto3"
@ -368,17 +368,17 @@ func file_login_proto_rawDescGZIP() []byte {
var file_login_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_login_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_login_proto_goTypes = []any{ var file_login_proto_goTypes = []any{
(*C2SUserLogin)(nil), // 0: pb.C2SUserLogin (*ReqUserLogin)(nil), // 0: pb.ReqUserLogin
(*S2CUserLogin)(nil), // 1: pb.S2CUserLogin (*RspUserLogin)(nil), // 1: pb.RspUserLogin
(*NtfUserOnline)(nil), // 2: pb.NtfUserOnline (*NtfUserOnline)(nil), // 2: pb.NtfUserOnline
(*C2SUserLogout)(nil), // 3: pb.C2SUserLogout (*ReqUserLogout)(nil), // 3: pb.ReqUserLogout
(*S2CUserLogout)(nil), // 4: pb.S2CUserLogout (*RspUserLogout)(nil), // 4: pb.RspUserLogout
(*NtfUserOffline)(nil), // 5: pb.NtfUserOffline (*NtfUserOffline)(nil), // 5: pb.NtfUserOffline
(ErrCode)(0), // 6: pb.ErrCode (ErrCode)(0), // 6: pb.ErrCode
} }
var file_login_proto_depIdxs = []int32{ var file_login_proto_depIdxs = []int32{
6, // 0: pb.S2CUserLogin.code:type_name -> pb.ErrCode 6, // 0: pb.RspUserLogin.code:type_name -> pb.ErrCode
6, // 1: pb.S2CUserLogout.code:type_name -> pb.ErrCode 6, // 1: pb.RspUserLogout.code:type_name -> pb.ErrCode
2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension type_name

View File

@ -22,7 +22,7 @@ const (
) )
// 房间匹配 // 房间匹配
type C2SMatchRoom struct { type ReqMatchRoom struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
PlayType int32 `protobuf:"varint,1,opt,name=PlayType,proto3" json:"PlayType,omitempty"` // 玩法id PlayType int32 `protobuf:"varint,1,opt,name=PlayType,proto3" json:"PlayType,omitempty"` // 玩法id
RoomType int32 `protobuf:"varint,2,opt,name=RoomType,proto3" json:"RoomType,omitempty"` // 房间类型,低级,中级,高级等 RoomType int32 `protobuf:"varint,2,opt,name=RoomType,proto3" json:"RoomType,omitempty"` // 房间类型,低级,中级,高级等
@ -30,20 +30,20 @@ type C2SMatchRoom struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *C2SMatchRoom) Reset() { func (x *ReqMatchRoom) Reset() {
*x = C2SMatchRoom{} *x = ReqMatchRoom{}
mi := &file_match_proto_msgTypes[0] mi := &file_match_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
func (x *C2SMatchRoom) String() string { func (x *ReqMatchRoom) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*C2SMatchRoom) ProtoMessage() {} func (*ReqMatchRoom) ProtoMessage() {}
func (x *C2SMatchRoom) ProtoReflect() protoreflect.Message { func (x *ReqMatchRoom) ProtoReflect() protoreflect.Message {
mi := &file_match_proto_msgTypes[0] mi := &file_match_proto_msgTypes[0]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -55,19 +55,19 @@ func (x *C2SMatchRoom) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use C2SMatchRoom.ProtoReflect.Descriptor instead. // Deprecated: Use ReqMatchRoom.ProtoReflect.Descriptor instead.
func (*C2SMatchRoom) Descriptor() ([]byte, []int) { func (*ReqMatchRoom) Descriptor() ([]byte, []int) {
return file_match_proto_rawDescGZIP(), []int{0} return file_match_proto_rawDescGZIP(), []int{0}
} }
func (x *C2SMatchRoom) GetPlayType() int32 { func (x *ReqMatchRoom) GetPlayType() int32 {
if x != nil { if x != nil {
return x.PlayType return x.PlayType
} }
return 0 return 0
} }
func (x *C2SMatchRoom) GetRoomType() int32 { func (x *ReqMatchRoom) GetRoomType() int32 {
if x != nil { if x != nil {
return x.RoomType return x.RoomType
} }
@ -75,31 +75,31 @@ func (x *C2SMatchRoom) GetRoomType() int32 {
} }
// 玩家进房间返回 匹配服返回该消息假房间。匹配成功后发给对应玩法服玩法服发NotifyUserEnterRoom才是真房间 // 玩家进房间返回 匹配服返回该消息假房间。匹配成功后发给对应玩法服玩法服发NotifyUserEnterRoom才是真房间
type S2CMatchRoom struct { type RspMatchRoom struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=pb.ErrCode" json:"code,omitempty"` Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=pb.ErrCode" json:"code,omitempty"`
PlayType int32 `protobuf:"varint,2,opt,name=PlayType,proto3" json:"PlayType,omitempty"` // 玩法id PlayType int32 `protobuf:"varint,2,opt,name=PlayType,proto3" json:"PlayType,omitempty"` // 玩法id
RoomType int32 `protobuf:"varint,3,opt,name=RoomType,proto3" json:"RoomType,omitempty"` // 房间类型,低级,中级,高级等 RoomType int32 `protobuf:"varint,3,opt,name=RoomType,proto3" json:"RoomType,omitempty"` // 房间类型,低级,中级,高级等
User *GameUser `protobuf:"bytes,4,opt,name=User,proto3" json:"User,omitempty"` // 玩家数据 User *GameUser `protobuf:"bytes,4,opt,name=User,proto3" json:"User,omitempty"` // 玩家数据
ColorInfo *S2CMatchRoom_ColorInfo `protobuf:"bytes,20,opt,name=colorInfo,proto3" json:"colorInfo,omitempty"` // color玩法配置信息 ColorInfo *RspMatchRoom_ColorInfo `protobuf:"bytes,20,opt,name=colorInfo,proto3" json:"colorInfo,omitempty"` // color玩法配置信息
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *S2CMatchRoom) Reset() { func (x *RspMatchRoom) Reset() {
*x = S2CMatchRoom{} *x = RspMatchRoom{}
mi := &file_match_proto_msgTypes[1] mi := &file_match_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
func (x *S2CMatchRoom) String() string { func (x *RspMatchRoom) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*S2CMatchRoom) ProtoMessage() {} func (*RspMatchRoom) ProtoMessage() {}
func (x *S2CMatchRoom) ProtoReflect() protoreflect.Message { func (x *RspMatchRoom) ProtoReflect() protoreflect.Message {
mi := &file_match_proto_msgTypes[1] mi := &file_match_proto_msgTypes[1]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -111,40 +111,40 @@ func (x *S2CMatchRoom) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use S2CMatchRoom.ProtoReflect.Descriptor instead. // Deprecated: Use RspMatchRoom.ProtoReflect.Descriptor instead.
func (*S2CMatchRoom) Descriptor() ([]byte, []int) { func (*RspMatchRoom) Descriptor() ([]byte, []int) {
return file_match_proto_rawDescGZIP(), []int{1} return file_match_proto_rawDescGZIP(), []int{1}
} }
func (x *S2CMatchRoom) GetCode() ErrCode { func (x *RspMatchRoom) GetCode() ErrCode {
if x != nil { if x != nil {
return x.Code return x.Code
} }
return ErrCode_OK return ErrCode_OK
} }
func (x *S2CMatchRoom) GetPlayType() int32 { func (x *RspMatchRoom) GetPlayType() int32 {
if x != nil { if x != nil {
return x.PlayType return x.PlayType
} }
return 0 return 0
} }
func (x *S2CMatchRoom) GetRoomType() int32 { func (x *RspMatchRoom) GetRoomType() int32 {
if x != nil { if x != nil {
return x.RoomType return x.RoomType
} }
return 0 return 0
} }
func (x *S2CMatchRoom) GetUser() *GameUser { func (x *RspMatchRoom) GetUser() *GameUser {
if x != nil { if x != nil {
return x.User return x.User
} }
return nil return nil
} }
func (x *S2CMatchRoom) GetColorInfo() *S2CMatchRoom_ColorInfo { func (x *RspMatchRoom) GetColorInfo() *RspMatchRoom_ColorInfo {
if x != nil { if x != nil {
return x.ColorInfo return x.ColorInfo
} }
@ -196,26 +196,26 @@ func (x *NotifyUserEnterRoom) GetUser() []*GameUser {
} }
// color玩法配置信息 // color玩法配置信息
type S2CMatchRoom_ColorInfo struct { type RspMatchRoom_ColorInfo struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *S2CMatchRoom_ColorInfo) Reset() { func (x *RspMatchRoom_ColorInfo) Reset() {
*x = S2CMatchRoom_ColorInfo{} *x = RspMatchRoom_ColorInfo{}
mi := &file_match_proto_msgTypes[3] mi := &file_match_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
func (x *S2CMatchRoom_ColorInfo) String() string { func (x *RspMatchRoom_ColorInfo) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*S2CMatchRoom_ColorInfo) ProtoMessage() {} func (*RspMatchRoom_ColorInfo) ProtoMessage() {}
func (x *S2CMatchRoom_ColorInfo) ProtoReflect() protoreflect.Message { func (x *RspMatchRoom_ColorInfo) ProtoReflect() protoreflect.Message {
mi := &file_match_proto_msgTypes[3] mi := &file_match_proto_msgTypes[3]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -227,8 +227,8 @@ func (x *S2CMatchRoom_ColorInfo) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use S2CMatchRoom_ColorInfo.ProtoReflect.Descriptor instead. // Deprecated: Use RspMatchRoom_ColorInfo.ProtoReflect.Descriptor instead.
func (*S2CMatchRoom_ColorInfo) Descriptor() ([]byte, []int) { func (*RspMatchRoom_ColorInfo) Descriptor() ([]byte, []int) {
return file_match_proto_rawDescGZIP(), []int{1, 0} return file_match_proto_rawDescGZIP(), []int{1, 0}
} }
@ -239,15 +239,15 @@ const file_match_proto_rawDesc = "" +
"\vmatch.proto\x12\x02pb\x1a\n" + "\vmatch.proto\x12\x02pb\x1a\n" +
"code.proto\x1a\n" + "code.proto\x1a\n" +
"user.proto\"F\n" + "user.proto\"F\n" +
"\fC2SMatchRoom\x12\x1a\n" + "\fReqMatchRoom\x12\x1a\n" +
"\bPlayType\x18\x01 \x01(\x05R\bPlayType\x12\x1a\n" + "\bPlayType\x18\x01 \x01(\x05R\bPlayType\x12\x1a\n" +
"\bRoomType\x18\x02 \x01(\x05R\bRoomType\"\xd0\x01\n" + "\bRoomType\x18\x02 \x01(\x05R\bRoomType\"\xd0\x01\n" +
"\fS2CMatchRoom\x12\x1f\n" + "\fRspMatchRoom\x12\x1f\n" +
"\x04code\x18\x01 \x01(\x0e2\v.pb.ErrCodeR\x04code\x12\x1a\n" + "\x04code\x18\x01 \x01(\x0e2\v.pb.ErrCodeR\x04code\x12\x1a\n" +
"\bPlayType\x18\x02 \x01(\x05R\bPlayType\x12\x1a\n" + "\bPlayType\x18\x02 \x01(\x05R\bPlayType\x12\x1a\n" +
"\bRoomType\x18\x03 \x01(\x05R\bRoomType\x12 \n" + "\bRoomType\x18\x03 \x01(\x05R\bRoomType\x12 \n" +
"\x04User\x18\x04 \x01(\v2\f.pb.GameUserR\x04User\x128\n" + "\x04User\x18\x04 \x01(\v2\f.pb.GameUserR\x04User\x128\n" +
"\tcolorInfo\x18\x14 \x01(\v2\x1a.pb.S2CMatchRoom.ColorInfoR\tcolorInfo\x1a\v\n" + "\tcolorInfo\x18\x14 \x01(\v2\x1a.pb.RspMatchRoom.ColorInfoR\tcolorInfo\x1a\v\n" +
"\tColorInfo\"7\n" + "\tColorInfo\"7\n" +
"\x13NotifyUserEnterRoom\x12 \n" + "\x13NotifyUserEnterRoom\x12 \n" +
"\x04User\x18\x01 \x03(\v2\f.pb.GameUserR\x04UserB\x11Z\x0fcommon/proto/pbb\x06proto3" "\x04User\x18\x01 \x03(\v2\f.pb.GameUserR\x04UserB\x11Z\x0fcommon/proto/pbb\x06proto3"
@ -266,17 +266,17 @@ func file_match_proto_rawDescGZIP() []byte {
var file_match_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_match_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_match_proto_goTypes = []any{ var file_match_proto_goTypes = []any{
(*C2SMatchRoom)(nil), // 0: pb.C2SMatchRoom (*ReqMatchRoom)(nil), // 0: pb.ReqMatchRoom
(*S2CMatchRoom)(nil), // 1: pb.S2CMatchRoom (*RspMatchRoom)(nil), // 1: pb.RspMatchRoom
(*NotifyUserEnterRoom)(nil), // 2: pb.NotifyUserEnterRoom (*NotifyUserEnterRoom)(nil), // 2: pb.NotifyUserEnterRoom
(*S2CMatchRoom_ColorInfo)(nil), // 3: pb.S2CMatchRoom.ColorInfo (*RspMatchRoom_ColorInfo)(nil), // 3: pb.RspMatchRoom.ColorInfo
(ErrCode)(0), // 4: pb.ErrCode (ErrCode)(0), // 4: pb.ErrCode
(*GameUser)(nil), // 5: pb.GameUser (*GameUser)(nil), // 5: pb.GameUser
} }
var file_match_proto_depIdxs = []int32{ var file_match_proto_depIdxs = []int32{
4, // 0: pb.S2CMatchRoom.code:type_name -> pb.ErrCode 4, // 0: pb.RspMatchRoom.code:type_name -> pb.ErrCode
5, // 1: pb.S2CMatchRoom.User:type_name -> pb.GameUser 5, // 1: pb.RspMatchRoom.User:type_name -> pb.GameUser
3, // 2: pb.S2CMatchRoom.colorInfo:type_name -> pb.S2CMatchRoom.ColorInfo 3, // 2: pb.RspMatchRoom.colorInfo:type_name -> pb.RspMatchRoom.ColorInfo
5, // 3: pb.NotifyUserEnterRoom.User:type_name -> pb.GameUser 5, // 3: pb.NotifyUserEnterRoom.User:type_name -> pb.GameUser
4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for method input_type