上传商店批量购买处理

This commit is contained in:
liwei1dao 2022-07-28 10:59:47 +08:00
parent e36e16ae92
commit 5cb32b352e
3 changed files with 84 additions and 64 deletions

View File

@ -13,7 +13,7 @@ import (
//参数校验 //参数校验
func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ShopBuyReq) (code pb.ErrorCode) { func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ShopBuyReq) (code pb.ErrorCode) {
if req.ShopType == 0 || req.GoodsId == 0 { if req.ShopType == 0 || req.GoodsId == 0 || req.BuyNum <= 0 {
code = pb.ErrorCode_ReqParameterError code = pb.ErrorCode_ReqParameterError
} }
return return
@ -27,6 +27,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (code pb
conf *cfg.Game_shopitemData conf *cfg.Game_shopitemData
shopitem *pb.DBShopItem shopitem *pb.DBShopItem
need []*cfg.Game_atn need []*cfg.Game_atn
give []*cfg.Game_atn
) )
if code = this.BuyCheck(session, req); code != pb.ErrorCode_Success { if code = this.BuyCheck(session, req); code != pb.ErrorCode_Success {
return return
@ -50,22 +51,31 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (code pb
need[i] = &cfg.Game_atn{ need[i] = &cfg.Game_atn{
A: v.A, A: v.A,
T: v.T, T: v.T,
N: int32(math.Ceil(float64(v.N) * float64(conf.Sale) / float64(1000))), N: int32(math.Ceil(float64(v.N)*float64(conf.Sale)/float64(1000))) * req.BuyNum,
}
}
give = make([]*cfg.Game_atn, len(conf.Iteminfo))
for i, v := range conf.Iteminfo {
give[i] = &cfg.Game_atn{
A: v.A,
T: v.T,
N: v.N * req.BuyNum,
} }
} }
if code = this.module.ConsumeRes(session, need, true); code != pb.ErrorCode_Success { if code = this.module.ConsumeRes(session, need, true); code != pb.ErrorCode_Success {
return return
} }
if code = this.module.DispenseRes(session, conf.Iteminfo, true); code != pb.ErrorCode_Success { if code = this.module.DispenseRes(session, give, true); code != pb.ErrorCode_Success {
return return
} }
if conf.Buyminnum-shopitem.BuyNum[int32(req.ShopType)] < 0 { if conf.Buyminnum-shopitem.BuyNum[int32(req.ShopType)] < req.BuyNum {
code = pb.ErrorCode_ShopGoodsIsSoldOut code = pb.ErrorCode_ShopGoodsIsSoldOut
return return
} }
shopitem.BuyNum[int32(req.ShopType)]++ shopitem.BuyNum[int32(req.ShopType)] += req.BuyNum
shopitem.LastBuyTime[int32(req.ShopType)] = time.Now().Unix() shopitem.LastBuyTime[int32(req.ShopType)] = time.Now().Unix()
if !ok { if !ok {
this.module.modelShopItems.AddList(session.GetUserId(), shopitem.Id, shopitem) this.module.modelShopItems.AddList(session.GetUserId(), shopitem.Id, shopitem)

View File

@ -236,6 +236,7 @@ type ShopBuyReq struct {
ShopType ShopType `protobuf:"varint,1,opt,name=ShopType,proto3,enum=ShopType" json:"ShopType"` //商店类型 ShopType ShopType `protobuf:"varint,1,opt,name=ShopType,proto3,enum=ShopType" json:"ShopType"` //商店类型
GoodsId int32 `protobuf:"varint,2,opt,name=GoodsId,proto3" json:"GoodsId"` //商品Id GoodsId int32 `protobuf:"varint,2,opt,name=GoodsId,proto3" json:"GoodsId"` //商品Id
BuyNum int32 `protobuf:"varint,3,opt,name=BuyNum,proto3" json:"BuyNum"` //商品购买数量
} }
func (x *ShopBuyReq) Reset() { func (x *ShopBuyReq) Reset() {
@ -284,6 +285,13 @@ func (x *ShopBuyReq) GetGoodsId() int32 {
return 0 return 0
} }
func (x *ShopBuyReq) GetBuyNum() int32 {
if x != nil {
return x.BuyNum
}
return 0
}
//购买商品 回应 //购买商品 回应
type ShopBuyResp struct { type ShopBuyResp struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -365,15 +373,17 @@ var file_shop_shop_msg_proto_rawDesc = []byte{
0x52, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x53, 0x75, 0x72, 0x70, 0x6c, 0x52, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x53, 0x75, 0x72, 0x70, 0x6c,
0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01,
0x28, 0x05, 0x52, 0x11, 0x53, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x28, 0x05, 0x52, 0x11, 0x53, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65,
0x73, 0x68, 0x4e, 0x75, 0x6d, 0x22, 0x4d, 0x0a, 0x0a, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, 0x79, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x22, 0x65, 0x0a, 0x0a, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, 0x79,
0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65,
0x52, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f, 0x52, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f,
0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f,
0x64, 0x73, 0x49, 0x64, 0x22, 0x25, 0x0a, 0x0b, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, 0x79, 0x52, 0x64, 0x73, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x03,
0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x22, 0x25, 0x0a, 0x0b,
0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53,
0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
} }
var ( var (

View File

@ -2,7 +2,7 @@
// versions: // versions:
// protoc-gen-go v1.28.0 // protoc-gen-go v1.28.0
// protoc v3.20.0 // protoc v3.20.0
// source: userrecord.proto // source: hero/userrecord.proto
package pb package pb
@ -32,7 +32,7 @@ type Floor struct {
func (x *Floor) Reset() { func (x *Floor) Reset() {
*x = Floor{} *x = Floor{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_userrecord_proto_msgTypes[0] mi := &file_hero_userrecord_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -45,7 +45,7 @@ func (x *Floor) String() string {
func (*Floor) ProtoMessage() {} func (*Floor) ProtoMessage() {}
func (x *Floor) ProtoReflect() protoreflect.Message { func (x *Floor) ProtoReflect() protoreflect.Message {
mi := &file_userrecord_proto_msgTypes[0] mi := &file_hero_userrecord_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -58,7 +58,7 @@ func (x *Floor) ProtoReflect() protoreflect.Message {
// Deprecated: Use Floor.ProtoReflect.Descriptor instead. // Deprecated: Use Floor.ProtoReflect.Descriptor instead.
func (*Floor) Descriptor() ([]byte, []int) { func (*Floor) Descriptor() ([]byte, []int) {
return file_userrecord_proto_rawDescGZIP(), []int{0} return file_hero_userrecord_proto_rawDescGZIP(), []int{0}
} }
func (x *Floor) GetH4() int32 { func (x *Floor) GetH4() int32 {
@ -96,7 +96,7 @@ type DBUserRecord struct {
func (x *DBUserRecord) Reset() { func (x *DBUserRecord) Reset() {
*x = DBUserRecord{} *x = DBUserRecord{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_userrecord_proto_msgTypes[1] mi := &file_hero_userrecord_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -109,7 +109,7 @@ func (x *DBUserRecord) String() string {
func (*DBUserRecord) ProtoMessage() {} func (*DBUserRecord) ProtoMessage() {}
func (x *DBUserRecord) ProtoReflect() protoreflect.Message { func (x *DBUserRecord) ProtoReflect() protoreflect.Message {
mi := &file_userrecord_proto_msgTypes[1] mi := &file_hero_userrecord_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -122,7 +122,7 @@ func (x *DBUserRecord) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBUserRecord.ProtoReflect.Descriptor instead. // Deprecated: Use DBUserRecord.ProtoReflect.Descriptor instead.
func (*DBUserRecord) Descriptor() ([]byte, []int) { func (*DBUserRecord) Descriptor() ([]byte, []int) {
return file_userrecord_proto_rawDescGZIP(), []int{1} return file_hero_userrecord_proto_rawDescGZIP(), []int{1}
} }
func (x *DBUserRecord) GetId() string { func (x *DBUserRecord) GetId() string {
@ -195,52 +195,52 @@ func (x *DBUserRecord) GetMtime() int64 {
return 0 return 0
} }
var File_userrecord_proto protoreflect.FileDescriptor var File_hero_userrecord_proto protoreflect.FileDescriptor
var file_userrecord_proto_rawDesc = []byte{ var file_hero_userrecord_proto_rawDesc = []byte{
0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x0a, 0x15, 0x68, 0x65, 0x72, 0x6f, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x72, 0x65, 0x63, 0x6f, 0x72,
0x74, 0x6f, 0x22, 0x27, 0x0a, 0x05, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, 0x05, 0x46, 0x6c, 0x6f, 0x6f, 0x72,
0x34, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x68, 0x34, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x34, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x68, 0x34,
0x35, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x68, 0x35, 0x22, 0x9c, 0x02, 0x0a, 0x0c, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x35, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x68, 0x35,
0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x22, 0x9c, 0x02, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x0a, 0x05, 0x72, 0x61, 0x63, 0x65, 0x30, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x05, 0x72, 0x61, 0x63, 0x65, 0x30, 0x18, 0x03, 0x20, 0x01,
0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x05, 0x72, 0x61, 0x63, 0x65, 0x30, 0x12, 0x1c, 0x0a, 0x05, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x05, 0x72, 0x61, 0x63, 0x65,
0x72, 0x61, 0x63, 0x65, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x46, 0x6c, 0x30, 0x12, 0x1c, 0x0a, 0x05, 0x72, 0x61, 0x63, 0x65, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x6f, 0x6f, 0x72, 0x52, 0x05, 0x72, 0x61, 0x63, 0x65, 0x31, 0x12, 0x1c, 0x0a, 0x05, 0x72, 0x61, 0x32, 0x06, 0x2e, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x05, 0x72, 0x61, 0x63, 0x65, 0x31, 0x12,
0x63, 0x65, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x46, 0x6c, 0x6f, 0x6f, 0x1c, 0x0a, 0x05, 0x72, 0x61, 0x63, 0x65, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06,
0x72, 0x52, 0x05, 0x72, 0x61, 0x63, 0x65, 0x32, 0x12, 0x1c, 0x0a, 0x05, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x05, 0x72, 0x61, 0x63, 0x65, 0x32, 0x12, 0x1c, 0x0a,
0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x05, 0x72, 0x61, 0x63, 0x65, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x46,
0x05, 0x72, 0x61, 0x63, 0x65, 0x33, 0x12, 0x1c, 0x0a, 0x05, 0x72, 0x61, 0x63, 0x65, 0x34, 0x18, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x05, 0x72, 0x61, 0x63, 0x65, 0x33, 0x12, 0x1c, 0x0a, 0x05, 0x72,
0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x05, 0x72, 0x61, 0x63, 0x65, 0x34, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x46, 0x6c, 0x6f,
0x61, 0x63, 0x65, 0x34, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x52, 0x05, 0x72, 0x61, 0x63, 0x65, 0x34, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x72, 0x69,
0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x67, 0x67, 0x65, 0x72, 0x6e, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74,
0x72, 0x6e, 0x75, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x6e, 0x75, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x74,
0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x69, 0x76, 0x69, 0x74, 0x79, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61,
0x74, 0x79, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74, 0x69,
0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x42,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
file_userrecord_proto_rawDescOnce sync.Once file_hero_userrecord_proto_rawDescOnce sync.Once
file_userrecord_proto_rawDescData = file_userrecord_proto_rawDesc file_hero_userrecord_proto_rawDescData = file_hero_userrecord_proto_rawDesc
) )
func file_userrecord_proto_rawDescGZIP() []byte { func file_hero_userrecord_proto_rawDescGZIP() []byte {
file_userrecord_proto_rawDescOnce.Do(func() { file_hero_userrecord_proto_rawDescOnce.Do(func() {
file_userrecord_proto_rawDescData = protoimpl.X.CompressGZIP(file_userrecord_proto_rawDescData) file_hero_userrecord_proto_rawDescData = protoimpl.X.CompressGZIP(file_hero_userrecord_proto_rawDescData)
}) })
return file_userrecord_proto_rawDescData return file_hero_userrecord_proto_rawDescData
} }
var file_userrecord_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_hero_userrecord_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_userrecord_proto_goTypes = []interface{}{ var file_hero_userrecord_proto_goTypes = []interface{}{
(*Floor)(nil), // 0: Floor (*Floor)(nil), // 0: Floor
(*DBUserRecord)(nil), // 1: DBUserRecord (*DBUserRecord)(nil), // 1: DBUserRecord
} }
var file_userrecord_proto_depIdxs = []int32{ var file_hero_userrecord_proto_depIdxs = []int32{
0, // 0: DBUserRecord.race0:type_name -> Floor 0, // 0: DBUserRecord.race0:type_name -> Floor
0, // 1: DBUserRecord.race1:type_name -> Floor 0, // 1: DBUserRecord.race1:type_name -> Floor
0, // 2: DBUserRecord.race2:type_name -> Floor 0, // 2: DBUserRecord.race2:type_name -> Floor
@ -253,13 +253,13 @@ var file_userrecord_proto_depIdxs = []int32{
0, // [0:5] is the sub-list for field type_name 0, // [0:5] is the sub-list for field type_name
} }
func init() { file_userrecord_proto_init() } func init() { file_hero_userrecord_proto_init() }
func file_userrecord_proto_init() { func file_hero_userrecord_proto_init() {
if File_userrecord_proto != nil { if File_hero_userrecord_proto != nil {
return return
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_userrecord_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_hero_userrecord_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Floor); i { switch v := v.(*Floor); i {
case 0: case 0:
return &v.state return &v.state
@ -271,7 +271,7 @@ func file_userrecord_proto_init() {
return nil return nil
} }
} }
file_userrecord_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_hero_userrecord_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBUserRecord); i { switch v := v.(*DBUserRecord); i {
case 0: case 0:
return &v.state return &v.state
@ -288,18 +288,18 @@ func file_userrecord_proto_init() {
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_userrecord_proto_rawDesc, RawDescriptor: file_hero_userrecord_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 2, NumMessages: 2,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },
GoTypes: file_userrecord_proto_goTypes, GoTypes: file_hero_userrecord_proto_goTypes,
DependencyIndexes: file_userrecord_proto_depIdxs, DependencyIndexes: file_hero_userrecord_proto_depIdxs,
MessageInfos: file_userrecord_proto_msgTypes, MessageInfos: file_hero_userrecord_proto_msgTypes,
}.Build() }.Build()
File_userrecord_proto = out.File File_hero_userrecord_proto = out.File
file_userrecord_proto_rawDesc = nil file_hero_userrecord_proto_rawDesc = nil
file_userrecord_proto_goTypes = nil file_hero_userrecord_proto_goTypes = nil
file_userrecord_proto_depIdxs = nil file_hero_userrecord_proto_depIdxs = nil
} }