物品刷新
This commit is contained in:
parent
e08cec7a65
commit
a01629af75
54
modules/caravan/api_gotocity.go
Normal file
54
modules/caravan/api_gotocity.go
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
package caravan
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) GotoCityCheck(session comm.IUserSession, req *pb.CaravanGotoCityReq) (code pb.ErrorCode) {
|
||||||
|
if req.City == 0 || req.Ticket <= 0 {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *apiComp) GotoCity(session comm.IUserSession, req *pb.CaravanGotoCityReq) (code pb.ErrorCode, data *pb.ErrorData) {
|
||||||
|
var (
|
||||||
|
resp *pb.CaravanGetListResp
|
||||||
|
res *cfg.Gameatn
|
||||||
|
)
|
||||||
|
if code = this.GotoCityCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
|
return // 参数校验失败直接返回
|
||||||
|
}
|
||||||
|
list, err := this.module.api.module.modelCaravan.getCaravanList(session.GetUserId())
|
||||||
|
if err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if list.Curcity == req.City {
|
||||||
|
code = pb.ErrorCode_TrollCity
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 校验门票
|
||||||
|
if d := this.module.configure.GetCaravanLv(list.Lv); d != nil {
|
||||||
|
//d.Tickettop
|
||||||
|
res = &cfg.Gameatn{
|
||||||
|
A: d.Tickettop.A,
|
||||||
|
T: d.Tickettop.T,
|
||||||
|
N: req.Ticket,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if code = this.module.ConsumeRes(session, []*cfg.Gameatn{res}, true); code != pb.ErrorCode_Success { // 校验门票数量
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.Curcity = req.City
|
||||||
|
this.module.modelCaravan.modifyCaravanDataByObjId(session.GetUserId(), map[string]interface{}{
|
||||||
|
"curcity": list.Curcity,
|
||||||
|
})
|
||||||
|
resp.Data = list
|
||||||
|
session.SendMsg(string(this.module.GetType()), "getlist", resp)
|
||||||
|
return
|
||||||
|
}
|
@ -8,6 +8,7 @@ import (
|
|||||||
"go_dreamfactory/sys/configure"
|
"go_dreamfactory/sys/configure"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
"go_dreamfactory/utils"
|
"go_dreamfactory/utils"
|
||||||
|
"math"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Caravan struct {
|
type Caravan struct {
|
||||||
@ -132,7 +133,9 @@ func (this *Caravan) refreshCaravanCityInfo(uid string, data *pb.DBCaravan) {
|
|||||||
v.Like = append(v.Like, c.Special...)
|
v.Like = append(v.Like, c.Special...)
|
||||||
}
|
}
|
||||||
for _, v1 := range v.Like {
|
for _, v1 := range v.Like {
|
||||||
v.Count[v1] = 40 // 配置暂无 后面走配置
|
if itemConf := this.configure.GetCaravanGoods(v1); itemConf != nil { // 更新商店库存
|
||||||
|
v.Count[v1] = itemConf.Goodsnum
|
||||||
|
}
|
||||||
}
|
}
|
||||||
v.Unlike = append(v.Like, c.Exspecial...)
|
v.Unlike = append(v.Like, c.Exspecial...)
|
||||||
bChange = true
|
bChange = true
|
||||||
@ -156,11 +159,51 @@ func (this *Caravan) refreshCaravanItemInfo(uid string, data *pb.DBCaravan) {
|
|||||||
bChange = true
|
bChange = true
|
||||||
subTime := configure.Now().Unix() - v.Time
|
subTime := configure.Now().Unix() - v.Time
|
||||||
icount := int32(subTime / int64(c.Changetime)) // 循环周期
|
icount := int32(subTime / int64(c.Changetime)) // 循环周期
|
||||||
|
if icount > 50 { //超过一定的周期 则不计算
|
||||||
|
// 随机出新的变动周期
|
||||||
|
v.Period = comm.GetRandNum(c.Changeperiod[0], c.Changeperiod[1])
|
||||||
|
v.CurPeriod = 0
|
||||||
|
v.Time = configure.Now().Unix()
|
||||||
|
} 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 {
|
if v.CurPeriod+icount > v.Period {
|
||||||
// 随机出新的变动周期
|
// 随机出新的变动周期
|
||||||
v.Period = comm.GetRandNum(c.Changeperiod[0], c.Changeperiod[1])
|
v.Period = comm.GetRandNum(c.Changeperiod[0], c.Changeperiod[1])
|
||||||
v.CurPeriod = 0
|
v.CurPeriod = 0
|
||||||
v.Time = configure.Now().Unix() - (subTime % int64(c.Changetime))
|
}
|
||||||
|
}
|
||||||
|
v.Time = configure.Now().Unix() - (subTime % int64(c.Changetime)) // 写入刷新时间
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -441,6 +441,7 @@ func (this *ModelHero) PropertyCompute(hero *pb.DBHero) {
|
|||||||
this.moduleHero.Debugf("hero PropertyCompute Configure Info err:heroid :%s, herolv:=%d,heroStar:%d,", hero.HeroID, hero.Lv, hero.Star)
|
this.moduleHero.Debugf("hero PropertyCompute Configure Info err:heroid :%s, herolv:=%d,heroStar:%d,", hero.HeroID, hero.Lv, hero.Star)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var atk = (this.StarAtkAddition(hero.Star) + lvCfg.Atk + float32(growCfg.Atk)) * (growCfg.Atkgrow / 1000.0)
|
var atk = (this.StarAtkAddition(hero.Star) + lvCfg.Atk + float32(growCfg.Atk)) * (growCfg.Atkgrow / 1000.0)
|
||||||
var def = (this.StarDefAddition(hero.Star) + lvCfg.Def + float32(growCfg.Def)) * (growCfg.Defgrow / 1000.0)
|
var def = (this.StarDefAddition(hero.Star) + lvCfg.Def + float32(growCfg.Def)) * (growCfg.Defgrow / 1000.0)
|
||||||
var hp = (this.StarHpAddition(hero.Star) + lvCfg.Hp + float32(growCfg.Hp)) * (growCfg.Hpgrow / 1000.0)
|
var hp = (this.StarHpAddition(hero.Star) + lvCfg.Hp + float32(growCfg.Hp)) * (growCfg.Hpgrow / 1000.0)
|
||||||
|
@ -229,7 +229,6 @@ type DBCaravan struct {
|
|||||||
Goods map[int32]*Goods `protobuf:"bytes,5,rep,name=goods,proto3" json:"goods" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // key 货物ID
|
Goods map[int32]*Goods `protobuf:"bytes,5,rep,name=goods,proto3" json:"goods" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // key 货物ID
|
||||||
City map[int32]*CityInfo `protobuf:"bytes,6,rep,name=city,proto3" json:"city" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 城市信息
|
City map[int32]*CityInfo `protobuf:"bytes,6,rep,name=city,proto3" json:"city" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 城市信息
|
||||||
Lv int32 `protobuf:"varint,7,opt,name=lv,proto3" json:"lv"` // 商队等级
|
Lv int32 `protobuf:"varint,7,opt,name=lv,proto3" json:"lv"` // 商队等级
|
||||||
Num int64 `protobuf:"varint,8,opt,name=num,proto3" json:"num"` // 虚拟货币数量
|
|
||||||
Profit int64 `protobuf:"varint,9,opt,name=profit,proto3" json:"profit"` // 虚拟货利润
|
Profit int64 `protobuf:"varint,9,opt,name=profit,proto3" json:"profit"` // 虚拟货利润
|
||||||
Resettime int64 `protobuf:"varint,10,opt,name=resettime,proto3" json:"resettime"` // 最后一次重置时间
|
Resettime int64 `protobuf:"varint,10,opt,name=resettime,proto3" json:"resettime"` // 最后一次重置时间
|
||||||
Curcity int32 `protobuf:"varint,11,opt,name=curcity,proto3" json:"curcity"` // 当前城市
|
Curcity int32 `protobuf:"varint,11,opt,name=curcity,proto3" json:"curcity"` // 当前城市
|
||||||
@ -320,13 +319,6 @@ func (x *DBCaravan) GetLv() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCaravan) GetNum() int64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Num
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DBCaravan) GetProfit() int64 {
|
func (x *DBCaravan) GetProfit() int64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Profit
|
return x.Profit
|
||||||
@ -402,7 +394,7 @@ var file_caravan_caravan_db_proto_rawDesc = []byte{
|
|||||||
0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
|
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,
|
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,
|
0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22,
|
||||||
0xef, 0x04, 0x0a, 0x09, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x12, 0x0e, 0x0a,
|
0xdd, 0x04, 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,
|
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,
|
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, 0x03, 0x20, 0x01, 0x28,
|
0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
@ -416,33 +408,31 @@ var file_caravan_caravan_db_proto_rawDesc = []byte{
|
|||||||
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e,
|
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e,
|
||||||
0x43, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12,
|
0x43, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12,
|
||||||
0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12,
|
0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12,
|
||||||
0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75,
|
0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
0x6d, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28,
|
0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74,
|
||||||
0x03, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x73,
|
0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65,
|
||||||
0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65,
|
0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x63, 0x69, 0x74, 0x79,
|
||||||
0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x63, 0x69,
|
0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x63, 0x69, 0x74, 0x79, 0x12,
|
||||||
0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x63, 0x69, 0x74,
|
0x12, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74,
|
||||||
0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x61, 0x73, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x0d,
|
||||||
0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a,
|
||||||
0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12,
|
0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
0x1a, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28,
|
0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x67,
|
||||||
0x05, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62,
|
0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x61, 0x67,
|
||||||
0x61, 0x67, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62,
|
0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x42, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e,
|
||||||
0x61, 0x67, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x42, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73,
|
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
|
||||||
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f,
|
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x0a, 0x47, 0x6f, 0x6f,
|
||||||
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x0a, 0x47,
|
0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||||
0x6f, 0x6f, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x05, 0x76,
|
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73,
|
||||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x47, 0x6f, 0x6f,
|
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x09, 0x43,
|
||||||
0x64, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a,
|
0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
|
||||||
0x09, 0x43, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61,
|
||||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05,
|
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x43, 0x69, 0x74, 0x79,
|
||||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x43, 0x69,
|
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42,
|
||||||
0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
||||||
0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -224,6 +224,7 @@ type CaravanGotoCityReq struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
City int32 `protobuf:"varint,1,opt,name=city,proto3" json:"city"` // 城市id
|
City int32 `protobuf:"varint,1,opt,name=city,proto3" json:"city"` // 城市id
|
||||||
|
Ticket int32 `protobuf:"varint,2,opt,name=ticket,proto3" json:"ticket"` // 门票数量
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CaravanGotoCityReq) Reset() {
|
func (x *CaravanGotoCityReq) Reset() {
|
||||||
@ -265,6 +266,13 @@ func (x *CaravanGotoCityReq) GetCity() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *CaravanGotoCityReq) GetTicket() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Ticket
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type CaravanGotoCityResp struct {
|
type CaravanGotoCityResp struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -337,14 +345,16 @@ var file_caravan_caravan_msg_proto_rawDesc = []byte{
|
|||||||
0x02, 0x38, 0x01, 0x22, 0x36, 0x0a, 0x14, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x42, 0x75,
|
0x02, 0x38, 0x01, 0x22, 0x36, 0x0a, 0x14, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x42, 0x75,
|
||||||
0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64,
|
0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64,
|
||||||
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61,
|
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61,
|
||||||
0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x28, 0x0a, 0x12, 0x43,
|
0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x40, 0x0a, 0x12, 0x43,
|
||||||
0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x6f, 0x74, 0x6f, 0x43, 0x69, 0x74, 0x79, 0x52, 0x65,
|
0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x6f, 0x74, 0x6f, 0x43, 0x69, 0x74, 0x79, 0x52, 0x65,
|
||||||
0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
0x04, 0x63, 0x69, 0x74, 0x79, 0x22, 0x35, 0x0a, 0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e,
|
0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18,
|
||||||
0x47, 0x6f, 0x74, 0x6f, 0x43, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04,
|
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x35, 0x0a,
|
||||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43,
|
0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x6f, 0x74, 0x6f, 0x43, 0x69, 0x74, 0x79,
|
||||||
0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04,
|
0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04,
|
||||||
|
0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -306,6 +306,7 @@ const (
|
|||||||
ErrorCode_TrollMaxSellCount ErrorCode = 3303 // 单日最大交易次数
|
ErrorCode_TrollMaxSellCount ErrorCode = 3303 // 单日最大交易次数
|
||||||
ErrorCode_TrollMaxItemCount ErrorCode = 3304 //背包格子达到上限
|
ErrorCode_TrollMaxItemCount ErrorCode = 3304 //背包格子达到上限
|
||||||
ErrorCode_TrollRepeatedReward ErrorCode = 3305 //奖励重复领取
|
ErrorCode_TrollRepeatedReward ErrorCode = 3305 //奖励重复领取
|
||||||
|
ErrorCode_TrollCity ErrorCode = 3306 // 已经在该城市了
|
||||||
// horoscope
|
// horoscope
|
||||||
ErrorCode_HoroscopeNotTurnedOn ErrorCode = 3401 //未开启
|
ErrorCode_HoroscopeNotTurnedOn ErrorCode = 3401 //未开启
|
||||||
ErrorCode_HoroscopeRestCDNoEnd ErrorCode = 3402 //重置cd未结束
|
ErrorCode_HoroscopeRestCDNoEnd ErrorCode = 3402 //重置cd未结束
|
||||||
@ -649,6 +650,7 @@ var (
|
|||||||
3303: "TrollMaxSellCount",
|
3303: "TrollMaxSellCount",
|
||||||
3304: "TrollMaxItemCount",
|
3304: "TrollMaxItemCount",
|
||||||
3305: "TrollRepeatedReward",
|
3305: "TrollRepeatedReward",
|
||||||
|
3306: "TrollCity",
|
||||||
3401: "HoroscopeNotTurnedOn",
|
3401: "HoroscopeNotTurnedOn",
|
||||||
3402: "HoroscopeRestCDNoEnd",
|
3402: "HoroscopeRestCDNoEnd",
|
||||||
3501: "PrivilegeNotFound",
|
3501: "PrivilegeNotFound",
|
||||||
@ -976,6 +978,7 @@ var (
|
|||||||
"TrollMaxSellCount": 3303,
|
"TrollMaxSellCount": 3303,
|
||||||
"TrollMaxItemCount": 3304,
|
"TrollMaxItemCount": 3304,
|
||||||
"TrollRepeatedReward": 3305,
|
"TrollRepeatedReward": 3305,
|
||||||
|
"TrollCity": 3306,
|
||||||
"HoroscopeNotTurnedOn": 3401,
|
"HoroscopeNotTurnedOn": 3401,
|
||||||
"HoroscopeRestCDNoEnd": 3402,
|
"HoroscopeRestCDNoEnd": 3402,
|
||||||
"PrivilegeNotFound": 3501,
|
"PrivilegeNotFound": 3501,
|
||||||
@ -1076,7 +1079,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_errorcode_proto_rawDesc = []byte{
|
var file_errorcode_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6f, 0x2a, 0xd4, 0x3b, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
0x6f, 0x2a, 0xe4, 0x3b, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||||
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
|
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
|
||||||
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
|
0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
|
||||||
@ -1448,6 +1451,7 @@ var file_errorcode_proto_rawDesc = []byte{
|
|||||||
0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x43,
|
0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x43,
|
||||||
0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe8, 0x19, 0x12, 0x18, 0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c,
|
0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe8, 0x19, 0x12, 0x18, 0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c,
|
||||||
0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe9,
|
0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe9,
|
||||||
|
0x19, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x43, 0x69, 0x74, 0x79, 0x10, 0xea,
|
||||||
0x19, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x4e, 0x6f,
|
0x19, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x4e, 0x6f,
|
||||||
0x74, 0x54, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x10, 0xc9, 0x1a, 0x12, 0x19, 0x0a, 0x14,
|
0x74, 0x54, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x10, 0xc9, 0x1a, 0x12, 0x19, 0x0a, 0x14,
|
||||||
0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x73, 0x74, 0x43, 0x44, 0x4e,
|
0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x73, 0x74, 0x43, 0x44, 0x4e,
|
||||||
|
Loading…
Reference in New Issue
Block a user