上传商店代码

This commit is contained in:
liwei1dao 2023-08-25 19:02:00 +08:00
parent dd93a8956b
commit e726b2f7b7
4 changed files with 273 additions and 174 deletions

View File

@ -23,18 +23,15 @@ func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ShopBuyReq) (er
// /获取用户商品列表
func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata *pb.ErrorData) {
var (
err error
conf *cfg.GameShopitemData
shopData *pb.DBShop
good *pb.UserShopGood
filed string
record *pb.UserShopData
need []*cfg.Gameatn
give []*cfg.Gameatn
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
equi *pb.DB_Equipment
equiconf *cfg.GameEquipData
equibuyconf *cfg.GameShopBuyequiCosData
err error
conf *cfg.GameShopitemData
shopData *pb.DBShop
good *pb.UserShopGood
filed string
record *pb.UserShopData
need []*cfg.Gameatn
give []*cfg.Gameatn
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
)
if errdata = this.BuyCheck(session, req); errdata != nil {
return
@ -144,43 +141,17 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata
return
}
good.Buy += req.BuyNum
if !conf.Preview {
if errdata = this.module.ConsumeRes(session, need, true); errdata != nil {
return
}
} else { //装备价格采用计算价格
equi = record.Preview[req.Gid]
if equiconf, err = this.module.configure.getGameEquipData(equi.CId); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
lv := int32(0)
if equi.AdverbEntry != nil {
lv = int32(len(equi.AdverbEntry))
}
if equibuyconf, err = this.module.configure.getShopBuyequiCosData(equiconf.InitLv, lv); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
if errdata = this.module.ConsumeRes(session, equibuyconf.Suittype, true); errdata != nil {
return
}
if errdata = this.module.ConsumeRes(session, need, true); errdata != nil {
return
}
this.module.modelShop.Change(session.GetUserId(), map[string]interface{}{filed: record})
if !conf.Preview {
if errdata = this.module.DispenseRes(session, give, true); errdata != nil {
return
}
} else {
if errdata = this.module.equip.AddEquipment(session, record.Preview[req.Gid]); errdata != nil {
if errdata = this.module.equip.AddEquipment(session, record.Preview[req.Gid].Equipment); errdata != nil {
return
}
}

View File

@ -23,18 +23,20 @@ func (this *apiComp) GetlistCheck(session comm.IUserSession, req *pb.ShopGetList
// /获取用户商品列表
func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq) (errdata *pb.ErrorData) {
var (
err error
filed string
refresh int32
shopconf *cfg.GameShopData
shopData *pb.DBShop
udata *pb.DBUser
sdata *pb.UserShopData
items []*cfg.GameShopitemData
goods []*pb.ShopItem
tdata time.Duration
ltime time.Duration
leftrefnum int32
err error
filed string
refresh int32
shopconf *cfg.GameShopData
shopData *pb.DBShop
udata *pb.DBUser
sdata *pb.UserShopData
items []*cfg.GameShopitemData
goods []*pb.ShopItem
tdata time.Duration
ltime time.Duration
equiconf *cfg.GameEquipData
equibuyconf *cfg.GameShopBuyequiCosData
leftrefnum int32
)
if errdata = this.GetlistCheck(session, req); errdata != nil {
return
@ -126,7 +128,6 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
ltime = 30 * 7 * 24 * time.Hour * time.Duration(shopconf.Rtime)
break
}
if req.IsManualRefresh && shopconf.Rnum > 0 { //可以手动刷新
isrefresh := false
if refresh > 0 { //
@ -173,7 +174,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
sdata.ManualRefreshNum++
sdata.Leftfreerefreshnum = refresh - shopData.RefreshnumgoldShop
sdata.Items = make([]*pb.UserShopGood, len(items))
sdata.Preview = make(map[int32]*pb.DB_Equipment)
sdata.Preview = make(map[int32]*pb.UserShopDataEx)
for i, v := range items {
id := v.Key*100 + int32(i)
sdata.Items[i] = &pb.UserShopGood{
@ -182,9 +183,38 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
Buy: 0,
}
if v.Preview { //是否预览
if errdata, sdata.Preview[id] = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil {
sdata.Preview[id] = &pb.UserShopDataEx{}
if errdata, sdata.Preview[id].Equipment = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil {
return
}
if equiconf, err = this.module.configure.getGameEquipData(v.Iteminfo[0].T); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
lv := int32(0)
if sdata.Preview[id].Equipment.AdverbEntry != nil {
lv = int32(len(sdata.Preview[id].Equipment.AdverbEntry))
}
if equibuyconf, err = this.module.configure.getShopBuyequiCosData(equiconf.InitLv, lv); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
for _, v1 := range equibuyconf.Suittype {
sdata.Preview[id].Need = append(sdata.Preview[id].Need, &pb.UserAssets{
A: v1.A,
T: v1.T,
N: v1.N,
})
}
}
}
goods = transGoods(items, sdata)
@ -223,7 +253,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
}
sdata.LastRefreshTime = configure.Now().Unix()
sdata.Items = make([]*pb.UserShopGood, len(items))
sdata.Preview = make(map[int32]*pb.DB_Equipment)
sdata.Preview = make(map[int32]*pb.UserShopDataEx)
for i, v := range items {
id := v.Key*100 + int32(i)
sdata.Items[i] = &pb.UserShopGood{
@ -232,9 +262,38 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
Buy: 0,
}
if v.Preview { //是否预览
if errdata, sdata.Preview[id] = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil {
sdata.Preview[id] = &pb.UserShopDataEx{}
if errdata, sdata.Preview[id].Equipment = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil {
return
}
if equiconf, err = this.module.configure.getGameEquipData(v.Iteminfo[0].T); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
lv := int32(0)
if sdata.Preview[id].Equipment.AdverbEntry != nil {
lv = int32(len(sdata.Preview[id].Equipment.AdverbEntry))
}
if equibuyconf, err = this.module.configure.getShopBuyequiCosData(equiconf.InitLv, lv); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
for _, v1 := range equibuyconf.Suittype {
sdata.Preview[id].Need = append(sdata.Preview[id].Need, &pb.UserAssets{
A: v1.A,
T: v1.T,
N: v1.N,
})
}
}
}
goods = transGoods(items, sdata)
@ -255,20 +314,6 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
}
return
}
// sdata.Preview = make(map[int32]*pb.DB_Equipment)
// for i, v := range items {
// id := v.Key*100 + int32(i)
// sdata.Items[i] = &pb.UserShopGood{
// Id: id,
// Gid: v.Key,
// Buy: 0,
// }
// if v.Preview { //是否预览
// if errdata, sdata.Preview[id] = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil {
// return
// }
// }
// }
goods = transGoods(items, sdata)
}
} else {

View File

@ -49,15 +49,19 @@ func transGoods(goods []*cfg.GameShopitemData, sdata *pb.UserShopData) (result [
N: v1.N,
}
}
result[i].Consume = make([]*pb.UserAssets, len(v.Need))
for i1, v1 := range v.Need {
result[i].Consume[i1] = &pb.UserAssets{
A: v1.A,
T: v1.T,
N: int32(math.Ceil(float64(v1.N) * float64(v.Sale) / float64(1000))),
if sdata.Preview[id] == nil {
result[i].Consume = make([]*pb.UserAssets, len(v.Need))
for i1, v1 := range v.Need {
result[i].Consume[i1] = &pb.UserAssets{
A: v1.A,
T: v1.T,
N: int32(math.Ceil(float64(v1.N) * float64(v.Sale) / float64(1000))),
}
}
} else {
result[i].Consume = sdata.Preview[id].Need
}
result[i].Preview = sdata.Preview[id]
result[i].Preview = sdata.Preview[id].Equipment
}
return
}

View File

@ -152,11 +152,11 @@ type UserShopData struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
LastRefreshTime int64 `protobuf:"varint,1,opt,name=LastRefreshTime,proto3" json:"LastRefreshTime"` //最后一次刷新时间
ManualRefreshNum int32 `protobuf:"varint,2,opt,name=ManualRefreshNum,proto3" json:"ManualRefreshNum"` //手动刷新次数
Items []*UserShopGood `protobuf:"bytes,3,rep,name=Items,proto3" json:"Items"` //商品列表
Preview map[int32]*DB_Equipment `protobuf:"bytes,5,rep,name=preview,proto3" json:"preview" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //预览数据
Leftfreerefreshnum int32 `protobuf:"varint,6,opt,name=leftfreerefreshnum,proto3" json:"leftfreerefreshnum"` //剩余免费刷新次数
LastRefreshTime int64 `protobuf:"varint,1,opt,name=LastRefreshTime,proto3" json:"LastRefreshTime"` //最后一次刷新时间
ManualRefreshNum int32 `protobuf:"varint,2,opt,name=ManualRefreshNum,proto3" json:"ManualRefreshNum"` //手动刷新次数
Items []*UserShopGood `protobuf:"bytes,3,rep,name=Items,proto3" json:"Items"` //商品列表
Preview map[int32]*UserShopDataEx `protobuf:"bytes,5,rep,name=preview,proto3" json:"preview" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //预览数据
Leftfreerefreshnum int32 `protobuf:"varint,6,opt,name=leftfreerefreshnum,proto3" json:"leftfreerefreshnum"` //剩余免费刷新次数
}
func (x *UserShopData) Reset() {
@ -212,7 +212,7 @@ func (x *UserShopData) GetItems() []*UserShopGood {
return nil
}
func (x *UserShopData) GetPreview() map[int32]*DB_Equipment {
func (x *UserShopData) GetPreview() map[int32]*UserShopDataEx {
if x != nil {
return x.Preview
}
@ -226,6 +226,61 @@ func (x *UserShopData) GetLeftfreerefreshnum() int32 {
return 0
}
type UserShopDataEx struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Equipment *DB_Equipment `protobuf:"bytes,1,opt,name=equipment,proto3" json:"equipment"` //装备
Need []*UserAssets `protobuf:"bytes,2,rep,name=Need,proto3" json:"Need"` //消耗
}
func (x *UserShopDataEx) Reset() {
*x = UserShopDataEx{}
if protoimpl.UnsafeEnabled {
mi := &file_shop_shop_db_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserShopDataEx) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserShopDataEx) ProtoMessage() {}
func (x *UserShopDataEx) ProtoReflect() protoreflect.Message {
mi := &file_shop_shop_db_proto_msgTypes[2]
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 UserShopDataEx.ProtoReflect.Descriptor instead.
func (*UserShopDataEx) Descriptor() ([]byte, []int) {
return file_shop_shop_db_proto_rawDescGZIP(), []int{2}
}
func (x *UserShopDataEx) GetEquipment() *DB_Equipment {
if x != nil {
return x.Equipment
}
return nil
}
func (x *UserShopDataEx) GetNeed() []*UserAssets {
if x != nil {
return x.Need
}
return nil
}
type DBShop struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -247,7 +302,7 @@ type DBShop struct {
func (x *DBShop) Reset() {
*x = DBShop{}
if protoimpl.UnsafeEnabled {
mi := &file_shop_shop_db_proto_msgTypes[2]
mi := &file_shop_shop_db_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -260,7 +315,7 @@ func (x *DBShop) String() string {
func (*DBShop) ProtoMessage() {}
func (x *DBShop) ProtoReflect() protoreflect.Message {
mi := &file_shop_shop_db_proto_msgTypes[2]
mi := &file_shop_shop_db_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -273,7 +328,7 @@ func (x *DBShop) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBShop.ProtoReflect.Descriptor instead.
func (*DBShop) Descriptor() ([]byte, []int) {
return file_shop_shop_db_proto_rawDescGZIP(), []int{2}
return file_shop_shop_db_proto_rawDescGZIP(), []int{3}
}
func (x *DBShop) GetId() string {
@ -357,70 +412,77 @@ var File_shop_shop_db_proto protoreflect.FileDescriptor
var file_shop_shop_db_proto_rawDesc = []byte{
0x0a, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x64, 0x62, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2f,
0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x42, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x6f,
0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x03, 0x62, 0x75, 0x79, 0x22, 0xba, 0x02, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53,
0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x0f, 0x4c, 0x61, 0x73, 0x74, 0x52,
0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0f, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x2a, 0x0a, 0x10, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65,
0x73, 0x68, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x4d, 0x61, 0x6e,
0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x23, 0x0a,
0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x6f, 0x6f, 0x64, 0x52, 0x05, 0x49, 0x74, 0x65,
0x6d, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61,
0x74, 0x61, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x2e, 0x0a, 0x12, 0x6c, 0x65, 0x66, 0x74,
0x66, 0x72, 0x65, 0x65, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x18, 0x06,
0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x6c, 0x65, 0x66, 0x74, 0x66, 0x72, 0x65, 0x65, 0x72, 0x65,
0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x1a, 0x49, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x76,
0x69, 0x65, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45,
0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x02, 0x38, 0x01, 0x22, 0xc7, 0x03, 0x0a, 0x06, 0x44, 0x42, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
0x12, 0x2e, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x67, 0x6f,
0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x72, 0x65,
0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70,
0x12, 0x30, 0x0a, 0x13, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x67,
0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x72,
0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68,
0x6f, 0x70, 0x12, 0x29, 0x0a, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x05,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x1c, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x71, 0x75, 0x69,
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x42,
0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x6f, 0x6f, 0x64, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x67, 0x69, 0x64,
0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x62,
0x75, 0x79, 0x22, 0xbc, 0x02, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44,
0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x0f, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65,
0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x4c, 0x61,
0x73, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a,
0x10, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75,
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52,
0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x23, 0x0a, 0x05, 0x49, 0x74, 0x65,
0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53,
0x68, 0x6f, 0x70, 0x47, 0x6f, 0x6f, 0x64, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x34,
0x0a, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1a, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50,
0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x72, 0x65,
0x76, 0x69, 0x65, 0x77, 0x12, 0x2e, 0x0a, 0x12, 0x6c, 0x65, 0x66, 0x74, 0x66, 0x72, 0x65, 0x65,
0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05,
0x52, 0x12, 0x6c, 0x65, 0x66, 0x74, 0x66, 0x72, 0x65, 0x65, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73,
0x68, 0x6e, 0x75, 0x6d, 0x1a, 0x4b, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70,
0x44, 0x61, 0x74, 0x61, 0x45, 0x78, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x22, 0x5e, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74,
0x61, 0x45, 0x78, 0x12, 0x2b, 0x0a, 0x09, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x75, 0x69,
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74,
0x12, 0x1f, 0x0a, 0x04, 0x4e, 0x65, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b,
0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x04, 0x4e, 0x65, 0x65,
0x64, 0x22, 0xc7, 0x03, 0x0a, 0x06, 0x44, 0x42, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03,
0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2e,
0x0a, 0x12, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x67, 0x6f, 0x6c, 0x64,
0x53, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x72, 0x65, 0x66, 0x72,
0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x30,
0x0a, 0x13, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x67, 0x6f, 0x6c,
0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x72, 0x65, 0x66,
0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70,
0x12, 0x29, 0x0a, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74,
0x61, 0x52, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2f, 0x0a, 0x0b, 0x64,
0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52,
0x0b, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07,
0x70, 0x76, 0x70, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x70, 0x76,
0x70, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f, 0x70,
0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f,
0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x31,
0x0a, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x09,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44,
0x61, 0x74, 0x61, 0x52, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2f, 0x0a,
0x0b, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x06, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74,
0x61, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27,
0x0a, 0x07, 0x70, 0x76, 0x70, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07,
0x70, 0x76, 0x70, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68,
0x6f, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53,
0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f, 0x70,
0x12, 0x31, 0x0a, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70,
0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f,
0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53,
0x68, 0x6f, 0x70, 0x12, 0x29, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70,
0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2d,
0x0a, 0x0a, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x0b, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74,
0x61, 0x52, 0x0a, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x2a, 0x7d, 0x0a,
0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x75, 0x6c,
0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x10,
0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70,
0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x56, 0x50, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x03, 0x12,
0x0b, 0x0a, 0x07, 0x50, 0x56, 0x45, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c,
0x41, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x05, 0x12, 0x0c,
0x0a, 0x08, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a,
0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x07, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x61, 0x74, 0x61, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f,
0x70, 0x12, 0x29, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61,
0x74, 0x61, 0x52, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2d, 0x0a, 0x0a,
0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52,
0x0a, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x2a, 0x7d, 0x0a, 0x08, 0x53,
0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x10,
0x00, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x01, 0x12,
0x0f, 0x0a, 0x0b, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x02,
0x12, 0x0b, 0x0a, 0x07, 0x50, 0x56, 0x50, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x03, 0x12, 0x0b, 0x0a,
0x07, 0x50, 0x56, 0x45, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x6c,
0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08,
0x48, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x6d,
0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x07, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -436,31 +498,35 @@ func file_shop_shop_db_proto_rawDescGZIP() []byte {
}
var file_shop_shop_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_shop_shop_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_shop_shop_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_shop_shop_db_proto_goTypes = []interface{}{
(ShopType)(0), // 0: ShopType
(*UserShopGood)(nil), // 1: UserShopGood
(*UserShopData)(nil), // 2: UserShopData
(*DBShop)(nil), // 3: DBShop
nil, // 4: UserShopData.PreviewEntry
(*DB_Equipment)(nil), // 5: DB_Equipment
(ShopType)(0), // 0: ShopType
(*UserShopGood)(nil), // 1: UserShopGood
(*UserShopData)(nil), // 2: UserShopData
(*UserShopDataEx)(nil), // 3: UserShopDataEx
(*DBShop)(nil), // 4: DBShop
nil, // 5: UserShopData.PreviewEntry
(*DB_Equipment)(nil), // 6: DB_Equipment
(*UserAssets)(nil), // 7: UserAssets
}
var file_shop_shop_db_proto_depIdxs = []int32{
1, // 0: UserShopData.Items:type_name -> UserShopGood
4, // 1: UserShopData.preview:type_name -> UserShopData.PreviewEntry
2, // 2: DBShop.goldShop:type_name -> UserShopData
2, // 3: DBShop.diamondShop:type_name -> UserShopData
2, // 4: DBShop.pvpShop:type_name -> UserShopData
2, // 5: DBShop.pveShop:type_name -> UserShopData
2, // 6: DBShop.allianceShop:type_name -> UserShopData
2, // 7: DBShop.heroShop:type_name -> UserShopData
2, // 8: DBShop.smithyShop:type_name -> UserShopData
5, // 9: UserShopData.PreviewEntry.value:type_name -> DB_Equipment
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
10, // [10:10] is the sub-list for extension extendee
0, // [0:10] is the sub-list for field type_name
5, // 1: UserShopData.preview:type_name -> UserShopData.PreviewEntry
6, // 2: UserShopDataEx.equipment:type_name -> DB_Equipment
7, // 3: UserShopDataEx.Need:type_name -> UserAssets
2, // 4: DBShop.goldShop:type_name -> UserShopData
2, // 5: DBShop.diamondShop:type_name -> UserShopData
2, // 6: DBShop.pvpShop:type_name -> UserShopData
2, // 7: DBShop.pveShop:type_name -> UserShopData
2, // 8: DBShop.allianceShop:type_name -> UserShopData
2, // 9: DBShop.heroShop:type_name -> UserShopData
2, // 10: DBShop.smithyShop:type_name -> UserShopData
3, // 11: UserShopData.PreviewEntry.value:type_name -> UserShopDataEx
12, // [12:12] is the sub-list for method output_type
12, // [12:12] is the sub-list for method input_type
12, // [12:12] is the sub-list for extension type_name
12, // [12:12] is the sub-list for extension extendee
0, // [0:12] is the sub-list for field type_name
}
func init() { file_shop_shop_db_proto_init() }
@ -468,6 +534,7 @@ func file_shop_shop_db_proto_init() {
if File_shop_shop_db_proto != nil {
return
}
file_comm_proto_init()
file_equipment_equipment_db_proto_init()
if !protoimpl.UnsafeEnabled {
file_shop_shop_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
@ -495,6 +562,18 @@ func file_shop_shop_db_proto_init() {
}
}
file_shop_shop_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserShopDataEx); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_shop_shop_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBShop); i {
case 0:
return &v.state
@ -513,7 +592,7 @@ func file_shop_shop_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_shop_shop_db_proto_rawDesc,
NumEnums: 1,
NumMessages: 4,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},