城市和货物刷新时间一致

This commit is contained in:
meixiongfeng 2023-05-19 15:16:09 +08:00
parent 2cf51eec34
commit 2d49493354
12 changed files with 132 additions and 176 deletions

View File

@ -3,7 +3,7 @@
"lv": 0, "lv": 0,
"newmoneyexp": 0, "newmoneyexp": 0,
"bagtop": 20, "bagtop": 20,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -22,7 +22,7 @@
"lv": 1, "lv": 1,
"newmoneyexp": 100000, "newmoneyexp": 100000,
"bagtop": 24, "bagtop": 24,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -47,7 +47,7 @@
"lv": 2, "lv": 2,
"newmoneyexp": 200000, "newmoneyexp": 200000,
"bagtop": 28, "bagtop": 28,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -72,7 +72,7 @@
"lv": 3, "lv": 3,
"newmoneyexp": 300000, "newmoneyexp": 300000,
"bagtop": 32, "bagtop": 32,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -97,7 +97,7 @@
"lv": 4, "lv": 4,
"newmoneyexp": 400000, "newmoneyexp": 400000,
"bagtop": 36, "bagtop": 36,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -122,7 +122,7 @@
"lv": 5, "lv": 5,
"newmoneyexp": 500000, "newmoneyexp": 500000,
"bagtop": 40, "bagtop": 40,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -147,7 +147,7 @@
"lv": 6, "lv": 6,
"newmoneyexp": 600000, "newmoneyexp": 600000,
"bagtop": 44, "bagtop": 44,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -172,7 +172,7 @@
"lv": 7, "lv": 7,
"newmoneyexp": 700000, "newmoneyexp": 700000,
"bagtop": 48, "bagtop": 48,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -197,7 +197,7 @@
"lv": 8, "lv": 8,
"newmoneyexp": 800000, "newmoneyexp": 800000,
"bagtop": 52, "bagtop": 52,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -222,7 +222,7 @@
"lv": 9, "lv": 9,
"newmoneyexp": 900000, "newmoneyexp": 900000,
"bagtop": 56, "bagtop": 56,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -247,7 +247,7 @@
"lv": 10, "lv": 10,
"newmoneyexp": 1000000, "newmoneyexp": 1000000,
"bagtop": 60, "bagtop": 60,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -272,7 +272,7 @@
"lv": 11, "lv": 11,
"newmoneyexp": 1100000, "newmoneyexp": 1100000,
"bagtop": 64, "bagtop": 64,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",
@ -297,7 +297,7 @@
"lv": 12, "lv": 12,
"newmoneyexp": 1200000, "newmoneyexp": 1200000,
"bagtop": 68, "bagtop": 68,
"bagtagnum": 40, "bagtagnum": 100,
"tickettop": { "tickettop": {
"a": "item", "a": "item",
"t": "141002", "t": "141002",

View File

@ -15,7 +15,6 @@
5, 5,
15 15
], ],
"changetime": 60,
"PriceChangeWeight": [ "PriceChangeWeight": [
40, 40,
20, 20,
@ -54,7 +53,6 @@
5, 5,
15 15
], ],
"changetime": 60,
"PriceChangeWeight": [ "PriceChangeWeight": [
40, 40,
20, 20,
@ -93,7 +91,6 @@
5, 5,
15 15
], ],
"changetime": 60,
"PriceChangeWeight": [ "PriceChangeWeight": [
40, 40,
20, 20,
@ -132,7 +129,6 @@
5, 5,
15 15
], ],
"changetime": 60,
"PriceChangeWeight": [ "PriceChangeWeight": [
40, 40,
20, 20,
@ -171,7 +167,6 @@
5, 5,
15 15
], ],
"changetime": 60,
"PriceChangeWeight": [ "PriceChangeWeight": [
40, 40,
20, 20,
@ -210,7 +205,6 @@
5, 5,
15 15
], ],
"changetime": 60,
"PriceChangeWeight": [ "PriceChangeWeight": [
40, 40,
20, 20,

View File

@ -114,7 +114,7 @@
"text": "相信或不相信,能做到或不能做到,守护者与你,命运的齿轮早已开始转动……" "text": "相信或不相信,能做到或不能做到,守护者与你,命运的齿轮早已开始转动……"
}, },
"completetask": [ "completetask": [
0 174
], ],
"deliver_npctxt": { "deliver_npctxt": {
"key": "worldtask_world_task_deliver_npctxt_3", "key": "worldtask_world_task_deliver_npctxt_3",
@ -344,13 +344,13 @@
"text": "听说维京人热爱海上的风浪、甘醇的啤酒、勇猛的龙,还有那无与伦比的艺术品……" "text": "听说维京人热爱海上的风浪、甘醇的啤酒、勇猛的龙,还有那无与伦比的艺术品……"
}, },
"completetask": [ "completetask": [
0 304
], ],
"deliver_npctxt": { "deliver_npctxt": {
"key": "worldtask_world_task_deliver_npctxt_8", "key": "worldtask_world_task_deliver_npctxt_8",
"text": "听说维京人热爱海上的风浪、甘醇的啤酒、勇猛的龙,还有那无与伦比的艺术品……" "text": "听说维京人热爱海上的风浪、甘醇的啤酒、勇猛的龙,还有那无与伦比的艺术品……"
}, },
"deliver_npc": 0, "deliver_npc": 10081,
"auto_accept": 0, "auto_accept": 0,
"reword": [ "reword": [
{ {
@ -784,13 +784,13 @@
"text": "戈伯在他的铁匠铺里干活,但我现在需要去找他聊聊。" "text": "戈伯在他的铁匠铺里干活,但我现在需要去找他聊聊。"
}, },
"completetask": [ "completetask": [
0 308
], ],
"deliver_npctxt": { "deliver_npctxt": {
"key": "worldtask_world_task_deliver_npctxt_18", "key": "worldtask_world_task_deliver_npctxt_18",
"text": "戈伯在他的铁匠铺里干活,但我现在需要去找他聊聊。" "text": "戈伯在他的铁匠铺里干活,但我现在需要去找他聊聊。"
}, },
"deliver_npc": 0, "deliver_npc": 70023,
"auto_accept": 0, "auto_accept": 0,
"reword": [ "reword": [
{ {
@ -872,13 +872,13 @@
"text": "任务完成了,是时候去找戈伯聊聊了。" "text": "任务完成了,是时候去找戈伯聊聊了。"
}, },
"completetask": [ "completetask": [
0 309
], ],
"deliver_npctxt": { "deliver_npctxt": {
"key": "worldtask_world_task_deliver_npctxt_20", "key": "worldtask_world_task_deliver_npctxt_20",
"text": "任务完成了,是时候去找戈伯聊聊了。" "text": "任务完成了,是时候去找戈伯聊聊了。"
}, },
"deliver_npc": 0, "deliver_npc": 70033,
"auto_accept": 0, "auto_accept": 0,
"reword": [ "reword": [
{ {

View File

@ -68,9 +68,10 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
// 找到城市想要收购的物品 // 找到城市想要收购的物品
var price int32 var price int32
price = items.Price price = items.Price
for _, v := range cityInfo.Exspecial {
if v == k {
if cityConf := this.module.configure.GetCaravanCity(req.City); cityConf != nil { if cityConf := this.module.configure.GetCaravanCity(req.City); cityConf != nil {
for _, v := range cityConf.Exspecial {
if v == k {
price = cityConf.Exspecialnum * items.Price / 1000 price = cityConf.Exspecialnum * items.Price / 1000
} }
break break

View File

@ -27,11 +27,8 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.CaravanGetListRe
return return
} }
} }
// 校验城市货物是否刷新 // 刷新城市货物信息
this.module.refreshCaravanCityInfo(session.GetUserId(), list) this.module.refreshCaravanCityInfo(session.GetUserId(), list)
// 更新货物信息
this.module.refreshCaravanItemInfo(session.GetUserId(), list)
//this.module.CheckCaravanTask(session, list)
resp.Data = list resp.Data = list
session.SendMsg(string(this.module.GetType()), "getlist", resp) session.SendMsg(string(this.module.GetType()), "getlist", resp)
return return

View File

@ -143,3 +143,18 @@ func (this *configureComp) GetCaravanInitCity() (initcity int32) {
} }
return return
} }
// 获取商店刷新时间
func (this *configureComp) GetCityRefreshTime() int32 {
if v, err := this.GetConfigure(game_caravan); err == nil {
if configure, ok := v.(*cfg.GameCaravanCity); ok {
for _, v := range configure.GetDataList() {
return v.Checktime
}
}
} else {
log.Errorf("get GetCaravanInitCity conf err:%v", err)
}
return 0
}

View File

@ -42,6 +42,7 @@ func (this *modelCaravan) getCaravanList(uid string) (result *pb.DBCaravan, err
// 创建一条数据 // 创建一条数据
result.Id = primitive.NewObjectID().Hex() result.Id = primitive.NewObjectID().Hex()
result.Resettime = configure.Now().Unix() // 设置起始刷新时间 result.Resettime = configure.Now().Unix() // 设置起始刷新时间
result.Citystime = configure.Now().Unix()
result.Lv = 1 result.Lv = 1
result.Curcity = this.module.configure.GetCaravanInitCity() // 获取默认城市 result.Curcity = this.module.configure.GetCaravanInitCity() // 获取默认城市
if conf := this.module.configure.GetCaravanLv(1); conf != nil { if conf := this.module.configure.GetCaravanLv(1); conf != nil {

View File

@ -57,9 +57,7 @@ func (this *Caravan) InitCaravanCityData(uid string, data *pb.DBCaravan) {
for _, v := range list { for _, v := range list {
city := &pb.CityInfo{ city := &pb.CityInfo{
Special: []int32{}, // 城市卖给玩家的商品 (注意 这里有库存 必须初始化 Count 字段数据) Special: []int32{}, // 城市卖给玩家的商品 (注意 这里有库存 必须初始化 Count 字段数据)
Exspecial: []int32{}, // 城市想要玩家卖给他的商品库
Count: map[int32]int32{}, // key 货物ID Count: map[int32]int32{}, // key 货物ID
Rtime: configure.Now().Unix(), // 初始化城市货物刷新时间
} }
if len(v.Special) > int(v.Citytypenum) { if len(v.Special) > int(v.Citytypenum) {
@ -74,7 +72,6 @@ func (this *Caravan) InitCaravanCityData(uid string, data *pb.DBCaravan) {
// for _, v := range city.Special { // for _, v := range city.Special {
// city.Count[v] = 40 // 配置暂无 后面走配置 // city.Count[v] = 40 // 配置暂无 后面走配置
// } // }
city.Exspecial = append(city.Special, v.Exspecial...)
data.City[v.Id] = city data.City[v.Id] = city
} }
@ -89,7 +86,6 @@ func (this *Caravan) InitCaravanItemData(uid string, data *pb.DBCaravan) {
Period: 0, // 变动周期 Period: 0, // 变动周期
CurPeriod: 1, // 当前变动周期 CurPeriod: 1, // 当前变动周期
Price: 0, // 当前价格 Price: 0, // 当前价格
Time: configure.Now().Unix(), // 刷新时间
} }
if len(v.Changeperiod) == 2 { if len(v.Changeperiod) == 2 {
goods.Period = comm.GetRandNum(v.Changeperiod[0], v.Changeperiod[1]) goods.Period = comm.GetRandNum(v.Changeperiod[0], v.Changeperiod[1])
@ -112,61 +108,39 @@ func (this *Caravan) InitCaravanTicket(session comm.IUserSession, lv int32) (cod
} }
// 刷新城市货物信息 // 刷新城市货物信息
func (this *Caravan) refreshCaravanCityInfo(uid string, data *pb.DBCaravan) { func (this *Caravan) refreshCaravanCityInfo(uid string, caravan *pb.DBCaravan) {
var ( var (
bChange bool bChange bool
update map[string]interface{} update map[string]interface{}
changeTime int32
) )
update = make(map[string]interface{}) update = make(map[string]interface{})
for k, v := range data.City { changeTime = this.configure.GetCityRefreshTime()
if int32(configure.Now().Unix()-caravan.Citystime) >= changeTime {
bChange = true
for k, v := range caravan.City {
if c := this.configure.GetCaravanCity(k); c != nil { if c := this.configure.GetCaravanCity(k); c != nil {
if configure.Now().Unix()-v.Rtime >= int64(c.Checktime) {
v.Rtime = configure.Now().Unix() - (configure.Now().Unix()-v.Rtime)%int64(c.Checktime)
v.Count = make(map[int32]int32) // 初始化城市信息 v.Count = make(map[int32]int32) // 初始化城市信息
v.Special = []int32{} v.Special = []int32{}
v.Exspecial = []int32{}
if len(c.Special) > int(c.Citytypenum) { if len(c.Special) > int(c.Citytypenum) {
ids := utils.RandomNumbers(0, len(c.Special), int(c.Citytypenum)) ids := utils.RandomNumbers(0, len(c.Special), int(c.Citytypenum))
for _, id := range ids { for _, id := range ids {
v.Special = append(v.Special, c.Special[id]) v.Special = append(v.Special, c.Special[id])
} }
} else { } else {
v.Special = append(v.Special, c.Special...) v.Special = append(v.Special, c.Special...)
} }
// for _, v1 := range v.Special {
// if itemConf := this.configure.GetCaravanGoods(v1); itemConf != nil { // 更新商店库存
// v.Count[v1] = itemConf.Goodsnum
// }
// }
v.Exspecial = append(v.Special, c.Exspecial...)
bChange = true
}
}
}
if bChange {
update["city"] = data.City
this.modelCaravan.modifyCaravanDataByObjId(uid, update)
} }
} }
func (this *Caravan) refreshCaravanItemInfo(uid string, data *pb.DBCaravan) { for k, v := range caravan.Goods {
var (
bChange bool
update map[string]interface{}
)
update = make(map[string]interface{})
for k, v := range data.Goods {
if c := this.configure.GetCaravanGoods(k); c != nil { if c := this.configure.GetCaravanGoods(k); c != nil {
if configure.Now().Unix()-v.Time > int64(c.Changetime) { subTime := configure.Now().Unix() - int64(changeTime)
bChange = true icount := int32(subTime / int64(changeTime)) // 循环周期
subTime := configure.Now().Unix() - v.Time
icount := int32(subTime / int64(c.Changetime)) // 循环周期
if icount > 50 { //超过一定的周期 则不计算 if icount > 50 { //超过一定的周期 则不计算
// 随机出新的变动周期 // 随机出新的变动周期
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()
} else { } else {
for i := 0; i < int(icount); i++ { // 计算当前的价格 for i := 0; i < int(icount); i++ { // 计算当前的价格
// 价格涨跌权重 PriceChangeWeight // 价格涨跌权重 PriceChangeWeight
@ -206,13 +180,13 @@ func (this *Caravan) refreshCaravanItemInfo(uid string, data *pb.DBCaravan) {
v.CurPeriod = 0 v.CurPeriod = 0
} }
} }
v.Time = configure.Now().Unix() - (subTime % int64(c.Changetime)) // 写入刷新时间
} }
} }
} }
} }
if bChange { if bChange {
update["goods"] = data.Goods update["city"] = caravan.City
this.modelCaravan.modifyCaravanDataByObjId(uid, update) this.modelCaravan.modifyCaravanDataByObjId(uid, update)
} }
} }
@ -345,7 +319,7 @@ func (this *Caravan) TestFunc(session comm.IUserSession) {
this.modelCaravan.module.api.BuyOrSell(session, &pb.CaravanBuyOrSellReq{ this.modelCaravan.module.api.BuyOrSell(session, &pb.CaravanBuyOrSellReq{
City: 101, City: 101,
Items: map[int32]int32{ Items: map[int32]int32{
2: 20, 6: 100,
}, },
IsBuy: false, IsBuy: false,
}) })

View File

@ -28,7 +28,6 @@ type Goods struct {
Period int32 `protobuf:"varint,1,opt,name=period,proto3" json:"period"` // 变动周期 Period int32 `protobuf:"varint,1,opt,name=period,proto3" json:"period"` // 变动周期
CurPeriod int32 `protobuf:"varint,2,opt,name=curPeriod,proto3" json:"curPeriod"` // 当前变动周期 CurPeriod int32 `protobuf:"varint,2,opt,name=curPeriod,proto3" json:"curPeriod"` // 当前变动周期
Price int32 `protobuf:"varint,3,opt,name=price,proto3" json:"price"` // 当前价格 Price int32 `protobuf:"varint,3,opt,name=price,proto3" json:"price"` // 当前价格
Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time"` // 刷新时间
} }
func (x *Goods) Reset() { func (x *Goods) Reset() {
@ -84,22 +83,13 @@ func (x *Goods) GetPrice() int32 {
return 0 return 0
} }
func (x *Goods) GetTime() int64 {
if x != nil {
return x.Time
}
return 0
}
type CityInfo struct { type CityInfo struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Special []int32 `protobuf:"varint,1,rep,packed,name=special,proto3" json:"special"` // 城市卖给玩家的商品 Special []int32 `protobuf:"varint,1,rep,packed,name=special,proto3" json:"special"` // 城市卖给玩家的商品
Exspecial []int32 `protobuf:"varint,2,rep,packed,name=exspecial,proto3" json:"exspecial"` // 城市想要玩家卖给他的商品库 Count map[int32]int32 `protobuf:"bytes,2,rep,name=count,proto3" json:"count" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 货物对应的数量
Count map[int32]int32 `protobuf:"bytes,3,rep,name=count,proto3" json:"count" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 货物对应的数量
Rtime int64 `protobuf:"varint,4,opt,name=rtime,proto3" json:"rtime"` // 商店刷新时间
} }
func (x *CityInfo) Reset() { func (x *CityInfo) Reset() {
@ -141,13 +131,6 @@ func (x *CityInfo) GetSpecial() []int32 {
return nil return nil
} }
func (x *CityInfo) GetExspecial() []int32 {
if x != nil {
return x.Exspecial
}
return nil
}
func (x *CityInfo) GetCount() map[int32]int32 { func (x *CityInfo) GetCount() map[int32]int32 {
if x != nil { if x != nil {
return x.Count return x.Count
@ -155,13 +138,6 @@ func (x *CityInfo) GetCount() map[int32]int32 {
return nil return nil
} }
func (x *CityInfo) GetRtime() int64 {
if x != nil {
return x.Rtime
}
return 0
}
type BagInfo struct { type BagInfo struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -230,12 +206,13 @@ type DBCaravan struct {
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"` // 商队等级
Profit int64 `protobuf:"varint,8,opt,name=profit,proto3" json:"profit"` // 虚拟货利润 Profit int64 `protobuf:"varint,8,opt,name=profit,proto3" json:"profit"` // 虚拟货利润
Resettime int64 `protobuf:"varint,9,opt,name=resettime,proto3" json:"resettime"` // 最后一次重置时间 Resettime int64 `protobuf:"varint,9,opt,name=resettime,proto3" json:"resettime"` // 赛季结算时间
Curcity int32 `protobuf:"varint,10,opt,name=curcity,proto3" json:"curcity"` // 当前城市 Curcity int32 `protobuf:"varint,10,opt,name=curcity,proto3" json:"curcity"` // 当前城市
Taskid int32 `protobuf:"varint,11,opt,name=taskid,proto3" json:"taskid"` // 对应对应世界任务组 worldtask Taskid int32 `protobuf:"varint,11,opt,name=taskid,proto3" json:"taskid"` // 对应对应世界任务组 worldtask
Eventid int32 `protobuf:"varint,12,opt,name=eventid,proto3" json:"eventid"` // 特殊事件ID(事件配置唯一id) Eventid int32 `protobuf:"varint,12,opt,name=eventid,proto3" json:"eventid"` // 特殊事件ID(事件配置唯一id)
Tasktime int64 `protobuf:"varint,13,opt,name=tasktime,proto3" json:"tasktime"` // 任务触发时间 Tasktime int64 `protobuf:"varint,13,opt,name=tasktime,proto3" json:"tasktime"` // 任务触发时间
Baglimit int32 `protobuf:"varint,14,opt,name=baglimit,proto3" json:"baglimit"` // 背包上限 Baglimit int32 `protobuf:"varint,14,opt,name=baglimit,proto3" json:"baglimit"` // 背包上限
Citystime int64 `protobuf:"varint,15,opt,name=citystime,proto3" json:"citystime"` // 城市刷新时间 玩家身上的货物同时刷新
} }
func (x *DBCaravan) Reset() { func (x *DBCaravan) Reset() {
@ -368,72 +345,77 @@ func (x *DBCaravan) GetBaglimit() int32 {
return 0 return 0
} }
func (x *DBCaravan) GetCitystime() int64 {
if x != nil {
return x.Citystime
}
return 0
}
var File_caravan_caravan_db_proto protoreflect.FileDescriptor var File_caravan_caravan_db_proto protoreflect.FileDescriptor
var file_caravan_caravan_db_proto_rawDesc = []byte{ var file_caravan_caravan_db_proto_rawDesc = []byte{
0x0a, 0x18, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2f, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x0a, 0x18, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2f, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61,
0x6e, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, 0x05, 0x47, 0x6f, 0x6e, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x05, 0x47, 0x6f,
0x6f, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x6f, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63,
0x75, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x75, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
0x63, 0x75, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x75, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69,
0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22,
0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x8a, 0x01, 0x0a, 0x08, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07,
0x69, 0x6d, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x08, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x73,
0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x05, 0x52, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f,
0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x65, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x63, 0x6f, 0x75,
0x78, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x6e, 0x74, 0x1a, 0x38, 0x0a, 0x0a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
0x66, 0x6f, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x63, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x35, 0x0a, 0x07,
0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x43, 0x6f, 0x42, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x72,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x69, 0x63, 0x65, 0x22, 0xff, 0x04, 0x0a, 0x09, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61,
0x3a, 0x02, 0x38, 0x01, 0x22, 0x35, 0x0a, 0x07, 0x42, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0xe1, 0x04, 0x0a, 0x09, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x05,
0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42,
0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x45, 0x6e, 0x74,
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x72, 0x79, 0x52, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x69, 0x74,
0x61, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x79, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61,
0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x05, 0x20, 0x76, 0x61, 0x6e, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x63,
0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
0x47, 0x6f, 0x6f, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x02, 0x6c, 0x76, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x18, 0x08, 0x20,
0x73, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72,
0x14, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72,
0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x63, 0x69, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x63,
0x72, 0x6f, 0x66, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x69, 0x64, 0x18, 0x0b, 0x20,
0x66, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65,
0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76,
0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x63, 0x69, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d,
0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d,
0x61, 0x73, 0x6b, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x67, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0e, 0x20,
0x6b, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x0c, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x61, 0x67, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a,
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03,
0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x52, 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x42, 0x0a, 0x0a, 0x49,
0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x67, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x05, 0x76,
0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x42, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x67,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x40, 0x0a, 0x0a, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x0a, 0x47, 0x6f, 0x6f, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06,
0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x01, 0x1a, 0x42, 0x0a, 0x09, 0x43, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x09, 0x43, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View File

@ -51,7 +51,8 @@ func Dispose(ctx context.Context, concurrency, totalNumber uint64, request *mode
case 1: case 1:
// 连接以后再启动协程 // 连接以后再启动协程
r := robot.NewRobot(request.URL) r := robot.NewRobot(request.URL)
r.SetAccount("e51112" + strconv.Itoa(int(i))) //r.SetAccount("e51112" + strconv.Itoa(int(i)))
r.SetAccount("user001")
//head := &pb.UserMessage{MainType: "user", SubType: "login"} //head := &pb.UserMessage{MainType: "user", SubType: "login"}
// 先登录 // 先登录

View File

@ -17,7 +17,6 @@ type GameCaravanThingData struct {
Goodsicon string Goodsicon string
Goodsprice int32 Goodsprice int32
Changeperiod []int32 Changeperiod []int32
Changetime int32
PriceChangeWeight []int32 PriceChangeWeight []int32
PriceChangeWeightOne []int32 PriceChangeWeightOne []int32
PriceChangeWeightTwo []int32 PriceChangeWeightTwo []int32
@ -54,7 +53,6 @@ func (_v *GameCaravanThingData)Deserialize(_buf map[string]interface{}) (err err
} }
} }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["changetime"].(float64); !_ok_ { err = errors.New("changetime error"); return }; _v.Changetime = int32(_tempNum_) }
{ {
var _arr_ []interface{} var _arr_ []interface{}
var _ok_ bool var _ok_ bool

View File

@ -196,7 +196,6 @@ type Tables struct {
RuleDesc *GameRuleDesc RuleDesc *GameRuleDesc
HeroTalent *GameHeroTalent HeroTalent *GameHeroTalent
TalentBox *GameTalentBox TalentBox *GameTalentBox
TalentSkill *GameTalentSkill
} }
func NewTables(loader JsonLoader) (*Tables, error) { func NewTables(loader JsonLoader) (*Tables, error) {
@ -1314,11 +1313,5 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.TalentBox, err = NewGameTalentBox(buf) ; err != nil { if tables.TalentBox, err = NewGameTalentBox(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_talentskill") ; err != nil {
return nil, err
}
if tables.TalentSkill, err = NewGameTalentSkill(buf) ; err != nil {
return nil, err
}
return tables, nil return tables, nil
} }