This commit is contained in:
liwei 2023-07-11 18:40:31 +08:00
commit f778c6829b
7 changed files with 238 additions and 144 deletions

View File

@ -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
}
}
}
}

View File

@ -16,7 +16,8 @@ const (
PagodaActivateResp = "activate"
PagodaWarOrderResp = "warorder"
PagodaChallengeRaceResp = "challengerace"
PagodaChallengeRaceOverResp = "challengeoverrace"
PagodaChallengeRaceOverResp = "challengeraceover"
PagodaGetRaceResp = "getrace"
)
type apiComp struct {

View File

@ -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
}

View File

@ -7,7 +7,7 @@ import (
)
//参数校验
func (this *apiComp) CallengeRaceCheck(session comm.IUserSession, req *pb.PagodaChallengeRaceReq) (errdata *pb.ErrorData) {
func (this *apiComp) ChallengeRaceCheck(session comm.IUserSession, req *pb.PagodaChallengeRaceReq) (errdata *pb.ErrorData) {
if req.Cid <= 0 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
@ -19,13 +19,13 @@ func (this *apiComp) CallengeRaceCheck(session comm.IUserSession, req *pb.Pagoda
}
///阵营塔开始挑战
func (this *apiComp) CallengeRace(session comm.IUserSession, req *pb.PagodaChallengeRaceReq) (errdata *pb.ErrorData) {
func (this *apiComp) ChallengeRace(session comm.IUserSession, req *pb.PagodaChallengeRaceReq) (errdata *pb.ErrorData) {
var (
pagoda *pb.DBPagodaRace
err error
timeCheckOk bool
pagoda *pb.DBPagodaRace
err error
//timeCheckOk bool
)
if errdata = this.CallengeRaceCheck(session, req); errdata != nil {
if errdata = this.ChallengeRaceCheck(session, req); errdata != nil {
return // 参数校验失败直接返回
}
@ -40,23 +40,23 @@ func (this *apiComp) CallengeRace(session comm.IUserSession, req *pb.PagodaChall
}
// 判断开启时间
curWeekDay := int32(configure.Now().Weekday())
if curWeekDay == 0 {
curWeekDay = 7
}
for _, v := range conf.Openingtime {
if v == curWeekDay {
timeCheckOk = true
break
}
}
if !timeCheckOk {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaTimeError,
Title: pb.ErrorCode_PagodaTimeError.ToString(),
}
return
}
// curWeekDay := int32(configure.Now().Weekday())
// if curWeekDay == 0 {
// curWeekDay = 7
// }
// for _, v := range conf.Openingtime {
// if v == curWeekDay {
// timeCheckOk = true
// break
// }
// }
// if !timeCheckOk {
// errdata = &pb.ErrorData{
// Code: pb.ErrorCode_PagodaTimeError,
// Title: pb.ErrorCode_PagodaTimeError.ToString(),
// }
// return
// }
pagoda, err = this.module.modelRacePagoda.getPagodaRaceList(session.GetUserId())
if err != nil {
errdata = &pb.ErrorData{

View File

@ -21,12 +21,12 @@ func (this *apiComp) ChallengeRaceOverCheck(session comm.IUserSession, req *pb.P
// /挑战主线关卡
func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.PagodaChallengeRaceOverReq) (errdata *pb.ErrorData) {
var (
mapData map[string]interface{}
race *pb.DBPagodaRace
isWin bool
err error
atno []*pb.UserAtno // 通关奖励
timeCheckOk bool // 开启条件校验
mapData map[string]interface{}
race *pb.DBPagodaRace
isWin bool
err error
atno []*pb.UserAtno // 通关奖励
//timeCheckOk bool // 开启条件校验
)
mapData = make(map[string]interface{}, 0)
if errdata = this.ChallengeRaceOverCheck(session, req); errdata != nil {
@ -44,23 +44,23 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda
}
// 判断开启时间
curWeekDay := int32(configure.Now().Weekday())
if curWeekDay == 0 {
curWeekDay = 7
}
for _, v := range conf.Openingtime {
if v == curWeekDay {
timeCheckOk = true
break
}
}
if !timeCheckOk {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaTimeError,
Title: pb.ErrorCode_PagodaTimeError.ToString(),
}
return
}
// curWeekDay := int32(configure.Now().Weekday())
// if curWeekDay == 0 {
// curWeekDay = 7
// }
// for _, v := range conf.Openingtime {
// if v == curWeekDay {
// timeCheckOk = true
// break
// }
// }
// if !timeCheckOk {
// errdata = &pb.ErrorData{
// Code: pb.ErrorCode_PagodaTimeError,
// Title: pb.ErrorCode_PagodaTimeError.ToString(),
// }
// return
// }
race, err = this.module.modelRacePagoda.getPagodaRaceList(session.GetUserId())
if err != nil {
@ -127,16 +127,23 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda
}
race.Race[conf.Restriction].Curfloor += 1
race.Race[conf.Restriction].Defeat += 1
race.Race[conf.Restriction].Task = conf.Fightevents
mapData["race"] = race.Race
errdata = this.module.ModifyPagodaData(session.GetUserId(), mapData)
if err = this.module.modelRacePagoda.ModifyPagodaRaceDataByObjId(session.GetUserId(), mapData); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
}
// 通关奖励
if errdata, atno = this.module.DispenseAtno(session, conf.Reward, true); errdata != nil {
return
}
session.SendMsg(string(this.module.GetType()), PagodaChallengeRaceOverResp, &pb.PagodaChallengeRaceOverResp{
Race: race.Race[0],
Race: race.Race[conf.Restriction],
Reward: atno,
})

View File

@ -46,7 +46,7 @@ func (this *ModelRace) getPagodaRaceList(uid string) (result *pb.DBPagodaRace, e
}
// 修改爬塔数据信息
func (this *ModelRace) modifyPagodaRaceDataByObjId(uid string, data map[string]interface{}) error {
func (this *ModelRace) ModifyPagodaRaceDataByObjId(uid string, data map[string]interface{}) error {
return this.Change(uid, data)
}

View File

@ -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,
},