From aa865e24bf185d65d298dfc4579ec44fcd41815e Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 16 Aug 2023 17:42:03 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E7=89=B9=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/stonehenge/api_event.go | 16 +- modules/stonehenge/modelStonehenge.go | 1 + modules/stonehenge/modelworldbuff.go | 54 ---- pb/stonehenge_db.pb.go | 395 ++++++++++++++------------ 4 files changed, 228 insertions(+), 238 deletions(-) delete mode 100644 modules/stonehenge/modelworldbuff.go diff --git a/modules/stonehenge/api_event.go b/modules/stonehenge/api_event.go index ccce5e785..7f1ac7305 100644 --- a/modules/stonehenge/api_event.go +++ b/modules/stonehenge/api_event.go @@ -104,6 +104,20 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq update["userbuff"] = stone.Userbuff this.module.modelStonehengeBook.addStonehengeBook(session.GetUserId(), conf.Type, conf.SkillId) } + // 查特权 + for _, v := range stone.Privilege { + if v == 3 { // + // 记录buff 三选一的次数 + stone.Selectcount++ + if stone.Selectcount == 3 { //可额外触发一次随机buff三选一事件 + if c, err := this.module.configure.getGameStonePrivilegeData(3); err != nil { + newEvent = c.Value1 + } + } + break + } + } + } else { // 参数错误 errdata = &pb.ErrorData{ Code: pb.ErrorCode_ReqParameterError, @@ -346,7 +360,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq stone.Rooms.Eventid[req.Eventid] = true // // 校验事件有后续事件 - if eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中 + if newEvent == 0 && eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中 newEvent = eventConf.PostEvent this.module.modelStonehenge.AddNewEvent([]int32{eventConf.PostEvent}, stone) } diff --git a/modules/stonehenge/modelStonehenge.go b/modules/stonehenge/modelStonehenge.go index 7c54c58d2..b08f682dc 100644 --- a/modules/stonehenge/modelStonehenge.go +++ b/modules/stonehenge/modelStonehenge.go @@ -68,6 +68,7 @@ func (this *MStonehenge) GetStonehengeData(uid string) (info *pb.DBStonehenge, e Talentproperty: make(map[string]int32), Privilege: make([]pb.StonehengePrivilege, 0), Task: make(map[int32]bool), + PrivilegeEvent: make(map[int32]int32), } err = this.Add(uid, info) } diff --git a/modules/stonehenge/modelworldbuff.go b/modules/stonehenge/modelworldbuff.go deleted file mode 100644 index 4352680d6..000000000 --- a/modules/stonehenge/modelworldbuff.go +++ /dev/null @@ -1,54 +0,0 @@ -package stonehenge - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/mgo" - "go_dreamfactory/modules" - "go_dreamfactory/pb" - "go_dreamfactory/utils" - - "go.mongodb.org/mongo-driver/bson/primitive" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/x/bsonx" -) - -// 世界buff -type MWorldBuff struct { - modules.MCompModel - module *Stonehenge -} - -//组件初始化接口 -func (this *MWorldBuff) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { - this.TableName = comm.TableWorldBuff - this.MCompModel.Init(service, module, comp, opt) - this.module = module.(*Stonehenge) - - //创建uid索引 - this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ - Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, - }) - return -} -func (this *MWorldBuff) GetStonehengeData(uid string) *pb.DBStonehenge { - stone := &pb.DBStonehenge{} - if err := this.Get(uid, stone); err != nil && mgo.MongodbNil == err { // 创建一条初始的数据 - stone.Id = primitive.NewObjectID().Hex() - stone.Uid = uid - stone.Rooms = nil // 注意初始房间为空 - stone.Userbuff = make(map[int32]int32, 0) - stone.Reward = make(map[int32]bool, 0) - stone.Addweight = make(map[int32]int32, 0) - stone.Etime = utils.WeekIntervalTime() - this.Add(uid, stone) - return nil - } - return stone -} - -// 修改石阵信息 -func (this *MWorldBuff) ChangeStonehengeData(uid string, update map[string]interface{}) (err error) { - - return this.Change(uid, update) -} diff --git a/pb/stonehenge_db.pb.go b/pb/stonehenge_db.pb.go index d9b2f29cc..3ffa422cd 100644 --- a/pb/stonehenge_db.pb.go +++ b/pb/stonehenge_db.pb.go @@ -74,15 +74,14 @@ type RoomData struct { Portal []int32 `protobuf:"varint,2,rep,packed,name=portal,proto3" json:"portal"` // 传送门id Selectbuff []int32 `protobuf:"varint,3,rep,packed,name=selectbuff,proto3" json:"selectbuff"` // 给前端显示的buff 组 // map group = 4; // 事件组 - Complete bool `protobuf:"varint,5,opt,name=complete,proto3" json:"complete"` // 房间是否通关 - Index int32 `protobuf:"varint,6,opt,name=index,proto3" json:"index"` // 房间索引 - Roomid int32 `protobuf:"varint,7,opt,name=roomid,proto3" json:"roomid"` // 房间id - Hero []string `protobuf:"bytes,8,rep,name=hero,proto3" json:"hero"` //上阵英雄 继承血量用 - Box map[int32]int32 `protobuf:"bytes,9,rep,name=box,proto3" json:"box" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 宝箱事件 - Story int32 `protobuf:"varint,10,opt,name=story,proto3" json:"story"` // 剧情id - Shop map[int32]int32 `protobuf:"bytes,11,rep,name=shop,proto3" json:"shop" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 商店 - Passive map[int32]int32 `protobuf:"bytes,12,rep,name=passive,proto3" json:"passive" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 被动事件 - Selectcount int32 `protobuf:"varint,13,opt,name=selectcount,proto3" json:"selectcount"` //三选一事件次数 + Complete bool `protobuf:"varint,5,opt,name=complete,proto3" json:"complete"` // 房间是否通关 + Index int32 `protobuf:"varint,6,opt,name=index,proto3" json:"index"` // 房间索引 + Roomid int32 `protobuf:"varint,7,opt,name=roomid,proto3" json:"roomid"` // 房间id + Hero []string `protobuf:"bytes,8,rep,name=hero,proto3" json:"hero"` //上阵英雄 继承血量用 + Box map[int32]int32 `protobuf:"bytes,9,rep,name=box,proto3" json:"box" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 宝箱事件 + Story int32 `protobuf:"varint,10,opt,name=story,proto3" json:"story"` // 剧情id + Shop map[int32]int32 `protobuf:"bytes,11,rep,name=shop,proto3" json:"shop" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 商店 + Passive map[int32]int32 `protobuf:"bytes,12,rep,name=passive,proto3" json:"passive" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 被动事件 } func (x *RoomData) Reset() { @@ -194,13 +193,6 @@ func (x *RoomData) GetPassive() map[int32]int32 { return nil } -func (x *RoomData) GetSelectcount() int32 { - if x != nil { - return x.Selectcount - } - return 0 -} - type DBStonehenge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -208,22 +200,25 @@ type DBStonehenge struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` - StageID int32 `protobuf:"varint,3,opt,name=stageID,proto3" json:"stageID"` // 关卡id - CurRoomIndes int32 `protobuf:"varint,4,opt,name=curRoomIndes,proto3" json:"curRoomIndes"` // 当前房间索引 初始 0 每通关一次+1 - Rooms *RoomData `protobuf:"bytes,5,opt,name=rooms,proto3" json:"rooms"` // 当前房间信息 - Webuff []int32 `protobuf:"varint,6,rep,packed,name=webuff,proto3" json:"webuff"` // 我方环境buff 不能被更改 - Enemybuff []int32 `protobuf:"varint,7,rep,packed,name=enemybuff,proto3" json:"enemybuff"` // 地方环境buff 不能被更改 - Userbuff map[int32]int32 `protobuf:"bytes,8,rep,name=userbuff,proto3" json:"userbuff" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 玩家获得的buff key:buffid value:0 - Hero map[string]*BattleRole `protobuf:"bytes,9,rep,name=hero,proto3" json:"hero" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 英雄信息 - Reward map[int32]bool `protobuf:"bytes,10,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 是否首通 key:stageid - Addweight map[int32]int32 `protobuf:"bytes,11,rep,name=addweight,proto3" json:"addweight" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 选择buff权重增加 key 类型 - Etime int64 `protobuf:"varint,12,opt,name=etime,proto3" json:"etime"` // 结算时间 - Talent map[int32]bool `protobuf:"bytes,13,rep,name=talent,proto3" json:"talent" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //天赋树 - Talentproperty map[string]int32 `protobuf:"bytes,14,rep,name=talentproperty,proto3" json:"talentproperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //天赋属性 - Privilege []StonehengePrivilege `protobuf:"varint,15,rep,packed,name=privilege,proto3,enum=StonehengePrivilege" json:"privilege"` //解锁特权 - Integral int32 `protobuf:"varint,16,opt,name=integral,proto3" json:"integral"` //积分 - Weeklyreward map[int32]bool `protobuf:"bytes,17,rep,name=weeklyreward,proto3" json:"weeklyreward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //周长奖励领取 - Task map[int32]bool `protobuf:"bytes,18,rep,name=task,proto3" json:"task" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //已领取的任务 + StageID int32 `protobuf:"varint,3,opt,name=stageID,proto3" json:"stageID"` // 关卡id + CurRoomIndes int32 `protobuf:"varint,4,opt,name=curRoomIndes,proto3" json:"curRoomIndes"` // 当前房间索引 初始 0 每通关一次+1 + Rooms *RoomData `protobuf:"bytes,5,opt,name=rooms,proto3" json:"rooms"` // 当前房间信息 + Webuff []int32 `protobuf:"varint,6,rep,packed,name=webuff,proto3" json:"webuff"` // 我方环境buff 不能被更改 + Enemybuff []int32 `protobuf:"varint,7,rep,packed,name=enemybuff,proto3" json:"enemybuff"` // 地方环境buff 不能被更改 + Userbuff map[int32]int32 `protobuf:"bytes,8,rep,name=userbuff,proto3" json:"userbuff" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 玩家获得的buff key:buffid value:0 + Hero map[string]*BattleRole `protobuf:"bytes,9,rep,name=hero,proto3" json:"hero" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 英雄信息 + Reward map[int32]bool `protobuf:"bytes,10,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 是否首通 key:stageid + Addweight map[int32]int32 `protobuf:"bytes,11,rep,name=addweight,proto3" json:"addweight" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 选择buff权重增加 key 类型 + Etime int64 `protobuf:"varint,12,opt,name=etime,proto3" json:"etime"` // 结算时间 + Talent map[int32]bool `protobuf:"bytes,13,rep,name=talent,proto3" json:"talent" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //天赋树 + Talentproperty map[string]int32 `protobuf:"bytes,14,rep,name=talentproperty,proto3" json:"talentproperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //天赋属性 + Privilege []StonehengePrivilege `protobuf:"varint,15,rep,packed,name=privilege,proto3,enum=StonehengePrivilege" json:"privilege"` //解锁特权 + Integral int32 `protobuf:"varint,16,opt,name=integral,proto3" json:"integral"` //积分 + Weeklyreward map[int32]bool `protobuf:"bytes,17,rep,name=weeklyreward,proto3" json:"weeklyreward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //周长奖励领取 + Task map[int32]bool `protobuf:"bytes,18,rep,name=task,proto3" json:"task" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //已领取的任务 + PrivilegeEvent map[int32]int32 `protobuf:"bytes,19,rep,name=privilegeEvent,proto3" json:"privilegeEvent" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 记录特权完成情况 + Selectcount int32 `protobuf:"varint,20,opt,name=selectcount,proto3" json:"selectcount"` //三选一事件次数 + Resetcount int32 `protobuf:"varint,21,opt,name=resetcount,proto3" json:"resetcount"` //三选一事件重置次数 } func (x *DBStonehenge) Reset() { @@ -384,6 +379,27 @@ func (x *DBStonehenge) GetTask() map[int32]bool { return nil } +func (x *DBStonehenge) GetPrivilegeEvent() map[int32]int32 { + if x != nil { + return x.PrivilegeEvent + } + return nil +} + +func (x *DBStonehenge) GetSelectcount() int32 { + if x != nil { + return x.Selectcount + } + return 0 +} + +func (x *DBStonehenge) GetResetcount() int32 { + if x != nil { + return x.Resetcount + } + return 0 +} + type StageData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -636,7 +652,7 @@ var file_stonehenge_stonehenge_db_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2f, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, - 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, 0x04, 0x0a, 0x08, 0x52, 0x6f, 0x6f, + 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x04, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, @@ -659,146 +675,157 @@ var file_stonehenge_stonehenge_db_proto_rawDesc = []byte{ 0x6f, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x61, 0x73, - 0x73, 0x69, 0x76, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x69, - 0x64, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x36, 0x0a, 0x08, 0x42, 0x6f, 0x78, 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, 0x1a, 0x37, 0x0a, 0x09, 0x53, 0x68, - 0x6f, 0x70, 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, 0x1a, 0x3a, 0x0a, 0x0c, 0x50, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 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, - 0xe4, 0x09, 0x0a, 0x0c, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, - 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, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, - 0x63, 0x75, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x73, - 0x12, 0x1f, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x72, 0x6f, 0x6f, 0x6d, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x62, 0x75, 0x66, 0x66, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x06, 0x77, 0x65, 0x62, 0x75, 0x66, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x65, - 0x6d, 0x79, 0x62, 0x75, 0x66, 0x66, 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x65, 0x6e, - 0x65, 0x6d, 0x79, 0x62, 0x75, 0x66, 0x66, 0x12, 0x37, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x62, - 0x75, 0x66, 0x66, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x53, 0x74, - 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, - 0x66, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, - 0x12, 0x2b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x48, 0x65, - 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x31, 0x0a, - 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x12, 0x3a, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0b, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, - 0x67, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, - 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, - 0x65, 0x2e, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, - 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0e, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x54, 0x61, 0x6c, - 0x65, 0x6e, 0x74, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0e, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x12, 0x32, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x18, 0x0f, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, - 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x76, 0x69, - 0x6c, 0x65, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, - 0x12, 0x43, 0x0a, 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, - 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x57, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x2b, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x12, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, - 0x67, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, - 0x73, 0x6b, 0x1a, 0x3b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 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, 0x1a, - 0x44, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, + 0x73, 0x69, 0x76, 0x65, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x3c, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 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, 0x1a, 0x39, - 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x65, 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, 0x08, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x54, 0x61, 0x6c, - 0x65, 0x6e, 0x74, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 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, 0x11, - 0x57, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, + 0x1a, 0x36, 0x0a, 0x08, 0x42, 0x6f, 0x78, 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, 0x1a, 0x37, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70, + 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, 0x1a, 0x3a, 0x0a, 0x0c, 0x50, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x37, 0x0a, - 0x09, 0x54, 0x61, 0x73, 0x6b, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5f, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x67, 0x65, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x65, 0x62, 0x75, 0x66, 0x66, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x65, 0x62, 0x75, 0x66, - 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x65, 0x6d, 0x79, 0x62, 0x75, 0x66, 0x66, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x65, 0x6e, 0x65, 0x6d, 0x79, 0x62, 0x75, 0x66, 0x66, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x22, 0xa8, 0x01, 0x0a, 0x0b, 0x44, 0x42, 0x53, 0x74, - 0x6f, 0x6e, 0x65, 0x42, 0x6f, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x09, 0x62, 0x6f, 0x73, 0x73, 0x73, - 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x53, - 0x74, 0x6f, 0x6e, 0x65, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x42, 0x6f, 0x73, 0x73, 0x73, 0x74, 0x61, - 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x62, 0x6f, 0x73, 0x73, 0x73, 0x74, 0x61, - 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x48, 0x0a, 0x0e, 0x42, 0x6f, 0x73, 0x73, - 0x73, 0x74, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x53, 0x74, - 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0xba, 0x01, 0x0a, 0x10, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, - 0x6e, 0x67, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 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, 0x32, 0x0a, 0x05, 0x61, 0x77, 0x61, - 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, - 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x2e, 0x41, 0x77, 0x61, 0x72, - 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x50, 0x0a, - 0x0a, 0x41, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x44, - 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x41, - 0x77, 0x61, 0x72, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0xb6, 0x01, 0x0a, 0x15, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, - 0x42, 0x6f, 0x6f, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, - 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, - 0x6e, 0x67, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x53, 0x74, 0x61, - 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x1a, 0x38, - 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb4, 0x0b, + 0x0a, 0x0c, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 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, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x75, + 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0c, 0x63, 0x75, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x73, 0x12, 0x1f, + 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, + 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x77, 0x65, 0x62, 0x75, 0x66, 0x66, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, + 0x06, 0x77, 0x65, 0x62, 0x75, 0x66, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x65, 0x6d, 0x79, + 0x62, 0x75, 0x66, 0x66, 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x65, 0x6e, 0x65, 0x6d, + 0x79, 0x62, 0x75, 0x66, 0x66, 0x12, 0x37, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, + 0x66, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, + 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x12, 0x2b, + 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, + 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x48, 0x65, 0x72, 0x6f, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x31, 0x0a, 0x06, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, + 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x3a, + 0x0a, 0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, + 0x2e, 0x41, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, + 0x12, 0x31, 0x0a, 0x06, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, + 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x61, 0x6c, + 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0e, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x44, 0x42, + 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x54, 0x61, 0x6c, 0x65, 0x6e, + 0x74, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, + 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x32, + 0x0a, 0x09, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x18, 0x0f, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, + 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, + 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x43, + 0x0a, 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x11, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, + 0x6e, 0x67, 0x65, 0x2e, 0x57, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x12, 0x2b, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x12, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, + 0x12, 0x49, 0x0a, 0x0e, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, + 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x72, 0x69, + 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, + 0x0a, 0x72, 0x65, 0x73, 0x65, 0x74, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x74, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x3b, 0x0a, + 0x0d, 0x55, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 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, 0x1a, 0x44, 0x0a, 0x09, 0x48, 0x65, + 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 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, 0x08, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x41, + 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 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, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x61, 0x6c, + 0x65, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 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, 0x11, 0x57, 0x65, 0x65, 0x6b, 0x6c, + 0x79, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 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, 0x08, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x33, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, - 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x12, - 0x1c, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, - 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x5f, 0x4e, 0x6f, 0x6c, 0x6c, 0x10, 0x00, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, + 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x45, 0x76, + 0x65, 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, 0x5f, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x65, 0x62, 0x75, 0x66, 0x66, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x65, 0x62, 0x75, 0x66, 0x66, 0x12, + 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x65, 0x6d, 0x79, 0x62, 0x75, 0x66, 0x66, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x05, 0x52, 0x09, 0x65, 0x6e, 0x65, 0x6d, 0x79, 0x62, 0x75, 0x66, 0x66, 0x12, 0x16, 0x0a, + 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, + 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x22, 0xa8, 0x01, 0x0a, 0x0b, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, + 0x65, 0x42, 0x6f, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x09, 0x62, 0x6f, 0x73, 0x73, 0x73, 0x74, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, + 0x6e, 0x65, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x42, 0x6f, 0x73, 0x73, 0x73, 0x74, 0x61, 0x67, 0x65, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x62, 0x6f, 0x73, 0x73, 0x73, 0x74, 0x61, 0x67, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x48, 0x0a, 0x0e, 0x42, 0x6f, 0x73, 0x73, 0x73, 0x74, + 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x53, 0x74, 0x61, 0x67, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xba, 0x01, 0x0a, 0x10, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, + 0x65, 0x42, 0x6f, 0x6f, 0x6b, 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, 0x32, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, + 0x68, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x50, 0x0a, 0x0a, 0x41, + 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x44, 0x42, 0x53, + 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x41, 0x77, 0x61, + 0x72, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb6, 0x01, + 0x0a, 0x15, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x6f, + 0x6f, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, + 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x1a, 0x38, 0x0a, 0x0a, + 0x53, 0x74, 0x61, 0x67, 0x65, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x33, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, + 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x12, 0x1c, 0x0a, + 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, + 0x6c, 0x65, 0x67, 0x65, 0x5f, 0x4e, 0x6f, 0x6c, 0x6c, 0x10, 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -814,7 +841,7 @@ func file_stonehenge_stonehenge_db_proto_rawDescGZIP() []byte { } var file_stonehenge_stonehenge_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_stonehenge_stonehenge_db_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_stonehenge_stonehenge_db_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_stonehenge_stonehenge_db_proto_goTypes = []interface{}{ (StonehengePrivilege)(0), // 0: StonehengePrivilege (*RoomData)(nil), // 1: RoomData @@ -835,10 +862,11 @@ var file_stonehenge_stonehenge_db_proto_goTypes = []interface{}{ nil, // 16: DBStonehenge.TalentpropertyEntry nil, // 17: DBStonehenge.WeeklyrewardEntry nil, // 18: DBStonehenge.TaskEntry - nil, // 19: DBStoneBoss.BossstageEntry - nil, // 20: DBStonehengeBook.AwardEntry - nil, // 21: DBStonehengeBookAward.StageEntry - (*BattleRole)(nil), // 22: BattleRole + nil, // 19: DBStonehenge.PrivilegeEventEntry + nil, // 20: DBStoneBoss.BossstageEntry + nil, // 21: DBStonehengeBook.AwardEntry + nil, // 22: DBStonehengeBookAward.StageEntry + (*BattleRole)(nil), // 23: BattleRole } var file_stonehenge_stonehenge_db_proto_depIdxs = []int32{ 7, // 0: RoomData.eventid:type_name -> RoomData.EventidEntry @@ -855,17 +883,18 @@ var file_stonehenge_stonehenge_db_proto_depIdxs = []int32{ 0, // 11: DBStonehenge.privilege:type_name -> StonehengePrivilege 17, // 12: DBStonehenge.weeklyreward:type_name -> DBStonehenge.WeeklyrewardEntry 18, // 13: DBStonehenge.task:type_name -> DBStonehenge.TaskEntry - 19, // 14: DBStoneBoss.bossstage:type_name -> DBStoneBoss.BossstageEntry - 20, // 15: DBStonehengeBook.award:type_name -> DBStonehengeBook.AwardEntry - 21, // 16: DBStonehengeBookAward.stage:type_name -> DBStonehengeBookAward.StageEntry - 22, // 17: DBStonehenge.HeroEntry.value:type_name -> BattleRole - 3, // 18: DBStoneBoss.BossstageEntry.value:type_name -> StageData - 6, // 19: DBStonehengeBook.AwardEntry.value:type_name -> DBStonehengeBookAward - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 19, // 14: DBStonehenge.privilegeEvent:type_name -> DBStonehenge.PrivilegeEventEntry + 20, // 15: DBStoneBoss.bossstage:type_name -> DBStoneBoss.BossstageEntry + 21, // 16: DBStonehengeBook.award:type_name -> DBStonehengeBook.AwardEntry + 22, // 17: DBStonehengeBookAward.stage:type_name -> DBStonehengeBookAward.StageEntry + 23, // 18: DBStonehenge.HeroEntry.value:type_name -> BattleRole + 3, // 19: DBStoneBoss.BossstageEntry.value:type_name -> StageData + 6, // 20: DBStonehengeBook.AwardEntry.value:type_name -> DBStonehengeBookAward + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_stonehenge_stonehenge_db_proto_init() } @@ -954,7 +983,7 @@ func file_stonehenge_stonehenge_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_stonehenge_stonehenge_db_proto_rawDesc, NumEnums: 1, - NumMessages: 21, + NumMessages: 22, NumExtensions: 0, NumServices: 0, }, From b77b4d80259b7e15df43af4a78c04fe90cad973c Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 16 Aug 2023 18:09:39 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E7=89=B9=E6=9D=83=E5=A4=84=E7=90=86=20?= =?UTF-8?q?=E7=B4=AF=E8=AE=A1=E9=80=89=E6=8B=A93=E4=B8=AA=E5=85=B3?= =?UTF-8?q?=E5=8D=A1=E5=BC=80=E5=B1=80=E6=89=80=E9=80=89=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84buff=E5=90=8E=EF=BC=8C=E5=8F=AF=E9=A2=9D=E5=A4=96?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=B8=80=E6=AC=A1=E9=9A=8F=E6=9C=BAbuff?= =?UTF-8?q?=E4=B8=89=E9=80=89=E4=B8=80=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/stonehenge/api_event.go | 39 ++++++++++++++++----------- pb/stonehenge_db.pb.go | 48 +++++++++++++++++++++++++++++---- 2 files changed, 66 insertions(+), 21 deletions(-) diff --git a/modules/stonehenge/api_event.go b/modules/stonehenge/api_event.go index 7f1ac7305..9cd633a14 100644 --- a/modules/stonehenge/api_event.go +++ b/modules/stonehenge/api_event.go @@ -104,19 +104,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq update["userbuff"] = stone.Userbuff this.module.modelStonehengeBook.addStonehengeBook(session.GetUserId(), conf.Type, conf.SkillId) } - // 查特权 - for _, v := range stone.Privilege { - if v == 3 { // - // 记录buff 三选一的次数 - stone.Selectcount++ - if stone.Selectcount == 3 { //可额外触发一次随机buff三选一事件 - if c, err := this.module.configure.getGameStonePrivilegeData(3); err != nil { - newEvent = c.Value1 - } - } - break - } - } + stone.Selectcount++ // 记录三选一的次数 } else { // 参数错误 errdata = &pb.ErrorData{ @@ -355,14 +343,33 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq } } update["userbuff"] = stone.Userbuff - } - stone.Rooms.Eventid[req.Eventid] = true // // 校验事件有后续事件 - if newEvent == 0 && eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中 + if eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中 newEvent = eventConf.PostEvent this.module.modelStonehenge.AddNewEvent([]int32{eventConf.PostEvent}, stone) + } else { // 没有后置事件的事件处理特权事件 + // 查特权 + for _, v := range stone.Privilege { + if v == pb.StonehengePrivilege_StonehengePrivilege_4 || + v == pb.StonehengePrivilege_StonehengePrivilege_5 || + v == pb.StonehengePrivilege_StonehengePrivilege_6 { // 4 5 6 特权 + if p, err := this.module.configure.getGameStonePrivilegeData(int32(v)); err != nil { + if stone.Selectcount > p.Value2 { // 达到指定次数 + if _, ok := stone.PrivilegeEvent[int32(v)]; !ok { + // 记录buff 三选一的次数 + if stone.Selectcount == p.Value2 { //可额外触发一次随机buff三选一事件 + if c, err := this.module.configure.getGameStonePrivilegeData(3); err != nil { + newEvent = c.Value1 + } + } + } + } + } + break + } + } } stone.Rooms.Complete = true for _, v := range roomConf.Condition { diff --git a/pb/stonehenge_db.pb.go b/pb/stonehenge_db.pb.go index 3ffa422cd..a8e1c0205 100644 --- a/pb/stonehenge_db.pb.go +++ b/pb/stonehenge_db.pb.go @@ -25,15 +25,39 @@ type StonehengePrivilege int32 const ( StonehengePrivilege_StonehengePrivilege_Noll StonehengePrivilege = 0 + StonehengePrivilege_StonehengePrivilege_1 StonehengePrivilege = 1 //解锁“事件商店”中,复活事件 + StonehengePrivilege_StonehengePrivilege_2 StonehengePrivilege = 2 //解锁“事件商店”中,支援事件 + StonehengePrivilege_StonehengePrivilege_3 StonehengePrivilege = 3 //解锁“事件商店”中,更换buff事件 + StonehengePrivilege_StonehengePrivilege_4 StonehengePrivilege = 4 //累计选择3个关卡开局所选类型的buff后,可额外触发一次随机buff三选一事件 + StonehengePrivilege_StonehengePrivilege_5 StonehengePrivilege = 5 //累计选择6个关卡开局所选类型的buff后,可额外触发一次随机buff三选一事件 + StonehengePrivilege_StonehengePrivilege_6 StonehengePrivilege = 6 //累计选择10个所选类型的buff后,可额外触发一次随机buff三选一事件 + StonehengePrivilege_StonehengePrivilege_7 StonehengePrivilege = 7 //随机buff三选一事件,新增重置功能 + StonehengePrivilege_StonehengePrivilege_8 StonehengePrivilege = 8 //每次进入关卡时,玩家会增加指定数量的道具(必定为item类型) ) // Enum value maps for StonehengePrivilege. var ( StonehengePrivilege_name = map[int32]string{ 0: "StonehengePrivilege_Noll", + 1: "StonehengePrivilege_1", + 2: "StonehengePrivilege_2", + 3: "StonehengePrivilege_3", + 4: "StonehengePrivilege_4", + 5: "StonehengePrivilege_5", + 6: "StonehengePrivilege_6", + 7: "StonehengePrivilege_7", + 8: "StonehengePrivilege_8", } StonehengePrivilege_value = map[string]int32{ "StonehengePrivilege_Noll": 0, + "StonehengePrivilege_1": 1, + "StonehengePrivilege_2": 2, + "StonehengePrivilege_3": 3, + "StonehengePrivilege_4": 4, + "StonehengePrivilege_5": 5, + "StonehengePrivilege_6": 6, + "StonehengePrivilege_7": 7, + "StonehengePrivilege_8": 8, } ) @@ -821,11 +845,25 @@ var file_stonehenge_stonehenge_db_proto_rawDesc = []byte{ 0x53, 0x74, 0x61, 0x67, 0x65, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x33, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, - 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x12, 0x1c, 0x0a, - 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, - 0x6c, 0x65, 0x67, 0x65, 0x5f, 0x4e, 0x6f, 0x6c, 0x6c, 0x10, 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x8b, 0x02, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, + 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x12, 0x1c, + 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, + 0x69, 0x6c, 0x65, 0x67, 0x65, 0x5f, 0x4e, 0x6f, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, + 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, + 0x65, 0x67, 0x65, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x74, 0x6f, 0x6e, 0x65, + 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x5f, 0x32, + 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, + 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x5f, 0x33, 0x10, 0x03, 0x12, 0x19, 0x0a, + 0x15, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, + 0x6c, 0x65, 0x67, 0x65, 0x5f, 0x34, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x74, 0x6f, 0x6e, + 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x5f, + 0x35, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, + 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x5f, 0x36, 0x10, 0x06, 0x12, 0x19, + 0x0a, 0x15, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, + 0x69, 0x6c, 0x65, 0x67, 0x65, 0x5f, 0x37, 0x10, 0x07, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x74, 0x6f, + 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, + 0x5f, 0x38, 0x10, 0x08, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( From 9fce1aa3f2588d4cf52bb3eb6e777e3b3e83a264 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 16 Aug 2023 18:35:34 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E9=87=8D=E7=BD=AEbuff=20=E4=B8=89=E9=80=89?= =?UTF-8?q?=E4=B8=80=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/stonehenge/api_resetbuff.go | 67 +++++++++++++++++++++++++++++ pb/errorcode.pb.go | 27 +++++++----- 2 files changed, 83 insertions(+), 11 deletions(-) create mode 100644 modules/stonehenge/api_resetbuff.go diff --git a/modules/stonehenge/api_resetbuff.go b/modules/stonehenge/api_resetbuff.go new file mode 100644 index 000000000..f1e34348f --- /dev/null +++ b/modules/stonehenge/api_resetbuff.go @@ -0,0 +1,67 @@ +package stonehenge + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +//参数校验 +func (this *apiComp) ResetBuffCheck(session comm.IUserSession, req *pb.StonehengeResetBuffReq) (errdata *pb.ErrorData) { + + return +} + +// 结算房间 +func (this *apiComp) ResetBuff(session comm.IUserSession, req *pb.StonehengeResetBuffReq) (errdata *pb.ErrorData) { + var ( + stone *pb.DBStonehenge + update map[string]interface{} + err error + ) + update = make(map[string]interface{}) + if errdata = this.ResetBuffCheck(session, req); errdata != nil { + return + } + + if stone, err = this.module.modelStonehenge.GetStonehengeData(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.String(), + Message: err.Error(), + } + return + } + // 检查特权 + if stone.Resetcount == 0 { + for _, v := range stone.Privilege { + if v == pb.StonehengePrivilege_StonehengePrivilege_7 { //随机buff三选一事件,新增重置功能 + if eventConf, err := this.module.configure.GetStoneEventDataById(req.Eventid); err != nil { + //if p, err := this.module.configure.getGameStonePrivilegeData(int32(v)); err != nil { + for _, v := range stone.Addweight { // 这个map 目前只会存在一条数据 + ownerbuff := make(map[int32]struct{}, 0) + for k := range stone.Userbuff { + ownerbuff[k] = struct{}{} + } + stone.Rooms.Selectbuff = this.module.configure.GetBuffGroupDataByLottery(eventConf.Value1, v, ownerbuff) + stone.Resetcount += 1 + + // 更新数据 + update["rooms"] = stone.Rooms + update["resetcount"] = stone.Resetcount + this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update) + session.SendMsg(string(this.module.GetType()), "resetbuff", &pb.StonehengeResetBuffResp{ + Selectbuff: stone.Rooms.Selectbuff, + }) + return + } + } + break + } + } + } + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_StonehengebuffResetErr, + Title: pb.ErrorCode_StonehengebuffResetErr.String(), + } + return +} diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go index 9b6489098..9117cc52b 100644 --- a/pb/errorcode.pb.go +++ b/pb/errorcode.pb.go @@ -429,6 +429,7 @@ const ( ErrorCode_StonehengeStoreMax ErrorCode = 4909 // 购买上限 ErrorCode_StonehengeCantBuy ErrorCode = 4910 // 已有事件不能重复购买 ErrorCode_StonehengeHeroRepeated ErrorCode = 4911 // 重复英雄 + ErrorCode_StonehengebuffResetErr ErrorCode = 4912 // 三选一重置失败 // 活动错误码 ErrorCode_ActivityOver ErrorCode = 5001 //活动结束 ErrorCode_ActivityUnOpened ErrorCode = 5002 // 活动未开启 @@ -805,6 +806,7 @@ var ( 4909: "StonehengeStoreMax", 4910: "StonehengeCantBuy", 4911: "StonehengeHeroRepeated", + 4912: "StonehengebuffResetErr", 5001: "ActivityOver", 5002: "ActivityUnOpened", 5003: "ActivityRepatReward", @@ -1177,6 +1179,7 @@ var ( "StonehengeStoreMax": 4909, "StonehengeCantBuy": 4910, "StonehengeHeroRepeated": 4911, + "StonehengebuffResetErr": 4912, "ActivityOver": 5001, "ActivityUnOpened": 5002, "ActivityRepatReward": 5003, @@ -1217,7 +1220,7 @@ var File_errorcode_proto protoreflect.FileDescriptor var file_errorcode_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2a, 0xc8, 0x44, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x6f, 0x2a, 0xe5, 0x44, 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, 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, @@ -1757,16 +1760,18 @@ var file_errorcode_proto_rawDesc = []byte{ 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x42, 0x75, 0x79, 0x10, 0xae, 0x26, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0xaf, - 0x26, 0x12, 0x11, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x76, 0x65, - 0x72, 0x10, 0x89, 0x27, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x55, 0x6e, 0x4f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x10, 0x8a, 0x27, 0x12, 0x18, 0x0a, 0x13, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x61, 0x74, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x10, 0x8b, 0x27, 0x12, 0x16, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, - 0x79, 0x4e, 0x6f, 0x74, 0x49, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x10, 0x8c, 0x27, 0x12, 0x14, 0x0a, - 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x10, 0x8d, 0x27, 0x12, 0x17, 0x0a, 0x12, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x43, - 0x61, 0x6e, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0x8e, 0x27, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x26, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x62, + 0x75, 0x66, 0x66, 0x52, 0x65, 0x73, 0x65, 0x74, 0x45, 0x72, 0x72, 0x10, 0xb0, 0x26, 0x12, 0x11, + 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x76, 0x65, 0x72, 0x10, 0x89, + 0x27, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x55, 0x6e, 0x4f, + 0x70, 0x65, 0x6e, 0x65, 0x64, 0x10, 0x8a, 0x27, 0x12, 0x18, 0x0a, 0x13, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x61, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, + 0x8b, 0x27, 0x12, 0x16, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4e, 0x6f, + 0x74, 0x49, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x10, 0x8c, 0x27, 0x12, 0x14, 0x0a, 0x0f, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x10, 0x8d, 0x27, + 0x12, 0x17, 0x0a, 0x12, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x43, 0x61, 0x6e, 0x74, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0x8e, 0x27, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From f595e78333a59c35dfe2c6a6763e001598766c17 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 17 Aug 2023 09:33:00 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 2 +- modules/hero/module.go | 3 ++- modules/modulebase.go | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/comm/imodule.go b/comm/imodule.go index 08e4cf811..a1160f467 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -91,7 +91,7 @@ type ( QueryHeroByConfId(uId string, heroCfgId string) (hero *pb.DBHero) // 批量创建英雄 - CreateRepeatHeros(session IUserSession, heros map[string]int32, bPush bool) (hero *pb.DBHero, atno []*pb.UserAtno, errdata *pb.ErrorData) + CreateRepeatHeros(session IUserSession, heros map[string]int32, bPush bool) (atno []*pb.UserAtno, errdata *pb.ErrorData) // 获取英雄 // heroId 英雄ID GetHeroByObjID(uid, heroId string) (hero *pb.DBHero, errdata *pb.ErrorData) diff --git a/modules/hero/module.go b/modules/hero/module.go index 13f9716c8..ac67d00f8 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -273,11 +273,12 @@ func (this *Hero) EventUserOffline(uid, sessionid string) { } // 批量创建多个英雄 -func (this *Hero) CreateRepeatHeros(session comm.IUserSession, heros map[string]int32, bPush bool) (hero *pb.DBHero, atno []*pb.UserAtno, errdata *pb.ErrorData) { +func (this *Hero) CreateRepeatHeros(session comm.IUserSession, heros map[string]int32, bPush bool) (atno []*pb.UserAtno, errdata *pb.ErrorData) { var ( changeList []*pb.DBHero firstGet []string bFirst bool + hero *pb.DBHero ) for heroCfgId, num := range heros { if num == 0 { // 数量为0 不做处理 diff --git a/modules/modulebase.go b/modules/modulebase.go index 28506fee9..04142a3f9 100644 --- a/modules/modulebase.go +++ b/modules/modulebase.go @@ -486,7 +486,7 @@ func (this *ModuleBase) DispenseRes(session comm.IUserSession, res []*cfg.Gameat this.Debugf("发放道具资源: %v errdata: %v", items, errdata) } if len(heros) > 0 { //卡片资源 - _, _, errdata = this.ModuleHero.CreateRepeatHeros(session, heros, bPush) + _, errdata = this.ModuleHero.CreateRepeatHeros(session, heros, bPush) this.Debugf("发放英雄资源: %v errdata: %v", heros, errdata) } if len(equips) > 0 { @@ -718,7 +718,7 @@ func (this *ModuleBase) DispenseAtno(session comm.IUserSession, res []*cfg.Gamea this.Debugf("发放道具资源: %v errdata: %v", items, errdata) } if len(heros) > 0 { //卡片资源 - if _, heroschange, errdata = this.ModuleHero.CreateRepeatHeros(session, heros, bPush); errdata != nil { + if heroschange, errdata = this.ModuleHero.CreateRepeatHeros(session, heros, bPush); errdata != nil { return } atno = append(atno, heroschange...) From a15be334b07b81b03158d65706a2891ce7a23a76 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 17 Aug 2023 09:53:40 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E8=8E=B7=E5=BE=97=E4=B8=89=E9=80=89?= =?UTF-8?q?=E4=B8=80buff=20=E7=9A=84=E6=97=B6=E5=80=99=E9=9C=80=E9=87=8D?= =?UTF-8?q?=E7=BD=AEbuff=20=E4=B8=89=E9=80=89=E4=B8=80=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/stonehenge/api_event.go | 3 +- modules/stonehenge/api_gotoroom.go | 3 ++ modules/stonehenge/api_resetbuff.go | 6 +-- modules/stonehenge/modelStonehenge.go | 3 +- pb/stonehenge_db.pb.go | 62 +++++++++++++-------------- 5 files changed, 41 insertions(+), 36 deletions(-) diff --git a/modules/stonehenge/api_event.go b/modules/stonehenge/api_event.go index 9cd633a14..13bab8cc3 100644 --- a/modules/stonehenge/api_event.go +++ b/modules/stonehenge/api_event.go @@ -349,6 +349,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq if eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中 newEvent = eventConf.PostEvent this.module.modelStonehenge.AddNewEvent([]int32{eventConf.PostEvent}, stone) + } else { // 没有后置事件的事件处理特权事件 // 查特权 for _, v := range stone.Privilege { @@ -357,7 +358,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq v == pb.StonehengePrivilege_StonehengePrivilege_6 { // 4 5 6 特权 if p, err := this.module.configure.getGameStonePrivilegeData(int32(v)); err != nil { if stone.Selectcount > p.Value2 { // 达到指定次数 - if _, ok := stone.PrivilegeEvent[int32(v)]; !ok { + if _, ok := stone.Privilegeevent[int32(v)]; !ok { // 记录buff 三选一的次数 if stone.Selectcount == p.Value2 { //可额外触发一次随机buff三选一事件 if c, err := this.module.configure.getGameStonePrivilegeData(3); err != nil { diff --git a/modules/stonehenge/api_gotoroom.go b/modules/stonehenge/api_gotoroom.go index 07276ca9c..0f99cfa56 100644 --- a/modules/stonehenge/api_gotoroom.go +++ b/modules/stonehenge/api_gotoroom.go @@ -154,6 +154,9 @@ func (this *apiComp) GotoRoom(session comm.IUserSession, req *pb.StonehengeGotoR } } + // 重置一些信息 + stone.Privilegeevent = map[int32]int32{} + update["privilegeevent"] = stone.Privilegeevent update["rooms"] = stone.Rooms this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update) session.SendMsg(string(this.module.GetType()), "gotoroom", &pb.StonehengeGotoRoomResp{ diff --git a/modules/stonehenge/api_resetbuff.go b/modules/stonehenge/api_resetbuff.go index f1e34348f..503122afe 100644 --- a/modules/stonehenge/api_resetbuff.go +++ b/modules/stonehenge/api_resetbuff.go @@ -32,7 +32,7 @@ func (this *apiComp) ResetBuff(session comm.IUserSession, req *pb.StonehengeRese return } // 检查特权 - if stone.Resetcount == 0 { + if stone.Rooms.Resetcount == 0 { for _, v := range stone.Privilege { if v == pb.StonehengePrivilege_StonehengePrivilege_7 { //随机buff三选一事件,新增重置功能 if eventConf, err := this.module.configure.GetStoneEventDataById(req.Eventid); err != nil { @@ -43,11 +43,11 @@ func (this *apiComp) ResetBuff(session comm.IUserSession, req *pb.StonehengeRese ownerbuff[k] = struct{}{} } stone.Rooms.Selectbuff = this.module.configure.GetBuffGroupDataByLottery(eventConf.Value1, v, ownerbuff) - stone.Resetcount += 1 + stone.Rooms.Resetcount += 1 // 更新数据 update["rooms"] = stone.Rooms - update["resetcount"] = stone.Resetcount + this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update) session.SendMsg(string(this.module.GetType()), "resetbuff", &pb.StonehengeResetBuffResp{ Selectbuff: stone.Rooms.Selectbuff, diff --git a/modules/stonehenge/modelStonehenge.go b/modules/stonehenge/modelStonehenge.go index b08f682dc..02ad7ca77 100644 --- a/modules/stonehenge/modelStonehenge.go +++ b/modules/stonehenge/modelStonehenge.go @@ -68,7 +68,7 @@ func (this *MStonehenge) GetStonehengeData(uid string) (info *pb.DBStonehenge, e Talentproperty: make(map[string]int32), Privilege: make([]pb.StonehengePrivilege, 0), Task: make(map[int32]bool), - PrivilegeEvent: make(map[int32]int32), + Privilegeevent: make(map[int32]int32), } err = this.Add(uid, info) } @@ -127,6 +127,7 @@ func (this *MStonehenge) AddNewEvent(event []int32, stone *pb.DBStonehenge) { ownerbuff[k] = struct{}{} } stone.Rooms.Selectbuff = this.module.configure.GetBuffGroupDataByLottery(newEventConf.Value1, v, ownerbuff) + stone.Rooms.Resetcount = 0 // 重置buff 三选一次数 } case EventType10: // 宝箱事件 if _, ok := stone.Rooms.Box[newEventConf.EventId]; !ok { diff --git a/pb/stonehenge_db.pb.go b/pb/stonehenge_db.pb.go index a8e1c0205..7e3dbad60 100644 --- a/pb/stonehenge_db.pb.go +++ b/pb/stonehenge_db.pb.go @@ -98,14 +98,15 @@ type RoomData struct { Portal []int32 `protobuf:"varint,2,rep,packed,name=portal,proto3" json:"portal"` // 传送门id Selectbuff []int32 `protobuf:"varint,3,rep,packed,name=selectbuff,proto3" json:"selectbuff"` // 给前端显示的buff 组 // map group = 4; // 事件组 - Complete bool `protobuf:"varint,5,opt,name=complete,proto3" json:"complete"` // 房间是否通关 - Index int32 `protobuf:"varint,6,opt,name=index,proto3" json:"index"` // 房间索引 - Roomid int32 `protobuf:"varint,7,opt,name=roomid,proto3" json:"roomid"` // 房间id - Hero []string `protobuf:"bytes,8,rep,name=hero,proto3" json:"hero"` //上阵英雄 继承血量用 - Box map[int32]int32 `protobuf:"bytes,9,rep,name=box,proto3" json:"box" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 宝箱事件 - Story int32 `protobuf:"varint,10,opt,name=story,proto3" json:"story"` // 剧情id - Shop map[int32]int32 `protobuf:"bytes,11,rep,name=shop,proto3" json:"shop" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 商店 - Passive map[int32]int32 `protobuf:"bytes,12,rep,name=passive,proto3" json:"passive" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 被动事件 + Complete bool `protobuf:"varint,5,opt,name=complete,proto3" json:"complete"` // 房间是否通关 + Index int32 `protobuf:"varint,6,opt,name=index,proto3" json:"index"` // 房间索引 + Roomid int32 `protobuf:"varint,7,opt,name=roomid,proto3" json:"roomid"` // 房间id + Hero []string `protobuf:"bytes,8,rep,name=hero,proto3" json:"hero"` //上阵英雄 继承血量用 + Box map[int32]int32 `protobuf:"bytes,9,rep,name=box,proto3" json:"box" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 宝箱事件 + Story int32 `protobuf:"varint,10,opt,name=story,proto3" json:"story"` // 剧情id + Shop map[int32]int32 `protobuf:"bytes,11,rep,name=shop,proto3" json:"shop" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 商店 + Passive map[int32]int32 `protobuf:"bytes,12,rep,name=passive,proto3" json:"passive" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 被动事件 + Resetcount int32 `protobuf:"varint,13,opt,name=resetcount,proto3" json:"resetcount"` //三选一事件重置次数 } func (x *RoomData) Reset() { @@ -217,6 +218,13 @@ func (x *RoomData) GetPassive() map[int32]int32 { return nil } +func (x *RoomData) GetResetcount() int32 { + if x != nil { + return x.Resetcount + } + return 0 +} + type DBStonehenge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -240,9 +248,8 @@ type DBStonehenge struct { Integral int32 `protobuf:"varint,16,opt,name=integral,proto3" json:"integral"` //积分 Weeklyreward map[int32]bool `protobuf:"bytes,17,rep,name=weeklyreward,proto3" json:"weeklyreward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //周长奖励领取 Task map[int32]bool `protobuf:"bytes,18,rep,name=task,proto3" json:"task" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //已领取的任务 - PrivilegeEvent map[int32]int32 `protobuf:"bytes,19,rep,name=privilegeEvent,proto3" json:"privilegeEvent" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 记录特权完成情况 + Privilegeevent map[int32]int32 `protobuf:"bytes,19,rep,name=privilegeevent,proto3" json:"privilegeevent" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 记录特权完成情况 Selectcount int32 `protobuf:"varint,20,opt,name=selectcount,proto3" json:"selectcount"` //三选一事件次数 - Resetcount int32 `protobuf:"varint,21,opt,name=resetcount,proto3" json:"resetcount"` //三选一事件重置次数 } func (x *DBStonehenge) Reset() { @@ -403,9 +410,9 @@ func (x *DBStonehenge) GetTask() map[int32]bool { return nil } -func (x *DBStonehenge) GetPrivilegeEvent() map[int32]int32 { +func (x *DBStonehenge) GetPrivilegeevent() map[int32]int32 { if x != nil { - return x.PrivilegeEvent + return x.Privilegeevent } return nil } @@ -417,13 +424,6 @@ func (x *DBStonehenge) GetSelectcount() int32 { return 0 } -func (x *DBStonehenge) GetResetcount() int32 { - if x != nil { - return x.Resetcount - } - return 0 -} - type StageData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -676,7 +676,7 @@ var file_stonehenge_stonehenge_db_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2f, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, - 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x04, 0x0a, 0x08, 0x52, 0x6f, 0x6f, + 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x04, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, @@ -699,7 +699,9 @@ var file_stonehenge_stonehenge_db_proto_rawDesc = []byte{ 0x6f, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x61, 0x73, - 0x73, 0x69, 0x76, 0x65, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x45, + 0x73, 0x69, 0x76, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x74, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x74, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, @@ -713,7 +715,7 @@ var file_stonehenge_stonehenge_db_proto_rawDesc = []byte{ 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x50, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 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, 0xb4, 0x0b, + 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x94, 0x0b, 0x0a, 0x0c, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 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, @@ -761,15 +763,13 @@ var file_stonehenge_stonehenge_db_proto_rawDesc = []byte{ 0x61, 0x72, 0x64, 0x12, 0x2b, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, - 0x12, 0x49, 0x0a, 0x0e, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x45, 0x76, 0x65, + 0x12, 0x49, 0x0a, 0x0e, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, - 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x72, 0x69, - 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x73, + 0x65, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x72, 0x69, + 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, - 0x0a, 0x72, 0x65, 0x73, 0x65, 0x74, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x74, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x3b, 0x0a, + 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x3b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 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, @@ -801,7 +801,7 @@ var file_stonehenge_stonehenge_db_proto_rawDesc = []byte{ 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x45, 0x76, + 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x65, 0x76, 0x65, 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, @@ -900,7 +900,7 @@ var file_stonehenge_stonehenge_db_proto_goTypes = []interface{}{ nil, // 16: DBStonehenge.TalentpropertyEntry nil, // 17: DBStonehenge.WeeklyrewardEntry nil, // 18: DBStonehenge.TaskEntry - nil, // 19: DBStonehenge.PrivilegeEventEntry + nil, // 19: DBStonehenge.PrivilegeeventEntry nil, // 20: DBStoneBoss.BossstageEntry nil, // 21: DBStonehengeBook.AwardEntry nil, // 22: DBStonehengeBookAward.StageEntry @@ -921,7 +921,7 @@ var file_stonehenge_stonehenge_db_proto_depIdxs = []int32{ 0, // 11: DBStonehenge.privilege:type_name -> StonehengePrivilege 17, // 12: DBStonehenge.weeklyreward:type_name -> DBStonehenge.WeeklyrewardEntry 18, // 13: DBStonehenge.task:type_name -> DBStonehenge.TaskEntry - 19, // 14: DBStonehenge.privilegeEvent:type_name -> DBStonehenge.PrivilegeEventEntry + 19, // 14: DBStonehenge.privilegeevent:type_name -> DBStonehenge.PrivilegeeventEntry 20, // 15: DBStoneBoss.bossstage:type_name -> DBStoneBoss.BossstageEntry 21, // 16: DBStonehengeBook.award:type_name -> DBStonehengeBook.AwardEntry 22, // 17: DBStonehengeBookAward.stage:type_name -> DBStonehengeBookAward.StageEntry From a079a06c7c5063fa03c636c9550264deb6f32d83 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 17 Aug 2023 10:16:29 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E5=95=86=E9=98=9F=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/caravan/api_buyorsell.go | 41 +++++++++++++------------------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/modules/caravan/api_buyorsell.go b/modules/caravan/api_buyorsell.go index 62736b189..32dca4c3e 100644 --- a/modules/caravan/api_buyorsell.go +++ b/modules/caravan/api_buyorsell.go @@ -20,10 +20,13 @@ func (this *apiComp) BuyOrSellCheck(session comm.IUserSession, req *pb.CaravanBu func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSellReq) (errdata *pb.ErrorData) { var ( - update map[string]interface{} - addScore int32 // 收益 - cityInfo *pb.CityInfo - ok bool + update map[string]interface{} + addScore int32 // 收益 + cityInfo *pb.CityInfo + ok bool + sellValue int32 // 任务统计 贩卖货物价值 + buyValue int32 // 任务统计 贩卖货物价值 + sellSpValue int32 // 任务统计 向指定X城市贩卖货物贩卖货物价值 ) update = make(map[string]interface{}) if errdata = this.BuyOrSellCheck(session, req); errdata != nil { @@ -51,7 +54,6 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe // special 城市卖给玩家的商品 // exspecial 城市想要玩家卖给他的商品库 if !req.IsBuy { // 卖给npc - var cb int32 // 成本价 for k, v := range req.Items { // 校验背包数据够不够 @@ -68,10 +70,11 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe cb = items.Price // 获取成本价 price = items.Price bFound := false - for _, v := range cityInfo.Special { - if v == k { + for _, key := range cityInfo.Special { + if key == k { if cityConf, err := this.module.configure.GetCaravanCity(req.City); err == nil { price = cityConf.Specialnum * price / 1000 + sellSpValue += cityConf.Specialnum * price * v / 1000 bFound = true } else { errdata = &pb.ErrorData{ @@ -97,7 +100,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe return } } - + sellValue += price * v if errdata = this.module.DispenseRes(session, []*cfg.Gameatn{{ A: "attr", T: "merchantmoney", @@ -176,7 +179,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe } bFound := false // 计算均价 - totla := caravan.Items[k].Count * caravan.Items[k].Price + buyValue = caravan.Items[k].Count * caravan.Items[k].Price var price int32 price = caravan.Goods[k].Price for _, v := range cityInfo.Special { @@ -194,8 +197,8 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe } caravan.Items[k].Count += v - totla += price * v - caravan.Items[k].Price = totla / caravan.Items[k].Count + buyValue += price * v + caravan.Items[k].Price = buyValue / caravan.Items[k].Count // 同步更新该城市的 出售货物信息 cityInfo.Count[k] += v @@ -256,19 +259,9 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe szTask = append(szTask, comm.GetBuriedParam(comm.Rtype209, req.City, opCount)) } else { // 卖 //向指定X城市贩卖货物,贩卖货物价值需要X虚拟币以上 - var price int32 - for k, v := range req.Items { - - price += caravan.Items[k].Price * v - } - szTask = append(szTask, comm.GetBuriedParam(comm.Rtype210, req.City, price)) - - // 急需货物 - if v, ok := caravan.City[req.City]; ok { - for range v.Exspecial { - - } - } + szTask = append(szTask, comm.GetBuriedParam(comm.Rtype210, req.City, sellValue)) + // Rtype211 TaskType = 211 // 向指定X城市,贩卖价值X虚拟币以上的对应城市急需货物 + szTask = append(szTask, comm.GetBuriedParam(comm.Rtype211, req.City, sellValue)) } szTask = append(szTask, comm.GetBuriedParam(comm.Rtype212, req.City)) // 接取任务后,商队抵达指定城市 go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...) From 06f569a8bafbae4a77d3fa2927ac398067a2b0f6 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 17 Aug 2023 10:21:23 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/caravan/api_buyorsell.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/caravan/api_buyorsell.go b/modules/caravan/api_buyorsell.go index 32dca4c3e..db368e624 100644 --- a/modules/caravan/api_buyorsell.go +++ b/modules/caravan/api_buyorsell.go @@ -261,7 +261,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe //向指定X城市贩卖货物,贩卖货物价值需要X虚拟币以上 szTask = append(szTask, comm.GetBuriedParam(comm.Rtype210, req.City, sellValue)) // Rtype211 TaskType = 211 // 向指定X城市,贩卖价值X虚拟币以上的对应城市急需货物 - szTask = append(szTask, comm.GetBuriedParam(comm.Rtype211, req.City, sellValue)) + szTask = append(szTask, comm.GetBuriedParam(comm.Rtype211, req.City, sellSpValue)) } szTask = append(szTask, comm.GetBuriedParam(comm.Rtype212, req.City)) // 接取任务后,商队抵达指定城市 go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...) From c5b358007b2aaeb505c20775c42e329a725d55e6 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 17 Aug 2023 11:34:00 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E7=A7=98=E5=A2=83=20=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/stonehenge/modelStonehenge.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/stonehenge/modelStonehenge.go b/modules/stonehenge/modelStonehenge.go index 02ad7ca77..8969b15b2 100644 --- a/modules/stonehenge/modelStonehenge.go +++ b/modules/stonehenge/modelStonehenge.go @@ -59,6 +59,7 @@ func (this *MStonehenge) GetStonehengeData(uid string) (info *pb.DBStonehenge, e info = &pb.DBStonehenge{ Id: primitive.NewObjectID().Hex(), Uid: uid, + Rooms: nil, Userbuff: make(map[int32]int32), Reward: make(map[int32]bool), Addweight: make(map[int32]int32), From 28990fea5e21c5c63c40fc1b945ad4aaa58242aa Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 17 Aug 2023 14:24:48 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=B6=88=E8=80=97?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/stonehenge/api_event.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/modules/stonehenge/api_event.go b/modules/stonehenge/api_event.go index 13bab8cc3..1e2e4f7c1 100644 --- a/modules/stonehenge/api_event.go +++ b/modules/stonehenge/api_event.go @@ -190,12 +190,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq // 次数校验 if stone.Rooms.Box[req.Eventid] < eventConf.Value2 { user := this.module.ModuleUser.GetUser(session.GetUserId()) - // 校验消耗是否 - // if len(eventConf.CostItem) > 0 { - // if errdata = this.module.ConsumeRes(session, eventConf.CostItem, true); errdata != nil { - // return - // } - // } + if lotteryward := this.module.ModuleTools.GetGroupDataByLottery(eventConf.Value1, user.Vip, user.Lv); len(lotteryward) > 0 { if errdata, reward = this.module.DispenseAtno(session, lotteryward, true); errdata != nil { this.module.Debugf("Mline lotteryward DispenseRes err:+%v", lotteryward) @@ -376,8 +371,8 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq for _, v := range roomConf.Condition { for k, ok := range stone.Rooms.Eventid { if !ok { - if eventConf, err = this.module.configure.GetStoneEventDataById(k); err == nil { - if eventConf.EventType == v { + if tmp, err := this.module.configure.GetStoneEventDataById(k); err == nil { + if tmp.EventType == v { stone.Rooms.Complete = false break } @@ -399,8 +394,10 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq } } - if errdata = this.module.ConsumeRes(session, eventConf.CostItem, true); errdata != nil { //真正的消耗 - return + if len(eventConf.CostItem) > 0 { + if errdata = this.module.ConsumeRes(session, eventConf.CostItem, true); errdata != nil { //真正的消耗 + return + } } update["rooms"] = stone.Rooms this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)