From 3ea012070bb2f0afa23e8e1aae2d72b295ae4aff Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 11 Jul 2023 17:28:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E9=98=9F=E8=AE=A1=E7=AE=97=E4=B8=8B?= =?UTF-8?q?=E4=B8=80=E5=91=A8=E6=9C=9F=20=E8=B4=A7=E7=89=A9=E7=9A=84?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/caravan/module.go | 164 ++++++++++++++++++++++++---------- modules/pagoda/api.go | 1 + modules/pagoda/api_getrace.go | 2 +- modules/sys/module.go | 2 +- pb/caravan_db.pb.go | 108 ++++++++++++---------- 5 files changed, 182 insertions(+), 95 deletions(-) diff --git a/modules/caravan/module.go b/modules/caravan/module.go index 0e5f3389c..c3bb6b46a 100644 --- a/modules/caravan/module.go +++ b/modules/caravan/module.go @@ -113,6 +113,21 @@ func (this *Caravan) InitCaravanItemData(uid string, data *pb.DBCaravan) { } data.Oldprice[v.Itemid] = v.Goodsprice } + // 初始化下一轮价格 + data.Next = make(map[string]*pb.Goods, 0) + for _, v := range items { + goods := &pb.Goods{ + Period: 0, // 变动周期 + CurPeriod: 2, // 当前变动周期 + Price: 0, // 当前价格 + } + if len(v.Changeperiod) == 2 { + goods.Period = data.Goods[v.Itemid].Period //comm.GetRandNum(v.Changeperiod[0], v.Changeperiod[1]) + goods.Price = v.Goodsprice + data.Next[v.Itemid] = goods + } + + } } // 初始化门票和虚拟币 @@ -132,12 +147,16 @@ func (this *Caravan) refreshCaravanCityInfo(uid string, caravan *pb.DBCaravan) { var ( bChange bool update map[string]interface{} - changeTime int32 + changeTime int32 // 商店刷新时间 + curTime int64 // 当前事件 ) + curTime = configure.Now().Unix() update = make(map[string]interface{}) - changeTime = this.configure.GetCityRefreshTime() // 180 - if int32(configure.Now().Unix()-caravan.Citystime) >= changeTime { + changeTime = this.configure.GetCityRefreshTime() // 3分钟 + subTime := int32(curTime - caravan.Citystime) + if subTime >= changeTime { bChange = true + for k, v := range caravan.City { if c, _ := this.configure.GetCaravanCity(k); c != nil { v.Count = make(map[string]int32) // 初始化城市信息 @@ -152,64 +171,70 @@ func (this *Caravan) refreshCaravanCityInfo(uid string, caravan *pb.DBCaravan) { } } } - subTime := configure.Now().Unix() - caravan.Citystime - icount := int32(subTime / int64(changeTime)) // 循环周期 + + icount := int32(subTime / changeTime) // 循环周期 caravan.Citystime += int64(changeTime * icount) - for k, v := range caravan.Goods { - if c, err := this.configure.GetCaravanGoods(k); err == nil { - caravan.Oldprice[k] = v.Price - if icount > 50 { //超过一定的周期 则不计算 - // 随机出新的变动周期 - v.Period = comm.GetRandNum(c.Changeperiod[0], c.Changeperiod[1]) - v.CurPeriod = 0 - } else { - for i := 0; i < int(icount); i++ { // 计算当前的价格 - // 价格涨跌权重 PriceChangeWeight - bUp := false // true 涨 - ipos := comm.GetRandW(c.PriceChangeWeight) - if ipos == 1 { - if comm.GetRandW(c.PriceChangeWeightOne) == 0 { - bUp = true + if subTime < changeTime*2 { // 是下一回合 直接 用next字段覆盖上一次刷新的数据 + caravan.Goods = caravan.Next // 下一次货物信息直接给上一次 + this.CaravanNext(caravan) // 计算下一周期的货物信息 + } else { + for k, v := range caravan.Goods { + if c, err := this.configure.GetCaravanGoods(k); err == nil { + caravan.Oldprice[k] = v.Price + if icount > 50 { //超过一定的周期 则不计算 + // 随机出新的变动周期 + v.Period = comm.GetRandNum(c.Changeperiod[0], c.Changeperiod[1]) + v.CurPeriod = 0 + } else { + for i := 0; i < int(icount); i++ { // 计算当前的价格 + // 价格涨跌权重 PriceChangeWeight + bUp := false // true 涨 + ipos := comm.GetRandW(c.PriceChangeWeight) + if ipos == 1 { + if comm.GetRandW(c.PriceChangeWeightOne) == 0 { + bUp = true + } + } else if ipos == 2 { + if comm.GetRandW(c.PriceChangeWeightTwo) == 0 { + bUp = true + } + } else if ipos == 3 { + if comm.GetRandW(c.PriceChangeWeightThree) == 0 { + bUp = true + } } - } else if ipos == 2 { - if comm.GetRandW(c.PriceChangeWeightTwo) == 0 { - bUp = true + + if bUp { // 价格上涨 + v.Price = int32(math.Floor(float64(v.Price) * (1.0 + float64(c.FluctuationRange)/1000.0))) + } else { + v.Price = int32(math.Floor(float64(v.Price) * (1.0 - float64(c.FluctuationRange)/1000.0))) } - } else if ipos == 3 { - if comm.GetRandW(c.PriceChangeWeightThree) == 0 { - bUp = true + + if v.Price < c.Pricemin { // 设置最小值 + v.Price = c.Pricemin } - } - if bUp { // 价格上涨 - v.Price = int32(math.Floor(float64(v.Price) * (1.0 + float64(c.FluctuationRange)/1000.0))) - } else { - v.Price = int32(math.Floor(float64(v.Price) * (1.0 - float64(c.FluctuationRange)/1000.0))) - } - - if v.Price < c.Pricemin { // 设置最小值 - v.Price = c.Pricemin - } - - if v.Price > c.Pricemax { // 设置最大值 - v.Price = c.Pricemax - } - v.CurPeriod += 1 // 更新周期+1 - if v.CurPeriod+icount > v.Period { - // 随机出新的变动周期 - v.Period = comm.GetRandNum(c.Changeperiod[0], c.Changeperiod[1]) - v.CurPeriod = 0 + if v.Price > c.Pricemax { // 设置最大值 + v.Price = c.Pricemax + } + v.CurPeriod += 1 // 更新周期+1 + if v.CurPeriod+icount > v.Period { + // 随机出新的变动周期 + v.Period = comm.GetRandNum(c.Changeperiod[0], c.Changeperiod[1]) + v.CurPeriod = 0 + } } } } } + this.CaravanNext(caravan) } } - if configure.Now().Unix() >= caravan.Resettime { + if curTime >= caravan.Resettime { sTime := int64(this.ModuleTools.GetGlobalConf().BusinessRewardday * 24 * 3600) // 单位s openTime := this.service.GetOpentime().Unix() // 获取开服时间 - subTime := configure.Now().Unix() - openTime - caravan.Resettime = configure.Now().Unix() - (subTime % sTime) + sTime + subTime := curTime - openTime + caravan.Resettime = curTime - (subTime % sTime) + sTime update["resettime"] = caravan.Resettime bChange = true } @@ -432,3 +457,46 @@ func (this *Caravan) Rpc_ModuleCaravanSettlement(ctx context.Context, args *pb.E return } + +func (this *Caravan) CaravanNext(caravan *pb.DBCaravan) { + for k, v := range caravan.Next { + if c, err := this.configure.GetCaravanGoods(k); err == nil { + // 价格涨跌权重 PriceChangeWeight + bUp := false // true 涨 + ipos := comm.GetRandW(c.PriceChangeWeight) + if ipos == 1 { + if comm.GetRandW(c.PriceChangeWeightOne) == 0 { + bUp = true + } + } else if ipos == 2 { + if comm.GetRandW(c.PriceChangeWeightTwo) == 0 { + bUp = true + } + } else if ipos == 3 { + if comm.GetRandW(c.PriceChangeWeightThree) == 0 { + bUp = true + } + } + + if bUp { // 价格上涨 + v.Price = int32(math.Floor(float64(v.Price) * (1.0 + float64(c.FluctuationRange)/1000.0))) + } else { + v.Price = int32(math.Floor(float64(v.Price) * (1.0 - float64(c.FluctuationRange)/1000.0))) + } + + if v.Price < c.Pricemin { // 设置最小值 + v.Price = c.Pricemin + } + + if v.Price > c.Pricemax { // 设置最大值 + v.Price = c.Pricemax + } + v.CurPeriod += 1 // 更新周期+1 + if v.CurPeriod+1 > v.Period { + // 随机出新的变动周期 + v.Period = comm.GetRandNum(c.Changeperiod[0], c.Changeperiod[1]) + v.CurPeriod = 0 + } + } + } +} diff --git a/modules/pagoda/api.go b/modules/pagoda/api.go index b5528a804..f176e0cbf 100644 --- a/modules/pagoda/api.go +++ b/modules/pagoda/api.go @@ -17,6 +17,7 @@ const ( PagodaWarOrderResp = "warorder" PagodaChallengeRaceResp = "challengerace" PagodaChallengeRaceOverResp = "challengeoverrace" + PagodaGetRaceResp = "getrace" ) type apiComp struct { diff --git a/modules/pagoda/api_getrace.go b/modules/pagoda/api_getrace.go index 68c65d46d..0a2010efb 100644 --- a/modules/pagoda/api_getrace.go +++ b/modules/pagoda/api_getrace.go @@ -60,6 +60,6 @@ func (this *apiComp) GetRace(session comm.IUserSession, req *pb.PagodaGetRaceReq errdata = this.module.ModifyPagodaData(session.GetUserId(), mapData) } - session.SendMsg(string(this.module.GetType()), PagodaGetListResp, &pb.PagodaGetRaceResp{Race: list.Race}) + session.SendMsg(string(this.module.GetType()), PagodaGetRaceResp, &pb.PagodaGetRaceResp{Race: list.Race}) return } diff --git a/modules/sys/module.go b/modules/sys/module.go index d539bd688..d1599a1bb 100644 --- a/modules/sys/module.go +++ b/modules/sys/module.go @@ -45,7 +45,7 @@ func (this *ModuleSys) Init(service core.IService, module core.IModule, options func (this *ModuleSys) Start() (err error) { err = this.ModuleBase.Start() var module core.IModule - if module, err = this.service.GetModule(comm.ModuleSys); err != nil { + if module, err = this.service.GetModule(comm.ModuleWtask); err != nil { return } this.wtask = module.(comm.IWtask) diff --git a/pb/caravan_db.pb.go b/pb/caravan_db.pb.go index d8a04e599..d15b2c1e2 100644 --- a/pb/caravan_db.pb.go +++ b/pb/caravan_db.pb.go @@ -214,6 +214,7 @@ type DBCaravan struct { Baglimit int32 `protobuf:"varint,14,opt,name=baglimit,proto3" json:"baglimit"` // 背包上限 Citystime int64 `protobuf:"varint,15,opt,name=citystime,proto3" json:"citystime"` // 城市刷新时间 玩家身上的货物同时刷新 Oldprice map[string]int32 `protobuf:"bytes,16,rep,name=oldprice,proto3" json:"oldprice" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 上一次价格 key 货物ID + Next map[string]*Goods `protobuf:"bytes,17,rep,name=next,proto3" json:"next" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 下一次刷新的数据 } func (x *DBCaravan) Reset() { @@ -360,6 +361,13 @@ func (x *DBCaravan) GetOldprice() map[string]int32 { return nil } +func (x *DBCaravan) GetNext() map[string]*Goods { + if x != nil { + return x.Next + } + return nil +} + type CaravanRankInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -477,7 +485,7 @@ var file_caravan_caravan_db_proto_rawDesc = []byte{ 0x42, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x22, 0xf2, 0x05, 0x0a, 0x09, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, + 0x69, 0x63, 0x65, 0x22, 0xdd, 0x06, 0x0a, 0x09, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 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, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, @@ -508,36 +516,43 @@ var file_caravan_caravan_db_proto_rawDesc = []byte{ 0x6c, 0x64, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x4f, 0x6c, 0x64, 0x70, 0x72, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x1a, 0x42, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x65, 0x12, 0x28, 0x0a, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x4e, 0x65, 0x78, 0x74, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x1a, 0x42, 0x0a, 0x0a, 0x49, + 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x67, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x40, 0x0a, 0x0a, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, + 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x42, 0x0a, 0x09, 0x43, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x09, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x4f, 0x6c, 0x64, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x09, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x1e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x08, 0x2e, 0x42, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x0a, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x09, 0x43, 0x69, 0x74, 0x79, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x4f, - 0x6c, 0x64, 0x70, 0x72, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbf, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x72, - 0x61, 0x76, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x76, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, - 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, - 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, - 0x6e, 0x74, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, - 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, - 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x09, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x4c, 0x76, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x06, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0xbf, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, + 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x6c, 0x76, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, + 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, + 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x6d, 0x6f, 0x6e, + 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, + 0x6e, 0x74, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x61, 0x76, + 0x61, 0x6e, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x61, 0x72, 0x61, + 0x76, 0x61, 0x6e, 0x4c, 0x76, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -552,7 +567,7 @@ func file_caravan_caravan_db_proto_rawDescGZIP() []byte { return file_caravan_caravan_db_proto_rawDescData } -var file_caravan_caravan_db_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_caravan_caravan_db_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_caravan_caravan_db_proto_goTypes = []interface{}{ (*Goods)(nil), // 0: Goods (*CityInfo)(nil), // 1: CityInfo @@ -564,21 +579,24 @@ var file_caravan_caravan_db_proto_goTypes = []interface{}{ nil, // 7: DBCaravan.GoodsEntry nil, // 8: DBCaravan.CityEntry nil, // 9: DBCaravan.OldpriceEntry + nil, // 10: DBCaravan.NextEntry } var file_caravan_caravan_db_proto_depIdxs = []int32{ - 5, // 0: CityInfo.count:type_name -> CityInfo.CountEntry - 6, // 1: DBCaravan.items:type_name -> DBCaravan.ItemsEntry - 7, // 2: DBCaravan.goods:type_name -> DBCaravan.GoodsEntry - 8, // 3: DBCaravan.city:type_name -> DBCaravan.CityEntry - 9, // 4: DBCaravan.oldprice:type_name -> DBCaravan.OldpriceEntry - 2, // 5: DBCaravan.ItemsEntry.value:type_name -> BagInfo - 0, // 6: DBCaravan.GoodsEntry.value:type_name -> Goods - 1, // 7: DBCaravan.CityEntry.value:type_name -> CityInfo - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 5, // 0: CityInfo.count:type_name -> CityInfo.CountEntry + 6, // 1: DBCaravan.items:type_name -> DBCaravan.ItemsEntry + 7, // 2: DBCaravan.goods:type_name -> DBCaravan.GoodsEntry + 8, // 3: DBCaravan.city:type_name -> DBCaravan.CityEntry + 9, // 4: DBCaravan.oldprice:type_name -> DBCaravan.OldpriceEntry + 10, // 5: DBCaravan.next:type_name -> DBCaravan.NextEntry + 2, // 6: DBCaravan.ItemsEntry.value:type_name -> BagInfo + 0, // 7: DBCaravan.GoodsEntry.value:type_name -> Goods + 1, // 8: DBCaravan.CityEntry.value:type_name -> CityInfo + 0, // 9: DBCaravan.NextEntry.value:type_name -> Goods + 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 } func init() { file_caravan_caravan_db_proto_init() } @@ -654,7 +672,7 @@ func file_caravan_caravan_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_caravan_caravan_db_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 0, },