| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- // message结构的属性名请使用 驼峰小写字母开始
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // versions:
- // protoc-gen-go v1.36.8
- // protoc v6.31.1
- // source: item.proto
- package pb
- import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
- unsafe "unsafe"
- )
- 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 ItemList struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 货币列表
- Currencies map[int32]*Currency `protobuf:"bytes,1,rep,name=currencies,proto3" json:"currencies,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- // 道具列表
- Items map[int32]*Asset `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- // 药品使用次数 key 药品ID D-道具-药品表药品ID value 当前使用次数
- MedicineUses map[int32]int32 `protobuf:"bytes,3,rep,name=medicineUses,proto3" json:"medicineUses,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *ItemList) Reset() {
- *x = ItemList{}
- mi := &file_item_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *ItemList) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ItemList) ProtoMessage() {}
- func (x *ItemList) ProtoReflect() protoreflect.Message {
- mi := &file_item_proto_msgTypes[0]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ItemList.ProtoReflect.Descriptor instead.
- func (*ItemList) Descriptor() ([]byte, []int) {
- return file_item_proto_rawDescGZIP(), []int{0}
- }
- func (x *ItemList) GetCurrencies() map[int32]*Currency {
- if x != nil {
- return x.Currencies
- }
- return nil
- }
- func (x *ItemList) GetItems() map[int32]*Asset {
- if x != nil {
- return x.Items
- }
- return nil
- }
- func (x *ItemList) GetMedicineUses() map[int32]int32 {
- if x != nil {
- return x.MedicineUses
- }
- return nil
- }
- // 货币
- type Currency struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 货币id
- Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
- // 当前数量
- Num int64 `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
- // 最大数量(0表示没有最大值)
- MaxNum int64 `protobuf:"varint,3,opt,name=maxNum,proto3" json:"maxNum,omitempty"`
- // 最后一次更新时间(毫秒)
- UpdateTime int64 `protobuf:"varint,4,opt,name=updateTime,proto3" json:"updateTime,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *Currency) Reset() {
- *x = Currency{}
- mi := &file_item_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *Currency) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*Currency) ProtoMessage() {}
- func (x *Currency) ProtoReflect() protoreflect.Message {
- mi := &file_item_proto_msgTypes[1]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use Currency.ProtoReflect.Descriptor instead.
- func (*Currency) Descriptor() ([]byte, []int) {
- return file_item_proto_rawDescGZIP(), []int{1}
- }
- func (x *Currency) GetId() int32 {
- if x != nil {
- return x.Id
- }
- return 0
- }
- func (x *Currency) GetNum() int64 {
- if x != nil {
- return x.Num
- }
- return 0
- }
- func (x *Currency) GetMaxNum() int64 {
- if x != nil {
- return x.MaxNum
- }
- return 0
- }
- func (x *Currency) GetUpdateTime() int64 {
- if x != nil {
- return x.UpdateTime
- }
- return 0
- }
- // [请求]道具使用
- type ItemUseRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 宝箱道具ID
- ItemID int32 `protobuf:"varint,1,opt,name=itemID,proto3" json:"itemID,omitempty"`
- // 开启数量
- UseNum int64 `protobuf:"varint,2,opt,name=useNum,proto3" json:"useNum,omitempty"`
- // (选择道具ID) 仅自选类型宝箱使用
- SelectItemID int32 `protobuf:"varint,3,opt,name=selectItemID,proto3" json:"selectItemID,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *ItemUseRequest) Reset() {
- *x = ItemUseRequest{}
- mi := &file_item_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *ItemUseRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ItemUseRequest) ProtoMessage() {}
- func (x *ItemUseRequest) ProtoReflect() protoreflect.Message {
- mi := &file_item_proto_msgTypes[2]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ItemUseRequest.ProtoReflect.Descriptor instead.
- func (*ItemUseRequest) Descriptor() ([]byte, []int) {
- return file_item_proto_rawDescGZIP(), []int{2}
- }
- func (x *ItemUseRequest) GetItemID() int32 {
- if x != nil {
- return x.ItemID
- }
- return 0
- }
- func (x *ItemUseRequest) GetUseNum() int64 {
- if x != nil {
- return x.UseNum
- }
- return 0
- }
- func (x *ItemUseRequest) GetSelectItemID() int32 {
- if x != nil {
- return x.SelectItemID
- }
- return 0
- }
- var File_item_proto protoreflect.FileDescriptor
- const file_item_proto_rawDesc = "" +
- "\n" +
- "\n" +
- "item.proto\x12\x02pb\x1a\x0fbase_type.proto\"\x8e\x03\n" +
- "\bItemList\x12<\n" +
- "\n" +
- "currencies\x18\x01 \x03(\v2\x1c.pb.ItemList.CurrenciesEntryR\n" +
- "currencies\x12-\n" +
- "\x05items\x18\x02 \x03(\v2\x17.pb.ItemList.ItemsEntryR\x05items\x12B\n" +
- "\fmedicineUses\x18\x03 \x03(\v2\x1e.pb.ItemList.MedicineUsesEntryR\fmedicineUses\x1aK\n" +
- "\x0fCurrenciesEntry\x12\x10\n" +
- "\x03key\x18\x01 \x01(\x05R\x03key\x12\"\n" +
- "\x05value\x18\x02 \x01(\v2\f.pb.CurrencyR\x05value:\x028\x01\x1aC\n" +
- "\n" +
- "ItemsEntry\x12\x10\n" +
- "\x03key\x18\x01 \x01(\x05R\x03key\x12\x1f\n" +
- "\x05value\x18\x02 \x01(\v2\t.pb.AssetR\x05value:\x028\x01\x1a?\n" +
- "\x11MedicineUsesEntry\x12\x10\n" +
- "\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" +
- "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\"d\n" +
- "\bCurrency\x12\x0e\n" +
- "\x02id\x18\x01 \x01(\x05R\x02id\x12\x10\n" +
- "\x03num\x18\x02 \x01(\x03R\x03num\x12\x16\n" +
- "\x06maxNum\x18\x03 \x01(\x03R\x06maxNum\x12\x1e\n" +
- "\n" +
- "updateTime\x18\x04 \x01(\x03R\n" +
- "updateTime\"d\n" +
- "\x0eItemUseRequest\x12\x16\n" +
- "\x06itemID\x18\x01 \x01(\x05R\x06itemID\x12\x16\n" +
- "\x06useNum\x18\x02 \x01(\x03R\x06useNum\x12\"\n" +
- "\fselectItemID\x18\x03 \x01(\x05R\fselectItemIDB\x05Z\x03/pbb\x06proto3"
- var (
- file_item_proto_rawDescOnce sync.Once
- file_item_proto_rawDescData []byte
- )
- func file_item_proto_rawDescGZIP() []byte {
- file_item_proto_rawDescOnce.Do(func() {
- file_item_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_item_proto_rawDesc), len(file_item_proto_rawDesc)))
- })
- return file_item_proto_rawDescData
- }
- var file_item_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
- var file_item_proto_goTypes = []any{
- (*ItemList)(nil), // 0: pb.ItemList
- (*Currency)(nil), // 1: pb.Currency
- (*ItemUseRequest)(nil), // 2: pb.ItemUseRequest
- nil, // 3: pb.ItemList.CurrenciesEntry
- nil, // 4: pb.ItemList.ItemsEntry
- nil, // 5: pb.ItemList.MedicineUsesEntry
- (*Asset)(nil), // 6: pb.Asset
- }
- var file_item_proto_depIdxs = []int32{
- 3, // 0: pb.ItemList.currencies:type_name -> pb.ItemList.CurrenciesEntry
- 4, // 1: pb.ItemList.items:type_name -> pb.ItemList.ItemsEntry
- 5, // 2: pb.ItemList.medicineUses:type_name -> pb.ItemList.MedicineUsesEntry
- 1, // 3: pb.ItemList.CurrenciesEntry.value:type_name -> pb.Currency
- 6, // 4: pb.ItemList.ItemsEntry.value:type_name -> pb.Asset
- 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
- 5, // [5:5] is the sub-list for extension extendee
- 0, // [0:5] is the sub-list for field type_name
- }
- func init() { file_item_proto_init() }
- func file_item_proto_init() {
- if File_item_proto != nil {
- return
- }
- file_base_type_proto_init()
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: unsafe.Slice(unsafe.StringData(file_item_proto_rawDesc), len(file_item_proto_rawDesc)),
- NumEnums: 0,
- NumMessages: 6,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_item_proto_goTypes,
- DependencyIndexes: file_item_proto_depIdxs,
- MessageInfos: file_item_proto_msgTypes,
- }.Build()
- File_item_proto = out.File
- file_item_proto_goTypes = nil
- file_item_proto_depIdxs = nil
- }
|