diff --git a/bin/json/game_caravanlv.json b/bin/json/game_caravanlv.json index c145a6708..8abe0a1fb 100644 --- a/bin/json/game_caravanlv.json +++ b/bin/json/game_caravanlv.json @@ -3,7 +3,7 @@ "lv": 0, "newmoneyexp": 0, "bagtop": 20, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -22,7 +22,7 @@ "lv": 1, "newmoneyexp": 100000, "bagtop": 24, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -47,7 +47,7 @@ "lv": 2, "newmoneyexp": 200000, "bagtop": 28, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -72,7 +72,7 @@ "lv": 3, "newmoneyexp": 300000, "bagtop": 32, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -97,7 +97,7 @@ "lv": 4, "newmoneyexp": 400000, "bagtop": 36, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -122,7 +122,7 @@ "lv": 5, "newmoneyexp": 500000, "bagtop": 40, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -147,7 +147,7 @@ "lv": 6, "newmoneyexp": 600000, "bagtop": 44, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -172,7 +172,7 @@ "lv": 7, "newmoneyexp": 700000, "bagtop": 48, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -197,7 +197,7 @@ "lv": 8, "newmoneyexp": 800000, "bagtop": 52, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -222,7 +222,7 @@ "lv": 9, "newmoneyexp": 900000, "bagtop": 56, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -247,7 +247,7 @@ "lv": 10, "newmoneyexp": 1000000, "bagtop": 60, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -272,7 +272,7 @@ "lv": 11, "newmoneyexp": 1100000, "bagtop": 64, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", @@ -297,7 +297,7 @@ "lv": 12, "newmoneyexp": 1200000, "bagtop": 68, - "bagtagnum": 40, + "bagtagnum": 100, "tickettop": { "a": "item", "t": "141002", diff --git a/bin/json/game_caravanthing.json b/bin/json/game_caravanthing.json index 5a885c71c..5822fd4fd 100644 --- a/bin/json/game_caravanthing.json +++ b/bin/json/game_caravanthing.json @@ -15,7 +15,6 @@ 5, 15 ], - "changetime": 60, "PriceChangeWeight": [ 40, 20, @@ -54,7 +53,6 @@ 5, 15 ], - "changetime": 60, "PriceChangeWeight": [ 40, 20, @@ -93,7 +91,6 @@ 5, 15 ], - "changetime": 60, "PriceChangeWeight": [ 40, 20, @@ -132,7 +129,6 @@ 5, 15 ], - "changetime": 60, "PriceChangeWeight": [ 40, 20, @@ -171,7 +167,6 @@ 5, 15 ], - "changetime": 60, "PriceChangeWeight": [ 40, 20, @@ -210,7 +205,6 @@ 5, 15 ], - "changetime": 60, "PriceChangeWeight": [ 40, 20, diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index 95ecbc3c3..90570065b 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -114,7 +114,7 @@ "text": "相信或不相信,能做到或不能做到,守护者与你,命运的齿轮早已开始转动……" }, "completetask": [ - 0 + 174 ], "deliver_npctxt": { "key": "worldtask_world_task_deliver_npctxt_3", @@ -344,13 +344,13 @@ "text": "听说维京人热爱海上的风浪、甘醇的啤酒、勇猛的龙,还有那无与伦比的艺术品……" }, "completetask": [ - 0 + 304 ], "deliver_npctxt": { "key": "worldtask_world_task_deliver_npctxt_8", "text": "听说维京人热爱海上的风浪、甘醇的啤酒、勇猛的龙,还有那无与伦比的艺术品……" }, - "deliver_npc": 0, + "deliver_npc": 10081, "auto_accept": 0, "reword": [ { @@ -784,13 +784,13 @@ "text": "戈伯在他的铁匠铺里干活,但我现在需要去找他聊聊。" }, "completetask": [ - 0 + 308 ], "deliver_npctxt": { "key": "worldtask_world_task_deliver_npctxt_18", "text": "戈伯在他的铁匠铺里干活,但我现在需要去找他聊聊。" }, - "deliver_npc": 0, + "deliver_npc": 70023, "auto_accept": 0, "reword": [ { @@ -872,13 +872,13 @@ "text": "任务完成了,是时候去找戈伯聊聊了。" }, "completetask": [ - 0 + 309 ], "deliver_npctxt": { "key": "worldtask_world_task_deliver_npctxt_20", "text": "任务完成了,是时候去找戈伯聊聊了。" }, - "deliver_npc": 0, + "deliver_npc": 70033, "auto_accept": 0, "reword": [ { diff --git a/modules/caravan/api_buyorsell.go b/modules/caravan/api_buyorsell.go index cbe274cb4..a78b839db 100644 --- a/modules/caravan/api_buyorsell.go +++ b/modules/caravan/api_buyorsell.go @@ -68,9 +68,10 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe // 找到城市想要收购的物品 var price int32 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 } break diff --git a/modules/caravan/api_getlist.go b/modules/caravan/api_getlist.go index 1d74c576a..172ed6806 100644 --- a/modules/caravan/api_getlist.go +++ b/modules/caravan/api_getlist.go @@ -27,11 +27,8 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.CaravanGetListRe return } } - // 校验城市货物是否刷新 + // 刷新城市货物信息 this.module.refreshCaravanCityInfo(session.GetUserId(), list) - // 更新货物信息 - this.module.refreshCaravanItemInfo(session.GetUserId(), list) - //this.module.CheckCaravanTask(session, list) resp.Data = list session.SendMsg(string(this.module.GetType()), "getlist", resp) return diff --git a/modules/caravan/comp_configure.go b/modules/caravan/comp_configure.go index 3b3340fd8..2d5909b49 100644 --- a/modules/caravan/comp_configure.go +++ b/modules/caravan/comp_configure.go @@ -143,3 +143,18 @@ func (this *configureComp) GetCaravanInitCity() (initcity int32) { } 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 +} diff --git a/modules/caravan/model_caravan.go b/modules/caravan/model_caravan.go index 92089f81f..34fe9ed72 100644 --- a/modules/caravan/model_caravan.go +++ b/modules/caravan/model_caravan.go @@ -42,6 +42,7 @@ func (this *modelCaravan) getCaravanList(uid string) (result *pb.DBCaravan, err // 创建一条数据 result.Id = primitive.NewObjectID().Hex() result.Resettime = configure.Now().Unix() // 设置起始刷新时间 + result.Citystime = configure.Now().Unix() result.Lv = 1 result.Curcity = this.module.configure.GetCaravanInitCity() // 获取默认城市 if conf := this.module.configure.GetCaravanLv(1); conf != nil { diff --git a/modules/caravan/module.go b/modules/caravan/module.go index 98462bc08..ff6f7f4b7 100644 --- a/modules/caravan/module.go +++ b/modules/caravan/module.go @@ -56,10 +56,8 @@ func (this *Caravan) InitCaravanCityData(uid string, data *pb.DBCaravan) { data.City = make(map[int32]*pb.CityInfo, 0) for _, v := range list { city := &pb.CityInfo{ - Special: []int32{}, // 城市卖给玩家的商品 (注意 这里有库存 必须初始化 Count 字段数据) - Exspecial: []int32{}, // 城市想要玩家卖给他的商品库 - Count: map[int32]int32{}, // key 货物ID - Rtime: configure.Now().Unix(), // 初始化城市货物刷新时间 + Special: []int32{}, // 城市卖给玩家的商品 (注意 这里有库存 必须初始化 Count 字段数据) + Count: map[int32]int32{}, // key 货物ID } 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 { // city.Count[v] = 40 // 配置暂无 后面走配置 // } - city.Exspecial = append(city.Special, v.Exspecial...) data.City[v.Id] = city } @@ -86,10 +83,9 @@ func (this *Caravan) InitCaravanItemData(uid string, data *pb.DBCaravan) { data.Goods = make(map[int32]*pb.Goods, 0) for _, v := range items { goods := &pb.Goods{ - Period: 0, // 变动周期 - CurPeriod: 1, // 当前变动周期 - Price: 0, // 当前价格 - Time: configure.Now().Unix(), // 刷新时间 + Period: 0, // 变动周期 + CurPeriod: 1, // 当前变动周期 + Price: 0, // 当前价格 } if len(v.Changeperiod) == 2 { 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 ( - bChange bool - update map[string]interface{} + bChange bool + update map[string]interface{} + changeTime int32 ) update = make(map[string]interface{}) - for k, v := range data.City { - 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) + 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 { v.Count = make(map[int32]int32) // 初始化城市信息 v.Special = []int32{} - v.Exspecial = []int32{} if len(c.Special) > int(c.Citytypenum) { ids := utils.RandomNumbers(0, len(c.Special), int(c.Citytypenum)) for _, id := range ids { v.Special = append(v.Special, c.Special[id]) - } } else { 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) { - 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 configure.Now().Unix()-v.Time > int64(c.Changetime) { - bChange = true - subTime := configure.Now().Unix() - v.Time - icount := int32(subTime / int64(c.Changetime)) // 循环周期 - if icount > 50 { //超过一定的周期 则不计算 + for k, v := range caravan.Goods { + if c := this.configure.GetCaravanGoods(k); c != nil { + subTime := configure.Now().Unix() - int64(changeTime) + icount := int32(subTime / int64(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 @@ -206,13 +180,13 @@ func (this *Caravan) refreshCaravanItemInfo(uid string, data *pb.DBCaravan) { v.CurPeriod = 0 } } - v.Time = configure.Now().Unix() - (subTime % int64(c.Changetime)) // 写入刷新时间 } } } } + if bChange { - update["goods"] = data.Goods + update["city"] = caravan.City this.modelCaravan.modifyCaravanDataByObjId(uid, update) } } @@ -345,7 +319,7 @@ func (this *Caravan) TestFunc(session comm.IUserSession) { this.modelCaravan.module.api.BuyOrSell(session, &pb.CaravanBuyOrSellReq{ City: 101, Items: map[int32]int32{ - 2: 20, + 6: 100, }, IsBuy: false, }) diff --git a/pb/caravan_db.pb.go b/pb/caravan_db.pb.go index 4450e207d..5cad8e74e 100644 --- a/pb/caravan_db.pb.go +++ b/pb/caravan_db.pb.go @@ -28,7 +28,6 @@ type Goods struct { Period int32 `protobuf:"varint,1,opt,name=period,proto3" json:"period"` // 变动周期 CurPeriod int32 `protobuf:"varint,2,opt,name=curPeriod,proto3" json:"curPeriod"` // 当前变动周期 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() { @@ -84,22 +83,13 @@ func (x *Goods) GetPrice() int32 { return 0 } -func (x *Goods) GetTime() int64 { - if x != nil { - return x.Time - } - return 0 -} - type CityInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - 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,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"` // 商店刷新时间 + Special []int32 `protobuf:"varint,1,rep,packed,name=special,proto3" json:"special"` // 城市卖给玩家的商品 + 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"` // 货物对应的数量 } func (x *CityInfo) Reset() { @@ -141,13 +131,6 @@ func (x *CityInfo) GetSpecial() []int32 { return nil } -func (x *CityInfo) GetExspecial() []int32 { - if x != nil { - return x.Exspecial - } - return nil -} - func (x *CityInfo) GetCount() map[int32]int32 { if x != nil { return x.Count @@ -155,13 +138,6 @@ func (x *CityInfo) GetCount() map[int32]int32 { return nil } -func (x *CityInfo) GetRtime() int64 { - if x != nil { - return x.Rtime - } - return 0 -} - type BagInfo struct { state protoimpl.MessageState 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"` // 城市信息 Lv int32 `protobuf:"varint,7,opt,name=lv,proto3" json:"lv"` // 商队等级 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"` // 当前城市 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) Tasktime int64 `protobuf:"varint,13,opt,name=tasktime,proto3" json:"tasktime"` // 任务触发时间 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() { @@ -368,72 +345,77 @@ func (x *DBCaravan) GetBaglimit() int32 { 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_rawDesc = []byte{ 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, 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, 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, - 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, - 0x69, 0x6d, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x08, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x65, - 0x78, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, - 0x66, 0x6f, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x35, 0x0a, 0x07, 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, 0xe1, 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, 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, 0x05, 0x52, 0x08, 0x75, - 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, - 0x61, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, - 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, - 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x67, 0x6f, 0x6f, 0x64, - 0x73, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 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, 0x0e, 0x0a, 0x02, 0x6c, - 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x16, 0x0a, 0x06, 0x70, - 0x72, 0x6f, 0x66, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x63, 0x69, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, - 0x61, 0x73, 0x6b, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, - 0x6b, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x67, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x61, 0x67, - 0x6c, 0x69, 0x6d, 0x69, 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, 0x05, - 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, 0x05, 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, 0x42, - 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, + 0x8a, 0x01, 0x0a, 0x08, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x1a, 0x38, 0x0a, 0x0a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x35, 0x0a, 0x07, + 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, 0xff, 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, 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, 0x05, 0x52, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x05, + 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, + 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x69, 0x74, + 0x79, 0x18, 0x06, 0x20, 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, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x02, 0x6c, 0x76, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, + 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, + 0x63, 0x69, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x63, + 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x69, 0x64, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x74, 0x69, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x67, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x61, 0x67, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, 0x74, 0x69, 0x6d, 0x65, 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, 0x05, 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, 0x05, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/stress/server/dispose.go b/stress/server/dispose.go index 4f122bddf..ae97e77e7 100644 --- a/stress/server/dispose.go +++ b/stress/server/dispose.go @@ -51,7 +51,8 @@ func Dispose(ctx context.Context, concurrency, totalNumber uint64, request *mode case 1: // 连接以后再启动协程 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"} // 先登录 diff --git a/sys/configure/structs/Game.CaravanThingData.go b/sys/configure/structs/Game.CaravanThingData.go index a63b32e85..f2f82eac2 100644 --- a/sys/configure/structs/Game.CaravanThingData.go +++ b/sys/configure/structs/Game.CaravanThingData.go @@ -17,7 +17,6 @@ type GameCaravanThingData struct { Goodsicon string Goodsprice int32 Changeperiod []int32 - Changetime int32 PriceChangeWeight []int32 PriceChangeWeightOne []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 _ok_ bool diff --git a/sys/configure/structs/Tables.go b/sys/configure/structs/Tables.go index 857f58ff9..8381077b7 100644 --- a/sys/configure/structs/Tables.go +++ b/sys/configure/structs/Tables.go @@ -196,7 +196,6 @@ type Tables struct { RuleDesc *GameRuleDesc HeroTalent *GameHeroTalent TalentBox *GameTalentBox - TalentSkill *GameTalentSkill } func NewTables(loader JsonLoader) (*Tables, error) { @@ -1314,11 +1313,5 @@ func NewTables(loader JsonLoader) (*Tables, error) { if tables.TalentBox, err = NewGameTalentBox(buf) ; err != nil { 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 }