302 lines
8.6 KiB
Go
302 lines
8.6 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.28.0
|
|
// protoc v3.20.0
|
|
// source: pack_db.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type ItemType int32
|
|
|
|
const (
|
|
ItemType_Props ItemType = 0 //道具
|
|
ItemType_Equip ItemType = 2 //装备
|
|
ItemType_Fragment ItemType = 12 //碎片
|
|
)
|
|
|
|
// Enum value maps for ItemType.
|
|
var (
|
|
ItemType_name = map[int32]string{
|
|
0: "Props",
|
|
2: "Equip",
|
|
12: "Fragment",
|
|
}
|
|
ItemType_value = map[string]int32{
|
|
"Props": 0,
|
|
"Equip": 2,
|
|
"Fragment": 12,
|
|
}
|
|
)
|
|
|
|
func (x ItemType) Enum() *ItemType {
|
|
p := new(ItemType)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x ItemType) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (ItemType) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_pack_db_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (ItemType) Type() protoreflect.EnumType {
|
|
return &file_pack_db_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x ItemType) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use ItemType.Descriptor instead.
|
|
func (ItemType) EnumDescriptor() ([]byte, []int) {
|
|
return file_pack_db_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
//背包格子
|
|
type GridData struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
IsNew bool `protobuf:"varint,1,opt,name=IsNew,proto3" json:"IsNew,omitempty"` //是否是新的
|
|
ItemId uint32 `protobuf:"varint,2,opt,name=ItemId,proto3" json:"ItemId,omitempty"` //存放物品的Id
|
|
Itype ItemType `protobuf:"varint,3,opt,name=Itype,proto3,enum=ItemType" json:"Itype,omitempty"` //物品类型
|
|
Amount uint32 `protobuf:"varint,4,opt,name=Amount,proto3" json:"Amount,omitempty"` //存放物品的数量
|
|
}
|
|
|
|
func (x *GridData) Reset() {
|
|
*x = GridData{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_pack_db_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *GridData) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GridData) ProtoMessage() {}
|
|
|
|
func (x *GridData) ProtoReflect() protoreflect.Message {
|
|
mi := &file_pack_db_proto_msgTypes[0]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GridData.ProtoReflect.Descriptor instead.
|
|
func (*GridData) Descriptor() ([]byte, []int) {
|
|
return file_pack_db_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *GridData) GetIsNew() bool {
|
|
if x != nil {
|
|
return x.IsNew
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *GridData) GetItemId() uint32 {
|
|
if x != nil {
|
|
return x.ItemId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *GridData) GetItype() ItemType {
|
|
if x != nil {
|
|
return x.Itype
|
|
}
|
|
return ItemType_Props
|
|
}
|
|
|
|
func (x *GridData) GetAmount() uint32 {
|
|
if x != nil {
|
|
return x.Amount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
//用户背包
|
|
type DB_UserPackData struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
UserId uint32 `protobuf:"varint,1,opt,name=UserId,proto3" json:"UserId,omitempty" bson:"_id"` //tags:{bson:"_id"}用户Id
|
|
Pack []*GridData `protobuf:"bytes,2,rep,name=Pack,proto3" json:"Pack,omitempty"` //背包列表
|
|
}
|
|
|
|
func (x *DB_UserPackData) Reset() {
|
|
*x = DB_UserPackData{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_pack_db_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *DB_UserPackData) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*DB_UserPackData) ProtoMessage() {}
|
|
|
|
func (x *DB_UserPackData) ProtoReflect() protoreflect.Message {
|
|
mi := &file_pack_db_proto_msgTypes[1]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use DB_UserPackData.ProtoReflect.Descriptor instead.
|
|
func (*DB_UserPackData) Descriptor() ([]byte, []int) {
|
|
return file_pack_db_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *DB_UserPackData) GetUserId() uint32 {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DB_UserPackData) GetPack() []*GridData {
|
|
if x != nil {
|
|
return x.Pack
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_pack_db_proto protoreflect.FileDescriptor
|
|
|
|
var file_pack_db_proto_rawDesc = []byte{
|
|
0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
|
0x71, 0x0a, 0x08, 0x47, 0x72, 0x69, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x49,
|
|
0x73, 0x4e, 0x65, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x49, 0x73, 0x4e, 0x65,
|
|
0x77, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
|
0x0d, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x49, 0x74, 0x79,
|
|
0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x54,
|
|
0x79, 0x70, 0x65, 0x52, 0x05, 0x49, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d,
|
|
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75,
|
|
0x6e, 0x74, 0x22, 0x48, 0x0a, 0x0f, 0x44, 0x42, 0x5f, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x63,
|
|
0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18,
|
|
0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a,
|
|
0x04, 0x50, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x47, 0x72,
|
|
0x69, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x50, 0x61, 0x63, 0x6b, 0x2a, 0x2e, 0x0a, 0x08,
|
|
0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x70,
|
|
0x73, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x71, 0x75, 0x69, 0x70, 0x10, 0x02, 0x12, 0x0c,
|
|
0x0a, 0x08, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x0c, 0x42, 0x06, 0x5a, 0x04,
|
|
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_pack_db_proto_rawDescOnce sync.Once
|
|
file_pack_db_proto_rawDescData = file_pack_db_proto_rawDesc
|
|
)
|
|
|
|
func file_pack_db_proto_rawDescGZIP() []byte {
|
|
file_pack_db_proto_rawDescOnce.Do(func() {
|
|
file_pack_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_pack_db_proto_rawDescData)
|
|
})
|
|
return file_pack_db_proto_rawDescData
|
|
}
|
|
|
|
var file_pack_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_pack_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
var file_pack_db_proto_goTypes = []interface{}{
|
|
(ItemType)(0), // 0: ItemType
|
|
(*GridData)(nil), // 1: GridData
|
|
(*DB_UserPackData)(nil), // 2: DB_UserPackData
|
|
}
|
|
var file_pack_db_proto_depIdxs = []int32{
|
|
0, // 0: GridData.Itype:type_name -> ItemType
|
|
1, // 1: DB_UserPackData.Pack:type_name -> GridData
|
|
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 extension type_name
|
|
2, // [2:2] is the sub-list for extension extendee
|
|
0, // [0:2] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_pack_db_proto_init() }
|
|
func file_pack_db_proto_init() {
|
|
if File_pack_db_proto != nil {
|
|
return
|
|
}
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_pack_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*GridData); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_pack_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*DB_UserPackData); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: file_pack_db_proto_rawDesc,
|
|
NumEnums: 1,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_pack_db_proto_goTypes,
|
|
DependencyIndexes: file_pack_db_proto_depIdxs,
|
|
EnumInfos: file_pack_db_proto_enumTypes,
|
|
MessageInfos: file_pack_db_proto_msgTypes,
|
|
}.Build()
|
|
File_pack_db_proto = out.File
|
|
file_pack_db_proto_rawDesc = nil
|
|
file_pack_db_proto_goTypes = nil
|
|
file_pack_db_proto_depIdxs = nil
|
|
}
|