From 27a173f5666011b331563b2b924db37af9ed48ad Mon Sep 17 00:00:00 2001 From: zqj <582132116@qq.com> Date: Mon, 25 Apr 2022 15:24:50 +0800 Subject: [PATCH] fix: 更新背包系统文档,更改角色信息修改协议名字 --- pb/game.pb.go | 162 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------- pb/protocode.pb.go | 28 ++++++++++++++-------------- protos | 2 +- 3 files changed, 96 insertions(+), 96 deletions(-) diff --git a/pb/game.pb.go b/pb/game.pb.go index 1f766ba..f517c0c 100644 --- a/pb/game.pb.go +++ b/pb/game.pb.go @@ -227,18 +227,16 @@ func (x *CreateReq) GetDevice() string { return "" } -type RoleRsp struct { +type ChangeTeamReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` - Hero []*Hero `protobuf:"bytes,3,rep,name=hero,proto3" json:"hero,omitempty"` - Team []*Team `protobuf:"bytes,4,rep,name=team,proto3" json:"team,omitempty"` + Team []*Team `protobuf:"bytes,1,rep,name=team,proto3" json:"team,omitempty"` } -func (x *RoleRsp) Reset() { - *x = RoleRsp{} +func (x *ChangeTeamReq) Reset() { + *x = ChangeTeamReq{} if protoimpl.UnsafeEnabled { mi := &file_game_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -246,13 +244,13 @@ func (x *RoleRsp) Reset() { } } -func (x *RoleRsp) String() string { +func (x *ChangeTeamReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RoleRsp) ProtoMessage() {} +func (*ChangeTeamReq) ProtoMessage() {} -func (x *RoleRsp) ProtoReflect() protoreflect.Message { +func (x *ChangeTeamReq) ProtoReflect() protoreflect.Message { mi := &file_game_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -264,44 +262,30 @@ func (x *RoleRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RoleRsp.ProtoReflect.Descriptor instead. -func (*RoleRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use ChangeTeamReq.ProtoReflect.Descriptor instead. +func (*ChangeTeamReq) Descriptor() ([]byte, []int) { return file_game_proto_rawDescGZIP(), []int{4} } -func (x *RoleRsp) GetRole() *Role { - if x != nil { - return x.Role - } - return nil -} - -func (x *RoleRsp) GetHero() []*Hero { - if x != nil { - return x.Hero - } - return nil -} - -func (x *RoleRsp) GetTeam() []*Team { +func (x *ChangeTeamReq) GetTeam() []*Team { if x != nil { return x.Team } return nil } -//ResponseCmd UpdateRolePropertyRsp -type UpdateRolePropertyRsp struct { +type RoleRsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id []int32 `protobuf:"varint,1,rep,packed,name=id,proto3" json:"id,omitempty"` Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` + Hero []*Hero `protobuf:"bytes,3,rep,name=hero,proto3" json:"hero,omitempty"` + Team []*Team `protobuf:"bytes,4,rep,name=team,proto3" json:"team,omitempty"` } -func (x *UpdateRolePropertyRsp) Reset() { - *x = UpdateRolePropertyRsp{} +func (x *RoleRsp) Reset() { + *x = RoleRsp{} if protoimpl.UnsafeEnabled { mi := &file_game_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -309,13 +293,13 @@ func (x *UpdateRolePropertyRsp) Reset() { } } -func (x *UpdateRolePropertyRsp) String() string { +func (x *RoleRsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateRolePropertyRsp) ProtoMessage() {} +func (*RoleRsp) ProtoMessage() {} -func (x *UpdateRolePropertyRsp) ProtoReflect() protoreflect.Message { +func (x *RoleRsp) ProtoReflect() protoreflect.Message { mi := &file_game_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -327,35 +311,44 @@ func (x *UpdateRolePropertyRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateRolePropertyRsp.ProtoReflect.Descriptor instead. -func (*UpdateRolePropertyRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use RoleRsp.ProtoReflect.Descriptor instead. +func (*RoleRsp) Descriptor() ([]byte, []int) { return file_game_proto_rawDescGZIP(), []int{5} } -func (x *UpdateRolePropertyRsp) GetId() []int32 { +func (x *RoleRsp) GetRole() *Role { if x != nil { - return x.Id + return x.Role } return nil } -func (x *UpdateRolePropertyRsp) GetRole() *Role { +func (x *RoleRsp) GetHero() []*Hero { if x != nil { - return x.Role + return x.Hero } return nil } -type ChangeTeamReq struct { +func (x *RoleRsp) GetTeam() []*Team { + if x != nil { + return x.Team + } + return nil +} + +//ResponseCmd RoleUpdatePropertyRsp +type RoleUpdatePropertyRsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Team []*Team `protobuf:"bytes,1,rep,name=team,proto3" json:"team,omitempty"` + Id []int32 `protobuf:"varint,1,rep,packed,name=id,proto3" json:"id,omitempty"` + Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` } -func (x *ChangeTeamReq) Reset() { - *x = ChangeTeamReq{} +func (x *RoleUpdatePropertyRsp) Reset() { + *x = RoleUpdatePropertyRsp{} if protoimpl.UnsafeEnabled { mi := &file_game_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -363,13 +356,13 @@ func (x *ChangeTeamReq) Reset() { } } -func (x *ChangeTeamReq) String() string { +func (x *RoleUpdatePropertyRsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeTeamReq) ProtoMessage() {} +func (*RoleUpdatePropertyRsp) ProtoMessage() {} -func (x *ChangeTeamReq) ProtoReflect() protoreflect.Message { +func (x *RoleUpdatePropertyRsp) ProtoReflect() protoreflect.Message { mi := &file_game_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -381,14 +374,21 @@ func (x *ChangeTeamReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeTeamReq.ProtoReflect.Descriptor instead. -func (*ChangeTeamReq) Descriptor() ([]byte, []int) { +// Deprecated: Use RoleUpdatePropertyRsp.ProtoReflect.Descriptor instead. +func (*RoleUpdatePropertyRsp) Descriptor() ([]byte, []int) { return file_game_proto_rawDescGZIP(), []int{6} } -func (x *ChangeTeamReq) GetTeam() []*Team { +func (x *RoleUpdatePropertyRsp) GetId() []int32 { if x != nil { - return x.Team + return x.Id + } + return nil +} + +func (x *RoleUpdatePropertyRsp) GetRole() *Role { + if x != nil { + return x.Role } return nil } @@ -457,22 +457,22 @@ var file_game_proto_rawDesc = []byte{ 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x6f, 0x0a, 0x07, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x73, 0x70, - 0x12, 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, - 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, - 0x68, 0x65, 0x72, 0x6f, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x54, 0x65, 0x61, 0x6d, - 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x49, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x73, 0x70, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, - 0x65, 0x22, 0x31, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, - 0x65, 0x71, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, - 0x74, 0x65, 0x61, 0x6d, 0x22, 0x2a, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x31, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, + 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x54, 0x65, + 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x6f, 0x0a, 0x07, 0x52, 0x6f, 0x6c, 0x65, + 0x52, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x48, 0x65, 0x72, + 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x54, + 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x49, 0x0a, 0x15, 0x52, 0x6f, 0x6c, + 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, + 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, + 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x2a, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, @@ -497,20 +497,20 @@ var file_game_proto_goTypes = []interface{}{ (*HeartRsp)(nil), // 1: game.HeartRsp (*LoginReq)(nil), // 2: game.LoginReq (*CreateReq)(nil), // 3: game.CreateReq - (*RoleRsp)(nil), // 4: game.RoleRsp - (*UpdateRolePropertyRsp)(nil), // 5: game.UpdateRolePropertyRsp - (*ChangeTeamReq)(nil), // 6: game.ChangeTeamReq + (*ChangeTeamReq)(nil), // 4: game.ChangeTeamReq + (*RoleRsp)(nil), // 5: game.RoleRsp + (*RoleUpdatePropertyRsp)(nil), // 6: game.RoleUpdatePropertyRsp (*RoleUpdateItemsRsp)(nil), // 7: game.RoleUpdateItemsRsp - (*Role)(nil), // 8: models.Role - (*Hero)(nil), // 9: models.Hero - (*Team)(nil), // 10: models.Team + (*Team)(nil), // 8: models.Team + (*Role)(nil), // 9: models.Role + (*Hero)(nil), // 10: models.Hero } var file_game_proto_depIdxs = []int32{ - 8, // 0: game.RoleRsp.role:type_name -> models.Role - 9, // 1: game.RoleRsp.hero:type_name -> models.Hero - 10, // 2: game.RoleRsp.team:type_name -> models.Team - 8, // 3: game.UpdateRolePropertyRsp.role:type_name -> models.Role - 10, // 4: game.ChangeTeamReq.team:type_name -> models.Team + 8, // 0: game.ChangeTeamReq.team:type_name -> models.Team + 9, // 1: game.RoleRsp.role:type_name -> models.Role + 10, // 2: game.RoleRsp.hero:type_name -> models.Hero + 8, // 3: game.RoleRsp.team:type_name -> models.Team + 9, // 4: game.RoleUpdatePropertyRsp.role:type_name -> models.Role 5, // [5:5] is the sub-list for method output_type 5, // [5:5] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name @@ -574,7 +574,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleRsp); i { + switch v := v.(*ChangeTeamReq); i { case 0: return &v.state case 1: @@ -586,7 +586,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateRolePropertyRsp); i { + switch v := v.(*RoleRsp); i { case 0: return &v.state case 1: @@ -598,7 +598,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeTeamReq); i { + switch v := v.(*RoleUpdatePropertyRsp); i { case 0: return &v.state case 1: diff --git a/pb/protocode.pb.go b/pb/protocode.pb.go index 5018f15..642fe7b 100644 --- a/pb/protocode.pb.go +++ b/pb/protocode.pb.go @@ -29,9 +29,9 @@ const ( ProtoCode_HeartRsp ProtoCode = 3 ProtoCode_LoginReq ProtoCode = 4 ProtoCode_CreateReq ProtoCode = 5 - ProtoCode_RoleRsp ProtoCode = 6 - ProtoCode_UpdateRolePropertyRsp ProtoCode = 7 - ProtoCode_ChangeTeamReq ProtoCode = 8 + ProtoCode_ChangeTeamReq ProtoCode = 6 + ProtoCode_RoleRsp ProtoCode = 7 + ProtoCode_RoleUpdatePropertyRsp ProtoCode = 8 ProtoCode_RoleUpdateItemsRsp ProtoCode = 9 ) @@ -44,9 +44,9 @@ var ( 3: "HeartRsp", 4: "LoginReq", 5: "CreateReq", - 6: "RoleRsp", - 7: "UpdateRolePropertyRsp", - 8: "ChangeTeamReq", + 6: "ChangeTeamReq", + 7: "RoleRsp", + 8: "RoleUpdatePropertyRsp", 9: "RoleUpdateItemsRsp", } ProtoCode_value = map[string]int32{ @@ -56,9 +56,9 @@ var ( "HeartRsp": 3, "LoginReq": 4, "CreateReq": 5, - "RoleRsp": 6, - "UpdateRolePropertyRsp": 7, - "ChangeTeamReq": 8, + "ChangeTeamReq": 6, + "RoleRsp": 7, + "RoleUpdatePropertyRsp": 8, "RoleUpdateItemsRsp": 9, } ) @@ -100,11 +100,11 @@ var file_protocode_proto_rawDesc = []byte{ 0x52, 0x73, 0x70, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, 0x52, 0x73, 0x70, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x10, 0x05, 0x12, 0x0b, - 0x0a, 0x07, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x52, 0x73, 0x70, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, + 0x0d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x10, 0x05, 0x12, 0x11, + 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x10, + 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x10, 0x07, 0x12, 0x19, + 0x0a, 0x15, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x52, 0x73, 0x70, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x10, 0x09, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/protos b/protos index 4d33c2f..55f842e 160000 --- a/protos +++ b/protos @@ -1 +1 @@ -Subproject commit 4d33c2f17e7228c02ce1898e1166ce46939a79f7 +Subproject commit 55f842e18ed04c3b9841618400575e292aa5c1f3 -- libgit2 0.21.2