From d010bb73c37639ad9a85e9a06a2c12a9f4f97781 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 20 Oct 2023 18:28:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=89=8D=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E5=92=8C=E5=A5=BD=E5=8F=8B=E6=8E=A5=E5=8F=A3=20=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E5=90=8C=E5=B1=8F=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 21 +- comm/core.go | 1 + comm/imodule.go | 2 + modules/dcolor/api_info.go | 2 +- modules/dcolor/api_single.go | 2 +- modules/dcolor/core.go | 19 +- modules/dcolor/module.go | 14 +- modules/dcolor/room.go | 6 +- modules/friend/api_cross_addblack.go | 8 +- modules/friend/api_cross_agree.go | 8 +- modules/friend/api_cross_apply.go | 8 +- modules/friend/api_cross_applylist.go | 5 +- modules/friend/api_cross_assisthero.go | 4 +- modules/friend/api_cross_assistherolist.go | 6 +- modules/friend/api_cross_assistlist.go | 8 +- modules/friend/api_cross_blacklist.go | 5 +- modules/friend/api_cross_del.go | 8 +- modules/friend/api_cross_delblack.go | 4 +- modules/friend/api_cross_getrelation.go | 8 +- modules/friend/api_cross_getreward.go | 4 +- modules/friend/api_cross_list.go | 9 +- modules/friend/api_cross_randlist.go | 12 +- modules/friend/api_cross_refuse.go | 6 +- modules/friend/api_cross_search.go | 4 +- modules/friend/api_cross_zan.go | 4 +- modules/friend/api_cross_zanlist.go | 9 +- modules/friend/api_cross_zanreceive.go | 4 +- modules/friend/model_friend.go | 43 +- modules/friend/module.go | 8 +- modules/gateway/agent.go | 14 +- modules/gateway/agentmgr_comp.go | 66 +- modules/gateway/core.go | 2 + modules/gateway/module.go | 12 +- modules/maincity/api.go | 20 + modules/maincity/api_synchpos.go | 31 + modules/maincity/model.go | 48 ++ modules/maincity/module.go | 118 ++++ modules/parkour/ai.go | 2 +- modules/parkour/module.go | 19 +- modules/timer/parkour.go | 6 +- modules/user/model_user.go | 30 + modules/user/module.go | 9 + pb/comm.pb.go | 727 +++++++++++++-------- pb/dcolor_db.pb.go | 143 +--- pb/dcolor_msg.pb.go | 67 +- pb/maincity_db.pb.go | 311 +++++++++ pb/maincity_msg.pb.go | 214 ++++++ pb/parkour_msg.pb.go | 104 +-- services/comp_gateroute.go | 5 +- services/worker/main.go | 4 + 50 files changed, 1568 insertions(+), 626 deletions(-) create mode 100644 modules/maincity/api.go create mode 100644 modules/maincity/api_synchpos.go create mode 100644 modules/maincity/model.go create mode 100644 modules/maincity/module.go create mode 100644 pb/maincity_db.pb.go create mode 100644 pb/maincity_msg.pb.go diff --git a/comm/const.go b/comm/const.go index b5926f44e..8a25513fe 100644 --- a/comm/const.go +++ b/comm/const.go @@ -396,16 +396,17 @@ const ( // RPC服务接口定义处 const ( //Rpc //Gateway 网关消息 - Rpc_GatewayRoute core.Rpc_Key = "Rpc_GatewayRoute" //网关路由 - Rpc_GatewayAgentBind core.Rpc_Key = "Rpc_GatewayAgentBind" //代理绑定 绑定用户Id - Rpc_GatewayAgentUnBind core.Rpc_Key = "Rpc_GatewayAgentUnBind" //代理解绑 解绑用户Id - Rpc_GatewayAgentSendMsg core.Rpc_Key = "Rpc_GatewayAgentSendMsg" //代理发送消息 向用户发送消息 - Rpc_GatewaySendBatchMsg core.Rpc_Key = "Rpc_GatewaySendBatchMsg" //向多个用户发送消息 - Rpc_GatewaySendRadioMsg core.Rpc_Key = "Rpc_GatewaySendRadioMsg" //广播消息 - Rpc_GatewayAgentClose core.Rpc_Key = "Rpc_GatewayAgentClose" //代理关闭 关闭用户连接 - Rpc_GatewayNoticeUserLogin core.Rpc_Key = "Rpc_NoticeUserLogin" //通知用户登录 - Rpc_GatewayNoticeUserCreate core.Rpc_Key = "Rpc_NoticeUserCreate" //通知用户创角 - Rpc_GatewayNoticeUserClose core.Rpc_Key = "Rpc_NoticeUserClose" //通知用户离线 + Rpc_GatewayRoute core.Rpc_Key = "Rpc_GatewayRoute" //网关路由 + Rpc_GatewayAgentBind core.Rpc_Key = "Rpc_GatewayAgentBind" //代理绑定 绑定用户Id + Rpc_GatewayAgentUnBind core.Rpc_Key = "Rpc_GatewayAgentUnBind" //代理解绑 解绑用户Id + Rpc_GatewayAgentSendMsg core.Rpc_Key = "Rpc_GatewayAgentSendMsg" //代理发送消息 向用户发送消息 + Rpc_GatewaySendBatchMsg core.Rpc_Key = "Rpc_GatewaySendBatchMsg" //向多个用户发送消息 + Rpc_GatewaySendBatchMsgByUid core.Rpc_Key = "Rpc_GatewaySendBatchMsgByUid" //向多个用户发送消息 查询uid + Rpc_GatewaySendRadioMsg core.Rpc_Key = "Rpc_GatewaySendRadioMsg" //广播消息 + Rpc_GatewayAgentClose core.Rpc_Key = "Rpc_GatewayAgentClose" //代理关闭 关闭用户连接 + Rpc_GatewayNoticeUserLogin core.Rpc_Key = "Rpc_NoticeUserLogin" //通知用户登录 + Rpc_GatewayNoticeUserCreate core.Rpc_Key = "Rpc_NoticeUserCreate" //通知用户创角 + Rpc_GatewayNoticeUserClose core.Rpc_Key = "Rpc_NoticeUserClose" //通知用户离线 //GM 命令 Rpc_ModuleGMCreateCmd core.Rpc_Key = "Rpc_ModuleGMCreateCmd" //执行GM命令 //Chat 命令 diff --git a/comm/core.go b/comm/core.go index e728e4803..bc5258348 100644 --- a/comm/core.go +++ b/comm/core.go @@ -201,6 +201,7 @@ func UidToSTag(uid string) (stag string, err error) { func GetUserBaseInfo(user *pb.DBUser) *pb.BaseUserInfo { info := &pb.BaseUserInfo{ Uid: user.Uid, + Sid: user.Sid, Name: user.Name, Gender: user.Gender, Skin: user.CurSkin, diff --git a/comm/imodule.go b/comm/imodule.go index 41a9ec082..ae5caf050 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -160,6 +160,8 @@ type ( IGetReddot //获取本服用户数据 GetUser(uid string) (user *pb.DBUser, err error) + //批量获取用户信息 + GetCrossUsers(uid []string) (user []*pb.DBUser, err error) //获取用户回话 GetUserSession(uid string) *pb.CacheUser //批量查询用户会话数据 diff --git a/modules/dcolor/api_info.go b/modules/dcolor/api_info.go index 5810db49c..e3cc6ffbc 100644 --- a/modules/dcolor/api_info.go +++ b/modules/dcolor/api_info.go @@ -25,6 +25,6 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.DColorInfoReq) (err return } - session.SendMsg(string(this.module.GetType()), "singleover", &pb.DColorInfoResp{Info: info}) + session.SendMsg(string(this.module.GetType()), "info", &pb.DColorInfoResp{Info: info}) return } diff --git a/modules/dcolor/api_single.go b/modules/dcolor/api_single.go index 97472fcc0..66c233268 100644 --- a/modules/dcolor/api_single.go +++ b/modules/dcolor/api_single.go @@ -14,7 +14,7 @@ func (this *apiComp) SingleCheck(session comm.IUserSession, req *pb.DColorSingle func (this *apiComp) Single(session comm.IUserSession, req *pb.DColorSingleReq) (errdata *pb.ErrorData) { var ( - colors []pb.DBDColorColor + colors []int32 ) if errdata = this.SingleCheck(session, req); errdata != nil { return diff --git a/modules/dcolor/core.go b/modules/dcolor/core.go index b06733338..775a92d4b 100644 --- a/modules/dcolor/core.go +++ b/modules/dcolor/core.go @@ -7,33 +7,24 @@ import ( ) //随机颜色 -func RandomColor(difficulty pb.DBDColorDifficulty, Repeat bool) (temcolors []pb.DBDColorColor) { +func RandomColor(difficulty pb.DBDColorDifficulty, Repeat bool) (temcolors []int32) { var ( colorNum int - colors []pb.DBDColorColor = []pb.DBDColorColor{ - pb.DBDColorColor_Color_0, - pb.DBDColorColor_Color_1, - pb.DBDColorColor_Color_2, - pb.DBDColorColor_Color_3, - pb.DBDColorColor_Color_4, - pb.DBDColorColor_Color_5, - pb.DBDColorColor_Color_6, - pb.DBDColorColor_Color_7, - } + colors []int32 = []int32{1, 2, 3, 4, 5, 6, 7, 8} ) switch difficulty { case pb.DBDColorDifficulty_Simple: colorNum = 4 - temcolors = make([]pb.DBDColorColor, 4) + temcolors = make([]int32, 4) break case pb.DBDColorDifficulty_Difficulty: colorNum = 6 - temcolors = make([]pb.DBDColorColor, 6) + temcolors = make([]int32, 6) break case pb.DBDColorDifficulty_Hell: colorNum = 8 - temcolors = make([]pb.DBDColorColor, 7) + temcolors = make([]int32, 7) break } if Repeat { diff --git a/modules/dcolor/module.go b/modules/dcolor/module.go index f74ab2ba3..fd33b4599 100644 --- a/modules/dcolor/module.go +++ b/modules/dcolor/module.go @@ -6,6 +6,11 @@ import ( "go_dreamfactory/modules" ) +func NewModule() core.IModule { + m := new(DColor) + return m +} + /* 模块名称:猜颜色 */ @@ -27,6 +32,13 @@ func (this *DColor) GetType() core.M_Modules { // 模块初始化接口 注册用户创建角色事件 func (this *DColor) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { err = this.ModuleBase.Init(service, module, options) - service = this.service.(comm.IService) + service = service.(comm.IService) return } +func (this *DColor) OnInstallComp() { + this.ModuleBase.OnInstallComp() + this.api = this.RegisterComp(new(apiComp)).(*apiComp) + this.model = this.RegisterComp(new(modelComp)).(*modelComp) + this.modelQiecuo = this.RegisterComp(new(modelQiecuoComp)).(*modelQiecuoComp) + this.rooms = this.RegisterComp(new(roomsComp)).(*roomsComp) +} diff --git a/modules/dcolor/room.go b/modules/dcolor/room.go index 4a74bc090..1067494ce 100644 --- a/modules/dcolor/room.go +++ b/modules/dcolor/room.go @@ -82,10 +82,10 @@ func (this *Room) PlayerHandle(uid string, handle *pb.DColorHandleReq) (err erro return } -func (this *Room) comparison(results []pb.DBDColorColor) (allright, halfpair int32) { +func (this *Room) comparison(results []int32) (allright, halfpair int32) { var ( - resultscolor []pb.DBDColorColor - tempcolor []pb.DBDColorColor + resultscolor []int32 + tempcolor []int32 ) for i, v := range this.data.Results { if results[i] == v { diff --git a/modules/friend/api_cross_addblack.go b/modules/friend/api_cross_addblack.go index 56aa2ddcb..f05e1ab75 100644 --- a/modules/friend/api_cross_addblack.go +++ b/modules/friend/api_cross_addblack.go @@ -33,8 +33,8 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendAddBlackR ) uid := session.GetUserId() - self = this.module.modelFriend.GetFriend(uid) - if self == nil { + self, err = this.module.modelFriend.GetFriend(uid) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), @@ -42,8 +42,8 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendAddBlackR return } - target = this.module.modelFriend.GetFriend(req.FriendId) - if target == nil { + target, err = this.module.modelFriend.GetFriend(req.FriendId) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendTargetNoData, Title: pb.ErrorCode_FriendTargetNoData.ToString(), diff --git a/modules/friend/api_cross_agree.go b/modules/friend/api_cross_agree.go index ffea4e561..c5cb367a7 100644 --- a/modules/friend/api_cross_agree.go +++ b/modules/friend/api_cross_agree.go @@ -33,8 +33,8 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (e ) uid := session.GetUserId() //获取玩家自己好友数据 - self = this.module.modelFriend.GetFriend(uid) - if self == nil { + self, err = this.module.modelFriend.GetFriend(uid) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), @@ -104,8 +104,8 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (e } //双向添加:将自己加入到申请人的好友列表中 - target = this.module.modelFriend.GetFriend(userId) - if target == nil { + target, err = this.module.modelFriend.GetFriend(userId) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendTargetNoData, Title: pb.ErrorCode_FriendTargetNoData.ToString(), diff --git a/modules/friend/api_cross_apply.go b/modules/friend/api_cross_apply.go index 47d65289c..6b56ee154 100644 --- a/modules/friend/api_cross_apply.go +++ b/modules/friend/api_cross_apply.go @@ -43,8 +43,8 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.FriendApplyReq) (e } //获取玩家自己好友数据 - self = this.module.modelFriend.GetFriend(uid) - if self == nil { + self, err = this.module.modelFriend.GetFriend(uid) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), @@ -72,8 +72,8 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.FriendApplyReq) (e } //获取好友数据 - target = this.module.modelFriend.GetFriend(req.FriendId) - if target == nil { + target, err = this.module.modelFriend.GetFriend(req.FriendId) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendTargetNoData, Title: pb.ErrorCode_FriendTargetNoData.ToString(), diff --git a/modules/friend/api_cross_applylist.go b/modules/friend/api_cross_applylist.go index d5afbb7ac..f742ad124 100644 --- a/modules/friend/api_cross_applylist.go +++ b/modules/friend/api_cross_applylist.go @@ -15,12 +15,13 @@ func (this *apiComp) ApplyList(session comm.IUserSession, req *pb.FriendApplyLis var ( self *pb.DBFriend list []*pb.FriendBase + err error bChange bool bUpdate bool ) - self = this.module.modelFriend.GetFriend(session.GetUserId()) - if self == nil { + self, err = this.module.modelFriend.GetFriend(session.GetUserId()) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), diff --git a/modules/friend/api_cross_assisthero.go b/modules/friend/api_cross_assisthero.go index 0f27ea0ed..5bedcea3a 100644 --- a/modules/friend/api_cross_assisthero.go +++ b/modules/friend/api_cross_assisthero.go @@ -50,8 +50,8 @@ func (this *apiComp) Assisthero(session comm.IUserSession, req *pb.FriendAssisth } //获取玩家自己好友数据 - self := this.module.modelFriend.GetFriend(uid) - if self == nil { + self, err := this.module.modelFriend.GetFriend(uid) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), diff --git a/modules/friend/api_cross_assistherolist.go b/modules/friend/api_cross_assistherolist.go index 37aebd56e..9694a53d5 100644 --- a/modules/friend/api_cross_assistherolist.go +++ b/modules/friend/api_cross_assistherolist.go @@ -14,8 +14,8 @@ func (this *apiComp) AssistHeroListCheck(session comm.IUserSession, req *pb.Frie func (this *apiComp) AssistHeroList(session comm.IUserSession, req *pb.FriendAssistHeroListReq) (errdata *pb.ErrorData) { //获取玩家自己好友数据 - self := this.module.modelFriend.GetFriend(session.GetUserId()) - if self == nil { + self, err := this.module.modelFriend.GetFriend(session.GetUserId()) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), @@ -25,7 +25,7 @@ func (this *apiComp) AssistHeroList(session comm.IUserSession, req *pb.FriendAss rsp := &pb.FriendAssistHeroListResp{} for _, v := range self.FriendIds { - f := this.module.modelFriend.GetFriend(v) + f, _ := this.module.modelFriend.GetFriend(v) rsp.Friends = append(rsp.Friends, &pb.FriendBase{ UserId: v, diff --git a/modules/friend/api_cross_assistlist.go b/modules/friend/api_cross_assistlist.go index d22f7b9a5..c999fe40f 100644 --- a/modules/friend/api_cross_assistlist.go +++ b/modules/friend/api_cross_assistlist.go @@ -16,8 +16,8 @@ func (this *apiComp) AssistlistCheck(session comm.IUserSession, req *pb.FriendAs func (this *apiComp) Assistlist(session comm.IUserSession, req *pb.FriendAssistlistReq) (errdata *pb.ErrorData) { var list []*pb.FriendBase //获取玩家自己好友数据 - self := this.module.modelFriend.GetFriend(session.GetUserId()) - if self == nil { + self, err := this.module.modelFriend.GetFriend(session.GetUserId()) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), @@ -29,8 +29,8 @@ func (this *apiComp) Assistlist(session comm.IUserSession, req *pb.FriendAssistl base := this.setDefaultFriendUserBaseInfo(uid) if base != nil { // 获取好友信息 - target := this.module.modelFriend.GetFriend(uid) - if target == nil { + target, err := this.module.modelFriend.GetFriend(uid) + if err != nil { continue } if target.AssistHeroId != "" { diff --git a/modules/friend/api_cross_blacklist.go b/modules/friend/api_cross_blacklist.go index b56d1f361..9f3ddf212 100644 --- a/modules/friend/api_cross_blacklist.go +++ b/modules/friend/api_cross_blacklist.go @@ -14,10 +14,11 @@ func (this *apiComp) Blacklist(session comm.IUserSession, req *pb.FriendBlackLis var ( self *pb.DBFriend list []*pb.FriendBase + err error ) - self = this.module.modelFriend.GetFriend(session.GetUserId()) - if self == nil { + self, err = this.module.modelFriend.GetFriend(session.GetUserId()) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), diff --git a/modules/friend/api_cross_del.go b/modules/friend/api_cross_del.go index 6d012ee50..95d8cb625 100644 --- a/modules/friend/api_cross_del.go +++ b/modules/friend/api_cross_del.go @@ -25,8 +25,8 @@ func (this *apiComp) Del(session comm.IUserSession, req *pb.FriendDelReq) (errda } uid := session.GetUserId() - self := this.module.modelFriend.GetFriend(uid) - if self == nil { + self, err := this.module.modelFriend.GetFriend(uid) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), @@ -52,8 +52,8 @@ func (this *apiComp) Del(session comm.IUserSession, req *pb.FriendDelReq) (errda return } - target := this.module.modelFriend.GetFriend(req.FriendId) - if target == nil { + target, err := this.module.modelFriend.GetFriend(req.FriendId) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendNotSelf, Title: pb.ErrorCode_FriendNotSelf.ToString(), diff --git a/modules/friend/api_cross_delblack.go b/modules/friend/api_cross_delblack.go index 1e3f67c05..bdc025ebd 100644 --- a/modules/friend/api_cross_delblack.go +++ b/modules/friend/api_cross_delblack.go @@ -28,8 +28,8 @@ func (this *apiComp) Delblack(session comm.IUserSession, req *pb.FriendDelBlackR self *pb.DBFriend ) uid := session.GetUserId() - self = this.module.modelFriend.GetFriend(session.GetUserId()) - if self == nil { + self, err = this.module.modelFriend.GetFriend(session.GetUserId()) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), diff --git a/modules/friend/api_cross_getrelation.go b/modules/friend/api_cross_getrelation.go index 99afc9ff3..b8b5e62cc 100644 --- a/modules/friend/api_cross_getrelation.go +++ b/modules/friend/api_cross_getrelation.go @@ -24,8 +24,8 @@ func (this *apiComp) GetRelation(session comm.IUserSession, req *pb.FriendGetRel return } - self := this.module.modelFriend.GetFriend(session.GetUserId()) - if self == nil { + self, err := this.module.modelFriend.GetFriend(session.GetUserId()) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), @@ -33,8 +33,8 @@ func (this *apiComp) GetRelation(session comm.IUserSession, req *pb.FriendGetRel return } - target := this.module.modelFriend.GetFriend(req.TargetUid) - if target == nil { + target, err := this.module.modelFriend.GetFriend(req.TargetUid) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendTargetNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), diff --git a/modules/friend/api_cross_getreward.go b/modules/friend/api_cross_getreward.go index 669ffbdfa..31df92dcc 100644 --- a/modules/friend/api_cross_getreward.go +++ b/modules/friend/api_cross_getreward.go @@ -14,8 +14,8 @@ func (this *apiComp) GetrewardCheck(session comm.IUserSession, req *pb.FriendGet func (this *apiComp) Getreward(session comm.IUserSession, req *pb.FriendGetrewardReq) (errdata *pb.ErrorData) { uid := session.GetUserId() //获取玩家自己好友数据 - self := this.module.modelFriend.GetFriend(uid) - if self == nil { + self, err := this.module.modelFriend.GetFriend(uid) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), diff --git a/modules/friend/api_cross_list.go b/modules/friend/api_cross_list.go index e5906587a..9d092e70c 100644 --- a/modules/friend/api_cross_list.go +++ b/modules/friend/api_cross_list.go @@ -16,10 +16,11 @@ func (this *apiComp) List(session comm.IUserSession, req *pb.FriendListReq) (err var ( self *pb.DBFriend list []*pb.FriendBase + err error ) - self = this.module.modelFriend.GetFriend(session.GetUserId()) - if self == nil { + self, err = this.module.modelFriend.GetFriend(session.GetUserId()) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), @@ -41,8 +42,8 @@ func (this *apiComp) List(session comm.IUserSession, req *pb.FriendListReq) (err } // 判断是否已点赞 - target := this.module.modelFriend.GetFriend(userId) - if target == nil { + target, err := this.module.modelFriend.GetFriend(userId) + if err != nil { continue } diff --git a/modules/friend/api_cross_randlist.go b/modules/friend/api_cross_randlist.go index ad448277f..d969f433e 100644 --- a/modules/friend/api_cross_randlist.go +++ b/modules/friend/api_cross_randlist.go @@ -16,8 +16,8 @@ func (this *apiComp) RandlistCheck(session comm.IUserSession, req *pb.FriendRand func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistReq) (errdata *pb.ErrorData) { // 当前玩家好友数据 - self := this.module.modelFriend.GetFriend(session.GetUserId()) - if self == nil { + self, err := this.module.modelFriend.GetFriend(session.GetUserId()) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), @@ -50,8 +50,8 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR } //检查目标v中的申请列表中是否有自己, - target := this.module.modelFriend.GetFriend(v.Uid) - if self == nil { + target, err := this.module.modelFriend.GetFriend(v.Uid) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), @@ -86,8 +86,8 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR var userList []*pb.FriendBase for _, uid := range randOnlineUsers { - target := this.module.modelFriend.GetFriend(uid) - if target == nil { + target, err := this.module.modelFriend.GetFriend(uid) + if err != nil { this.module.Debug("未找到好友", log.Field{Key: "uid", Value: uid}) continue diff --git a/modules/friend/api_cross_refuse.go b/modules/friend/api_cross_refuse.go index dedda760a..e47bc29d7 100644 --- a/modules/friend/api_cross_refuse.go +++ b/modules/friend/api_cross_refuse.go @@ -30,11 +30,12 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.FriendRefuseReq) var ( self *pb.DBFriend optNum int32 + err error ) //获取玩家自己好友数据 - self = this.module.modelFriend.GetFriend(uid) - if self == nil { + self, err = this.module.modelFriend.GetFriend(uid) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), @@ -80,6 +81,5 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.FriendRefuseReq) session.SendMsg(string(this.module.GetType()), FriendSubTypeRefuse, resp) - return } diff --git a/modules/friend/api_cross_search.go b/modules/friend/api_cross_search.go index ed37d9cb8..1b73b1306 100644 --- a/modules/friend/api_cross_search.go +++ b/modules/friend/api_cross_search.go @@ -55,8 +55,8 @@ func (this *apiComp) Search(session comm.IUserSession, req *pb.FriendSearchReq) ServerId: u.Sid, } - target := this.module.modelFriend.GetFriend(u.Uid) - if target == nil { + target, err := this.module.modelFriend.GetFriend(u.Uid) + if err != nil { continue } diff --git a/modules/friend/api_cross_zan.go b/modules/friend/api_cross_zan.go index 3e28733f5..34f5212a1 100644 --- a/modules/friend/api_cross_zan.go +++ b/modules/friend/api_cross_zan.go @@ -50,8 +50,8 @@ func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (errda ) // 是否已给好友点赞 for _, v := range req.FriendIds { - target = this.module.modelFriend.GetFriend(v) - if target == nil { + target, err = this.module.modelFriend.GetFriend(v) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), diff --git a/modules/friend/api_cross_zanlist.go b/modules/friend/api_cross_zanlist.go index 0556d97e9..32e810aa8 100644 --- a/modules/friend/api_cross_zanlist.go +++ b/modules/friend/api_cross_zanlist.go @@ -19,13 +19,14 @@ func (this *apiComp) Zanlist(session comm.IUserSession, req *pb.FriendZanlistReq var ( self *pb.DBFriend list []*pb.FriendBase + err error ) - self = this.module.modelFriend.GetFriend(session.GetUserId()) - if self == nil { + self, err = this.module.modelFriend.GetFriend(session.GetUserId()) + if err != nil { errdata = &pb.ErrorData{ - Code: pb.ErrorCode_FriendSelfNoData, - Title: pb.ErrorCode_FriendSelfNoData.ToString(), + Code: pb.ErrorCode_FriendSelfNoData, + Title: pb.ErrorCode_FriendSelfNoData.ToString(), } return } diff --git a/modules/friend/api_cross_zanreceive.go b/modules/friend/api_cross_zanreceive.go index 139e8c3b1..b305fb44a 100644 --- a/modules/friend/api_cross_zanreceive.go +++ b/modules/friend/api_cross_zanreceive.go @@ -30,8 +30,8 @@ func (this *apiComp) Zanreceive(session comm.IUserSession, req *pb.FriendZanrece err error ) - self = this.module.modelFriend.GetFriend(session.GetUserId()) - if self == nil { + self, err = this.module.modelFriend.GetFriend(session.GetUserId()) + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_FriendSelfNoData, Title: pb.ErrorCode_FriendSelfNoData.ToString(), diff --git a/modules/friend/model_friend.go b/modules/friend/model_friend.go index c806c033d..97de3cc4b 100644 --- a/modules/friend/model_friend.go +++ b/modules/friend/model_friend.go @@ -1,12 +1,12 @@ package friend import ( - "context" "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/redis" "go_dreamfactory/modules" "go_dreamfactory/pb" + "go_dreamfactory/sys/db" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/x/bsonx" @@ -14,13 +14,13 @@ import ( type ModelFriend struct { modules.MCompModel - moduleFriend *Friend + moduole *Friend } func (this *ModelFriend) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { this.TableName = comm.TableFriend err = this.MCompModel.Init(service, module, comp, options) - this.moduleFriend = module.(*Friend) + this.moduole = module.(*Friend) this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, }) @@ -29,30 +29,33 @@ func (this *ModelFriend) Init(service core.IService, module core.IModule, comp c } // 查询好友 -func (this *ModelFriend) GetFriend(uid string) *pb.DBFriend { - friend := &pb.DBFriend{Uid: uid} - if this.moduleFriend.IsCross() { - err := this.Get(uid, friend) +func (this *ModelFriend) GetFriend(uid string) (friend *pb.DBFriend, err error) { + friend = &pb.DBFriend{Uid: uid} + if this.moduole.IsCross() { + err = this.Get(uid, friend) if err != nil { if err == redis.RedisNil || err == mongo.ErrNoDocuments { - if err := this.Add(uid, friend); err != nil { - return nil + if err = this.Add(uid, friend); err != nil { + return } } // log.Error("未获得好友数据", log.Fields{"uid": uid}) } } else { - friend := &pb.DBFriend{} - if err := this.moduleFriend.service.AcrossClusterRpcCall( - context.Background(), - this.moduleFriend.GetCrossTag(), - comm.Service_Worker, - string(comm.Rpc_ModuleFriendDB), - pb.RPCGeneralReqA1{Param1: uid}, - friend); err != nil { - this.moduleFriend.Errorln(err) + var ( + model *db.DBModel + ) + if model, err = this.moduole.GetCrossDBModel(this.TableName); err != nil { + return + } + model.Get(uid, friend) + if err != nil { + if err == redis.RedisNil || err == mongo.ErrNoDocuments { + if err = model.Add(uid, friend); err != nil { + return + } + } } } - - return friend + return } diff --git a/modules/friend/module.go b/modules/friend/module.go index a6ec175aa..0d3257b24 100644 --- a/modules/friend/module.go +++ b/modules/friend/module.go @@ -97,14 +97,14 @@ func (this *Friend) ResetFriend(uid string) { } func (this *Friend) GetFriendCount(uid string) (count int32) { - if friend := this.modelFriend.GetFriend(uid); friend != nil { + if friend, err := this.modelFriend.GetFriend(uid); err == nil { count = cast.ToInt32(len(friend.FriendIds)) } return } func (this *Friend) GetFriendList(uid string) (uids []string) { - if friend := this.modelFriend.GetFriend(uid); friend != nil { + if friend, err := this.modelFriend.GetFriend(uid); err == nil { uids = friend.FriendIds } return @@ -141,7 +141,7 @@ func (this *Friend) RpcFriendDB(ctx context.Context, req *pb.RPCGeneralReqA1, re // friendId 好友Id func (this *Friend) UseAssistHero(uid, friendId string) (*pb.DBHero, error) { //指定好友 - friend := this.modelFriend.GetFriend(friendId) + friend, _ := this.modelFriend.GetFriend(friendId) for _, fId := range friend.FriendIds { // 判断uid是否在指定玩家的好友列表中 @@ -207,7 +207,7 @@ func (this *Friend) QiecuoFinishNotify(redUid, matchId string) error { func (this *Friend) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { reddot = make(map[comm.ReddotType]*pb.ReddotItem) - friend := this.modelFriend.GetFriend(session.GetUserId()) + friend, _ := this.modelFriend.GetFriend(session.GetUserId()) if friend == nil { for _, v := range rid { reddot[v] = &pb.ReddotItem{ diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index c1dd4a3a5..249d5eade 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -51,6 +51,7 @@ type Agent struct { sessionId string uId string wId string + cwid string writeChan chan [][]byte closeSignal chan bool state int32 //状态 0 关闭 1 运行 2 关闭中 @@ -321,7 +322,12 @@ func (this *Agent) Bind(uId string, wId string) { func (this *Agent) UnBind() { this.uId = "" } - +func (this *Agent) SetCrosssId(wId string) { + this.cwid = wId +} +func (this *Agent) CrosssWorkerId() string { + return this.cwid +} func (this *Agent) WriteMsg(msg *pb.UserMessage) (err error) { if atomic.LoadInt32(&this.state) != 1 { return @@ -432,7 +438,11 @@ func (this *Agent) messageDistribution(msg *pb.UserMessage) (err error) { } else if len(paths) == 2 { if paths[0] == "~" { serviceTag = db.CrossTag() - servicePath = paths[1] + if len(this.cwid) > 0 { //已经绑定 跨服服务器 + servicePath = fmt.Sprintf("%s/%s", paths[1], this.cwid) + } else { + servicePath = paths[1] + } } else { servicePath = rule } diff --git a/modules/gateway/agentmgr_comp.go b/modules/gateway/agentmgr_comp.go index c66f0f5a4..56b8bf937 100644 --- a/modules/gateway/agentmgr_comp.go +++ b/modules/gateway/agentmgr_comp.go @@ -26,6 +26,7 @@ type AgentMgrComp struct { service base.IRPCXService module *Gateway agents *sync.Map + users *sync.Map } func (this *AgentMgrComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { @@ -34,6 +35,7 @@ func (this *AgentMgrComp) Init(service core.IService, module core.IModule, comp this.service = service.(base.IRPCXService) this.module = module.(*Gateway) this.agents = new(sync.Map) + this.users = new(sync.Map) return } @@ -61,6 +63,10 @@ func (this *AgentMgrComp) Connect(a IAgent) { // DisConnect 移除断开的用户 func (this *AgentMgrComp) DisConnect(a IAgent) { + if a.(IAgent).UserId() != "" { + this.users.Delete(a.(IAgent).UserId()) + } + this.agents.Delete(a.SessionId()) if a.UserId() != "" { //登录用户 通知业务服务处理玩家离线相关 if _, err := this.service.RpcGo(context.Background(), fmt.Sprintf("%s/%s", comm.Service_Worker, a.WorkerId()), string(comm.Rpc_GatewayNoticeUserClose), &pb.NoticeUserCloseReq{ @@ -85,7 +91,7 @@ func (this *AgentMgrComp) DisConnect(a IAgent) { } // if this.options.SpanServiceTag != "" { //推送跨服集群处理 - if _, err := this.service.AcrossClusterRpcGo(context.Background(), db.CrossTag(), comm.Service_Worker, string(comm.Rpc_GatewayNoticeUserClose), &pb.NoticeUserCloseReq{ + if _, err := this.service.AcrossClusterRpcGo(context.Background(), db.CrossTag(), fmt.Sprintf("%s/%s", comm.Service_Worker, a.CrosssWorkerId()), string(comm.Rpc_GatewayNoticeUserClose), &pb.NoticeUserCloseReq{ Ip: a.IP(), ServiceTag: this.service.GetTag(), GatewayServiceId: this.service.GetId(), @@ -108,36 +114,14 @@ func (this *AgentMgrComp) DisConnect(a IAgent) { } } -// Bind 用户绑定Id -// func (this *AgentMgrComp) Bind(ctx context.Context, args *pb.AgentBuildReq, reply *pb.RPCMessageReply) error { -// if a, ok := this.agents.Load(args.UserSessionId); ok { -// agent := a.(IAgent) -// agent.Bind(args.UserId, args.WorkerId) -// // if this.options.SpanServiceTag != "" { //跨服集群配置存在 推送通知过去 -// //推送跨服集群处理 -// if _, err := this.service.AcrossClusterRpcGo(context.Background(), db.CrossTag(), comm.Service_Worker, string(comm.Rpc_GatewayNoticeUserLogin), &pb.NoticeUserLoginReq{ -// Ip: agent.IP(), -// ServiceTag: this.service.GetTag(), -// GatewayServiceId: this.service.GetId(), -// UserSessionId: agent.SessionId(), -// UserId: agent.UserId(), -// }, nil); err != nil { -// log.Errorf("uId:%s clusterTag:%s Rpc_NoticeUserLogin err:%v", agent.UserId(), db.CrossTag(), err) -// } -// // } -// } else { -// reply.ErrorData = &pb.ErrorData{ -// Code: pb.ErrorCode_UserSessionNobeing, -// Title: pb.ErrorCode_UserSessionNobeing.ToString(), -// Message: fmt.Sprintf("绑定uid:%s失败!", args.WorkerId), -// } -// } -// return nil -// } +func (this *AgentMgrComp) Logined(a IAgent) { + this.users.Store(a.UserId(), a) +} // UnBind 用户解绑Id func (this *AgentMgrComp) UnBind(ctx context.Context, args *pb.AgentUnBuildReq, reply *pb.RPCMessageReply) error { if a, ok := this.agents.Load(args.UserSessionId); ok { + this.users.Delete(a.(IAgent).UserId()) a.(IAgent).UnBind() } else { reply.ErrorData = &pb.ErrorData{ @@ -217,9 +201,37 @@ func (this *AgentMgrComp) SendMsgToAllAgent(ctx context.Context, args *pb.BroadC return } +// SendMsgToAllAgent 向所有户发送消息 +func (this *AgentMgrComp) SendMsgToUsers(ctx context.Context, args *pb.BatchUsersMessageReq, reply *pb.RPCMessageReply) (err error) { + var ( + data []byte + ) + msg := &pb.UserMessage{ + MainType: args.MainType, + SubType: args.SubType, + Data: args.Data, + } + this.module.Debugf("SendMsgToAgents: agents:%v msg:%v", args.Uids, msg) + if data, err = proto.Marshal(msg); err != nil { + return + } + for _, v := range args.Uids { + if a, ok := this.users.Load(v); ok { + agent := a.(IAgent) + if err = agent.WriteBytes(data); err != nil { + this.module.Errorln(err) + } + } + } + return nil +} + // CloseAgent 关闭某个用户 func (this *AgentMgrComp) CloseAgent(ctx context.Context, args *pb.AgentCloseeReq, reply *pb.RPCMessageReply) error { if a, ok := this.agents.Load(args.UserSessionId); ok { + if a.(IAgent).UserId() != "" { + this.users.Delete(a.(IAgent).UserId()) + } a.(IAgent).Close() this.agents.Delete(args.UserSessionId) } else { diff --git a/modules/gateway/core.go b/modules/gateway/core.go index 91282626f..769b32f95 100644 --- a/modules/gateway/core.go +++ b/modules/gateway/core.go @@ -17,6 +17,8 @@ type ( UserId() string WorkerId() string Bind(uId string, wId string) + SetCrosssId(wId string) + CrosssWorkerId() string UnBind() WriteMsg(msg *pb.UserMessage) (err error) WriteBytes(data []byte) (err error) diff --git a/modules/gateway/module.go b/modules/gateway/module.go index 295edc8d5..98212b814 100644 --- a/modules/gateway/module.go +++ b/modules/gateway/module.go @@ -73,7 +73,9 @@ func (this *Gateway) Start() (err error) { // 向多个用户对象发送消息接口 string(comm.Rpc_GatewaySendBatchMsg): this.agentMgr.SendMsgToAgents, // 向所有用户发送消息接口 - string(comm.Rpc_GatewaySendRadioMsg): this.agentMgr.SendMsgToAllAgent, + string(comm.Rpc_GatewaySendRadioMsg): this.agentMgr.SendMsgToAllAgent, + string(comm.Rpc_GatewaySendBatchMsgByUid): this.agentMgr.SendMsgToUsers, + // 关闭用户socket连接接口 string(comm.Rpc_GatewayAgentClose): this.agentMgr.CloseAgent, } @@ -115,15 +117,19 @@ func (this *Gateway) DisConnect(a IAgent) { } func (this *Gateway) LoginNotice(a IAgent) { - if _, err := this.service.AcrossClusterRpcGo(context.Background(), db.CrossTag(), comm.Service_Worker, string(comm.Rpc_GatewayNoticeUserLogin), &pb.NoticeUserLoginReq{ + this.agentMgr.Logined(a) + resp := &pb.NoticeUserLoginResp{} + if err := this.service.AcrossClusterRpcCall(context.Background(), db.CrossTag(), comm.Service_Worker, string(comm.Rpc_GatewayNoticeUserLogin), &pb.NoticeUserLoginReq{ Ip: a.IP(), ServiceTag: this.service.GetTag(), GatewayServiceId: this.service.GetId(), UserSessionId: a.SessionId(), UserId: a.UserId(), - }, nil); err != nil { + }, resp); err != nil { log.Errorf("uId:%s clusterTag:%s Rpc_NoticeUserLogin err:%v", a.UserId(), db.CrossTag(), err) + return } + a.SetCrosssId(resp.WorkerSId) } // GetMsgDistribute 读取消息分发规则 diff --git a/modules/maincity/api.go b/modules/maincity/api.go new file mode 100644 index 000000000..8c5d40d08 --- /dev/null +++ b/modules/maincity/api.go @@ -0,0 +1,20 @@ +package maincity + +import ( + "go_dreamfactory/lego/base" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" +) + +type apiComp struct { + modules.MCompGate + service base.IRPCXService + module *MainCity +} + +func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + _ = this.MCompGate.Init(service, module, comp, options) + this.service = service.(base.IRPCXService) + this.module = module.(*MainCity) + return +} diff --git a/modules/maincity/api_synchpos.go b/modules/maincity/api_synchpos.go new file mode 100644 index 000000000..c34969bcb --- /dev/null +++ b/modules/maincity/api_synchpos.go @@ -0,0 +1,31 @@ +package maincity + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +func (this *apiComp) SynchPosCheck(session comm.IUserSession, req *pb.MainCitySynchPosPeek) (errdata *pb.ErrorData) { + + return +} + +// 查看某一封邮件 +func (this *apiComp) SynchPos(session comm.IUserSession, req *pb.MainCitySynchPosPeek) (errdata *pb.ErrorData) { + var ( + friends []*pb.BaseUserInfo + groupUser map[string][]*pb.BaseUserInfo = make(map[string][]*pb.BaseUserInfo) + ok bool + ) + friends = this.module.model.getplayerPos(session.GetUserId()) + for _, v := range friends { + if _, ok = groupUser[v.Sid]; !ok { + groupUser[v.Sid] = make([]*pb.BaseUserInfo, 0) + } + groupUser[v.Sid] = append(groupUser[v.Sid], v) + } + this.module.SendMsgToSession(string(this.module.GetType()), "synchpos", &pb.MainCitySynchPosPush{ + Pos: req.Pos, + }, groupUser) + return +} diff --git a/modules/maincity/model.go b/modules/maincity/model.go new file mode 100644 index 000000000..e0148a7ae --- /dev/null +++ b/modules/maincity/model.go @@ -0,0 +1,48 @@ +package maincity + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + "sync" + + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/bsonx" +) + +type modelComp struct { + modules.MCompModel + module *MainCity + lock sync.RWMutex + onlines map[string][]*pb.BaseUserInfo //关联用户信息 +} + +func (this *modelComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompModel.Init(service, module, comp, options) + this.TableName = comm.Tablekftask + this.module = module.(*MainCity) + + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} + +func (this *modelComp) setplayerPos(uid string, friends []*pb.BaseUserInfo) { + this.lock.Lock() + this.onlines[uid] = friends + this.lock.Unlock() +} +func (this *modelComp) getplayerPos(uid string) (friends []*pb.BaseUserInfo) { + this.lock.RLock() + friends = this.onlines[uid] + this.lock.RUnlock() + return +} + +func (this *modelComp) removelayerPos(uid string) { + this.lock.Lock() + delete(this.onlines, uid) + this.lock.Unlock() +} diff --git a/modules/maincity/module.go b/modules/maincity/module.go new file mode 100644 index 000000000..5f32bce8d --- /dev/null +++ b/modules/maincity/module.go @@ -0,0 +1,118 @@ +package maincity + +import ( + "context" + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/event" + "go_dreamfactory/lego/sys/log" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + "time" + + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" +) + +type MainCity struct { + modules.ModuleBase + service comm.IService + api *apiComp + model *modelComp + friend comm.IFriend + sociaty comm.ISociaty +} + +func NewModule() core.IModule { + return &MainCity{} +} + +func (this *MainCity) GetType() core.M_Modules { + return comm.ModuleKFTask +} + +func (this *MainCity) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { + if err = this.ModuleBase.Init(service, module, options); err != nil { + return + } + this.service = service.(comm.IService) + return +} + +func (this *MainCity) Start() (err error) { + if err = this.ModuleBase.Start(); err != nil { + return + } + var module core.IModule + if module, err = this.service.GetModule(comm.ModuleFriend); err != nil { + return + } + this.friend = module.(comm.IFriend) + if module, err = this.service.GetModule(comm.ModuleSociaty); err != nil { + return + } + this.sociaty = module.(comm.ISociaty) + event.Register(comm.EventUserLogin, this.EventUserLogin) + event.Register(comm.EventUserOffline, this.EventUserOffline) + return +} + +func (this *MainCity) OnInstallComp() { + this.ModuleBase.OnInstallComp() + this.api = this.RegisterComp(new(apiComp)).(*apiComp) + this.model = this.RegisterComp(new(modelComp)).(*modelComp) +} + +// 用户登录 +func (this *MainCity) EventUserLogin(session comm.IUserSession) { + var ( + uids []string + sociaty *pb.DBSociaty + users []*pb.DBUser + busers []*pb.BaseUserInfo + err error + ) + uids = this.friend.GetFriendList(session.GetUserId()) + if sociaty = this.sociaty.GetSociaty(session.GetUserId()); sociaty != nil { + for _, v := range sociaty.Members { + if v.Uid != session.GetUserId() { + uids = append(uids, v.Uid) + } + } + } + if users, err = this.ModuleUser.GetCrossUsers(uids); err != nil { + this.Errorln(err) + return + } + busers = make([]*pb.BaseUserInfo, len(users)) + for i, v := range users { + busers[i] = comm.GetUserBaseInfo(v) + } + this.model.setplayerPos(session.GetUserId(), busers) +} + +// 用户登录 +func (this *MainCity) EventUserOffline(session comm.IUserSession) { + this.model.removelayerPos(session.GetUserId()) +} + +// 向多个用户发送消息 +func (this *MainCity) SendMsgToSession(mainType, subType string, msg proto.Message, users map[string][]*pb.BaseUserInfo) (err error) { + data, _ := anypb.New(msg) + for k, users := range users { + uids := []string{} + for _, v := range users { + uids = append(uids, v.Uid) + } + ctx, _ := context.WithTimeout(context.Background(), time.Second*5) + if _, err = this.service.AcrossClusterRpcGo(ctx, k, comm.Service_Gateway, string(comm.Rpc_GatewaySendBatchMsgByUid), &pb.BatchUsersMessageReq{ + Uids: uids, + MainType: mainType, + SubType: subType, + Data: data, + }, nil); err != nil { + log.Errorf("SendMsgToUsers:%s->%s.%s err:%v", k, mainType, subType, err) + } + } + return +} diff --git a/modules/parkour/ai.go b/modules/parkour/ai.go index 073b9c859..8ea844621 100644 --- a/modules/parkour/ai.go +++ b/modules/parkour/ai.go @@ -67,7 +67,7 @@ func (this *aiComp) createAi(battleid string, btype pb.RaceType, users []*pb.DBR } ais = make([]*AI, len(users)) for i, v := range users { - if conf, err = this.module.configure.getgameBukashiAiDataByDan(int32(btype), v.Dan); err != nil { + if conf, err = this.module.configure.getgameBukashiAiDataByDan(int32(btype)+1, v.Dan+1); err != nil { return } ais[i] = NewAI(battleid, v.Uid, conf) diff --git a/modules/parkour/module.go b/modules/parkour/module.go index 4b186abe6..cb4007d6e 100644 --- a/modules/parkour/module.go +++ b/modules/parkour/module.go @@ -239,12 +239,14 @@ func (this *Parkour) qte(id string, uid string, time float32, conf *cfg.GameBuzk battle, ok = this.battles[id] this.lock.RUnlock() if ok { + ok = false for _, v := range battle.RedMember { if v.Uid == uid { ok = true v.Scores += conf.Value side = 1 member = v + break } } if !ok { @@ -254,9 +256,14 @@ func (this *Parkour) qte(id string, uid string, time float32, conf *cfg.GameBuzk v.Scores += conf.Value side = 2 member = v + break } } } + if !ok { + this.Error("qte on found Member !", log.Field{Key: "uid", Value: uid}) + return + } if side == 1 { battle.RedScore += conf.Value teamScores = battle.RedScore @@ -295,6 +302,7 @@ func (this *Parkour) shot(id string, uid string) { battle, ok = this.battles[id] this.lock.RUnlock() if ok { + ok = false for _, v := range battle.RedMember { if v.Uid == uid { v.Scores += this.ModuleTools.GetGlobalConf().BuzkashiGoalscore @@ -313,6 +321,10 @@ func (this *Parkour) shot(id string, uid string) { } } } + if !ok { + this.Error("shot on found Member !", log.Field{Key: "uid", Value: uid}) + return + } if side == 1 { battle.RedScore += this.ModuleTools.GetGlobalConf().BuzkashiGoalteamscore teamScores = battle.RedScore @@ -370,7 +382,7 @@ func (this *Parkour) avoid(id string, uid string, distance float32, conf *cfg.Ga } } if !ok { - this.Error("躲避障碍物逻辑异常 未找到玩家!", log.Field{Key: "battleid", Value: id}, log.Field{Key: "uid", Value: uid}) + this.Error("avoid on found Member !", log.Field{Key: "uid", Value: uid}) return } @@ -421,6 +433,7 @@ func (this *Parkour) recoverhp(id string, uid string, hp int32) { battle, ok = this.battles[id] this.lock.RUnlock() if ok { + ok = false for _, v := range battle.RedMember { if v.Uid == uid { player = v @@ -443,6 +456,10 @@ func (this *Parkour) recoverhp(id string, uid string, hp int32) { break } } + if !ok { + this.Error("recoverhp on found Member !", log.Field{Key: "uid", Value: uid}) + return + } for _, v := range battle.Session { sessions = append(sessions, v) diff --git a/modules/timer/parkour.go b/modules/timer/parkour.go index e0f0d3d28..69efd5161 100644 --- a/modules/timer/parkour.go +++ b/modules/timer/parkour.go @@ -309,9 +309,9 @@ func (this *ParkourComp) match() { } this.tlock.RUnlock() - if len(users)+rednum+bulenum < 6 { - return - } + // if len(users)+rednum+bulenum < 6 { + // return + // } n := len(reduser) //补充人员 if len(reduser) < 3 { diff --git a/modules/user/model_user.go b/modules/user/model_user.go index c85c8383e..e13acd40f 100644 --- a/modules/user/model_user.go +++ b/modules/user/model_user.go @@ -113,6 +113,36 @@ func (this *ModelUser) GetUser(uid string) (user *pb.DBUser, err error) { return } +// 获取用户 +func (this *ModelUser) GetCrossUsers(uids []string) (users []*pb.DBUser, err error) { + var ( + stage string + usergroup map[string][]string = make(map[string][]string) + conn *db.DBConn + model *db.DBModel + usersSlice []*pb.DBUser + ) + for _, v := range uids { + if stage, err = comm.UidToSTag(v); err != nil { + return + } + usergroup[stage] = append(usergroup[stage], v) + } + + for k, v := range usergroup { + if conn, err = db.ServerDBConn(k); err != nil { + return + } + model = db.NewDBModel(this.TableName, conn) + usersSlice = make([]*pb.DBUser, 0) + if _, err = model.Gets(v, &usersSlice); err != nil { + return + } + users = append(users, usersSlice...) + } + return +} + // 设置属性 func (this *ModelUser) updateUserAttr(uid string, data map[string]interface{}) error { if this.module.IsCross() { diff --git a/modules/user/module.go b/modules/user/module.go index 97fe2323a..54824e976 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -126,6 +126,15 @@ func (this *User) GetUser(uid string) (user *pb.DBUser, err error) { return } +// 获取用户数据 +func (this *User) GetCrossUsers(uid []string) (user []*pb.DBUser, err error) { + if !this.IsCross() { + return + } + user, err = this.modelUser.GetCrossUsers(uid) + return +} + // 获取跨服用户数据 func (this *User) GetCrossUser(uid string) (*pb.DBUser, error) { reply := &pb.DBUser{} diff --git a/pb/comm.pb.go b/pb/comm.pb.go index 3be996198..d3f13cff9 100644 --- a/pb/comm.pb.go +++ b/pb/comm.pb.go @@ -709,6 +709,78 @@ func (x *BatchMessageReq) GetData() *anypb.Any { return nil } +//发送批量消息 +type BatchUsersMessageReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uids []string `protobuf:"bytes,1,rep,name=uids,proto3" json:"uids"` + MainType string `protobuf:"bytes,2,opt,name=MainType,proto3" json:"MainType"` + SubType string `protobuf:"bytes,3,opt,name=SubType,proto3" json:"SubType"` + Data *anypb.Any `protobuf:"bytes,4,opt,name=Data,proto3" json:"Data"` +} + +func (x *BatchUsersMessageReq) Reset() { + *x = BatchUsersMessageReq{} + if protoimpl.UnsafeEnabled { + mi := &file_comm_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchUsersMessageReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchUsersMessageReq) ProtoMessage() {} + +func (x *BatchUsersMessageReq) ProtoReflect() protoreflect.Message { + mi := &file_comm_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchUsersMessageReq.ProtoReflect.Descriptor instead. +func (*BatchUsersMessageReq) Descriptor() ([]byte, []int) { + return file_comm_proto_rawDescGZIP(), []int{9} +} + +func (x *BatchUsersMessageReq) GetUids() []string { + if x != nil { + return x.Uids + } + return nil +} + +func (x *BatchUsersMessageReq) GetMainType() string { + if x != nil { + return x.MainType + } + return "" +} + +func (x *BatchUsersMessageReq) GetSubType() string { + if x != nil { + return x.SubType + } + return "" +} + +func (x *BatchUsersMessageReq) GetData() *anypb.Any { + if x != nil { + return x.Data + } + return nil +} + //发送广播消息 type BroadCastMessageReq struct { state protoimpl.MessageState @@ -723,7 +795,7 @@ type BroadCastMessageReq struct { func (x *BroadCastMessageReq) Reset() { *x = BroadCastMessageReq{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[9] + mi := &file_comm_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -736,7 +808,7 @@ func (x *BroadCastMessageReq) String() string { func (*BroadCastMessageReq) ProtoMessage() {} func (x *BroadCastMessageReq) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[9] + mi := &file_comm_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -749,7 +821,7 @@ func (x *BroadCastMessageReq) ProtoReflect() protoreflect.Message { // Deprecated: Use BroadCastMessageReq.ProtoReflect.Descriptor instead. func (*BroadCastMessageReq) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{9} + return file_comm_proto_rawDescGZIP(), []int{10} } func (x *BroadCastMessageReq) GetMainType() string { @@ -785,7 +857,7 @@ type AgentCloseeReq struct { func (x *AgentCloseeReq) Reset() { *x = AgentCloseeReq{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[10] + mi := &file_comm_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -798,7 +870,7 @@ func (x *AgentCloseeReq) String() string { func (*AgentCloseeReq) ProtoMessage() {} func (x *AgentCloseeReq) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[10] + mi := &file_comm_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -811,7 +883,7 @@ func (x *AgentCloseeReq) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentCloseeReq.ProtoReflect.Descriptor instead. func (*AgentCloseeReq) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{10} + return file_comm_proto_rawDescGZIP(), []int{11} } func (x *AgentCloseeReq) GetUserSessionId() string { @@ -837,7 +909,7 @@ type NoticeUserLoginReq struct { func (x *NoticeUserLoginReq) Reset() { *x = NoticeUserLoginReq{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[11] + mi := &file_comm_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -850,7 +922,7 @@ func (x *NoticeUserLoginReq) String() string { func (*NoticeUserLoginReq) ProtoMessage() {} func (x *NoticeUserLoginReq) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[11] + mi := &file_comm_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -863,7 +935,7 @@ func (x *NoticeUserLoginReq) ProtoReflect() protoreflect.Message { // Deprecated: Use NoticeUserLoginReq.ProtoReflect.Descriptor instead. func (*NoticeUserLoginReq) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{11} + return file_comm_proto_rawDescGZIP(), []int{12} } func (x *NoticeUserLoginReq) GetIp() string { @@ -901,6 +973,53 @@ func (x *NoticeUserLoginReq) GetGatewayServiceId() string { return "" } +type NoticeUserLoginResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkerSId string `protobuf:"bytes,1,opt,name=WorkerSId,proto3" json:"WorkerSId"` +} + +func (x *NoticeUserLoginResp) Reset() { + *x = NoticeUserLoginResp{} + if protoimpl.UnsafeEnabled { + mi := &file_comm_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NoticeUserLoginResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NoticeUserLoginResp) ProtoMessage() {} + +func (x *NoticeUserLoginResp) ProtoReflect() protoreflect.Message { + mi := &file_comm_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NoticeUserLoginResp.ProtoReflect.Descriptor instead. +func (*NoticeUserLoginResp) Descriptor() ([]byte, []int) { + return file_comm_proto_rawDescGZIP(), []int{13} +} + +func (x *NoticeUserLoginResp) GetWorkerSId() string { + if x != nil { + return x.WorkerSId + } + return "" +} + //通知用户登录 type NoticeUserCreateReq struct { state protoimpl.MessageState @@ -917,7 +1036,7 @@ type NoticeUserCreateReq struct { func (x *NoticeUserCreateReq) Reset() { *x = NoticeUserCreateReq{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[12] + mi := &file_comm_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -930,7 +1049,7 @@ func (x *NoticeUserCreateReq) String() string { func (*NoticeUserCreateReq) ProtoMessage() {} func (x *NoticeUserCreateReq) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[12] + mi := &file_comm_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -943,7 +1062,7 @@ func (x *NoticeUserCreateReq) ProtoReflect() protoreflect.Message { // Deprecated: Use NoticeUserCreateReq.ProtoReflect.Descriptor instead. func (*NoticeUserCreateReq) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{12} + return file_comm_proto_rawDescGZIP(), []int{14} } func (x *NoticeUserCreateReq) GetIp() string { @@ -997,7 +1116,7 @@ type NoticeUserCloseReq struct { func (x *NoticeUserCloseReq) Reset() { *x = NoticeUserCloseReq{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[13] + mi := &file_comm_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1010,7 +1129,7 @@ func (x *NoticeUserCloseReq) String() string { func (*NoticeUserCloseReq) ProtoMessage() {} func (x *NoticeUserCloseReq) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[13] + mi := &file_comm_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1023,7 +1142,7 @@ func (x *NoticeUserCloseReq) ProtoReflect() protoreflect.Message { // Deprecated: Use NoticeUserCloseReq.ProtoReflect.Descriptor instead. func (*NoticeUserCloseReq) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{13} + return file_comm_proto_rawDescGZIP(), []int{15} } func (x *NoticeUserCloseReq) GetIp() string { @@ -1073,7 +1192,7 @@ type SkillData struct { func (x *SkillData) Reset() { *x = SkillData{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[14] + mi := &file_comm_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1086,7 +1205,7 @@ func (x *SkillData) String() string { func (*SkillData) ProtoMessage() {} func (x *SkillData) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[14] + mi := &file_comm_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1099,7 +1218,7 @@ func (x *SkillData) ProtoReflect() protoreflect.Message { // Deprecated: Use SkillData.ProtoReflect.Descriptor instead. func (*SkillData) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{14} + return file_comm_proto_rawDescGZIP(), []int{16} } func (x *SkillData) GetSkillID() int32 { @@ -1130,7 +1249,7 @@ type UserAssets struct { func (x *UserAssets) Reset() { *x = UserAssets{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[15] + mi := &file_comm_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1143,7 +1262,7 @@ func (x *UserAssets) String() string { func (*UserAssets) ProtoMessage() {} func (x *UserAssets) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[15] + mi := &file_comm_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1156,7 +1275,7 @@ func (x *UserAssets) ProtoReflect() protoreflect.Message { // Deprecated: Use UserAssets.ProtoReflect.Descriptor instead. func (*UserAssets) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{15} + return file_comm_proto_rawDescGZIP(), []int{17} } func (x *UserAssets) GetA() string { @@ -1195,7 +1314,7 @@ type UserAtno struct { func (x *UserAtno) Reset() { *x = UserAtno{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[16] + mi := &file_comm_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1208,7 +1327,7 @@ func (x *UserAtno) String() string { func (*UserAtno) ProtoMessage() {} func (x *UserAtno) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[16] + mi := &file_comm_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1221,7 +1340,7 @@ func (x *UserAtno) ProtoReflect() protoreflect.Message { // Deprecated: Use UserAtno.ProtoReflect.Descriptor instead. func (*UserAtno) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{16} + return file_comm_proto_rawDescGZIP(), []int{18} } func (x *UserAtno) GetA() string { @@ -1259,18 +1378,19 @@ type BaseUserInfo struct { unknownFields protoimpl.UnknownFields Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //uid - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //名字 - Gender int32 `protobuf:"varint,3,opt,name=gender,proto3" json:"gender"` //性别 - Skin string `protobuf:"bytes,4,opt,name=skin,proto3" json:"skin"` //皮肤 - Aframe string `protobuf:"bytes,5,opt,name=aframe,proto3" json:"aframe"` //头像框 - Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title"` //称号 - Lv int32 `protobuf:"varint,7,opt,name=lv,proto3" json:"lv"` //等级 + Sid string `protobuf:"bytes,2,opt,name=sid,proto3" json:"sid"` //区服id + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"` //名字 + Gender int32 `protobuf:"varint,4,opt,name=gender,proto3" json:"gender"` //性别 + Skin string `protobuf:"bytes,5,opt,name=skin,proto3" json:"skin"` //皮肤 + Aframe string `protobuf:"bytes,6,opt,name=aframe,proto3" json:"aframe"` //头像框 + Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title"` //称号 + Lv int32 `protobuf:"varint,8,opt,name=lv,proto3" json:"lv"` //等级 } func (x *BaseUserInfo) Reset() { *x = BaseUserInfo{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[17] + mi := &file_comm_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1283,7 +1403,7 @@ func (x *BaseUserInfo) String() string { func (*BaseUserInfo) ProtoMessage() {} func (x *BaseUserInfo) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[17] + mi := &file_comm_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1296,7 +1416,7 @@ func (x *BaseUserInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use BaseUserInfo.ProtoReflect.Descriptor instead. func (*BaseUserInfo) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{17} + return file_comm_proto_rawDescGZIP(), []int{19} } func (x *BaseUserInfo) GetUid() string { @@ -1306,6 +1426,13 @@ func (x *BaseUserInfo) GetUid() string { return "" } +func (x *BaseUserInfo) GetSid() string { + if x != nil { + return x.Sid + } + return "" +} + func (x *BaseUserInfo) GetName() string { if x != nil { return x.Name @@ -1360,7 +1487,7 @@ type TaskParam struct { func (x *TaskParam) Reset() { *x = TaskParam{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[18] + mi := &file_comm_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1373,7 +1500,7 @@ func (x *TaskParam) String() string { func (*TaskParam) ProtoMessage() {} func (x *TaskParam) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[18] + mi := &file_comm_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1386,7 +1513,7 @@ func (x *TaskParam) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskParam.ProtoReflect.Descriptor instead. func (*TaskParam) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{18} + return file_comm_proto_rawDescGZIP(), []int{20} } func (x *TaskParam) GetFirst() int32 { @@ -1416,7 +1543,7 @@ type RtaskParam struct { func (x *RtaskParam) Reset() { *x = RtaskParam{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[19] + mi := &file_comm_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1429,7 +1556,7 @@ func (x *RtaskParam) String() string { func (*RtaskParam) ProtoMessage() {} func (x *RtaskParam) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[19] + mi := &file_comm_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1442,7 +1569,7 @@ func (x *RtaskParam) ProtoReflect() protoreflect.Message { // Deprecated: Use RtaskParam.ProtoReflect.Descriptor instead. func (*RtaskParam) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{19} + return file_comm_proto_rawDescGZIP(), []int{21} } func (x *RtaskParam) GetParam1() int32 { @@ -1477,7 +1604,7 @@ type UIdReq struct { func (x *UIdReq) Reset() { *x = UIdReq{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[20] + mi := &file_comm_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1490,7 +1617,7 @@ func (x *UIdReq) String() string { func (*UIdReq) ProtoMessage() {} func (x *UIdReq) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[20] + mi := &file_comm_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1503,7 +1630,7 @@ func (x *UIdReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UIdReq.ProtoReflect.Descriptor instead. func (*UIdReq) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{20} + return file_comm_proto_rawDescGZIP(), []int{22} } func (x *UIdReq) GetUid() string { @@ -1524,7 +1651,7 @@ type NameReq struct { func (x *NameReq) Reset() { *x = NameReq{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[21] + mi := &file_comm_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1537,7 +1664,7 @@ func (x *NameReq) String() string { func (*NameReq) ProtoMessage() {} func (x *NameReq) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[21] + mi := &file_comm_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1550,7 +1677,7 @@ func (x *NameReq) ProtoReflect() protoreflect.Message { // Deprecated: Use NameReq.ProtoReflect.Descriptor instead. func (*NameReq) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{21} + return file_comm_proto_rawDescGZIP(), []int{23} } func (x *NameReq) GetName() string { @@ -1569,7 +1696,7 @@ type EmptyReq struct { func (x *EmptyReq) Reset() { *x = EmptyReq{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[22] + mi := &file_comm_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1582,7 +1709,7 @@ func (x *EmptyReq) String() string { func (*EmptyReq) ProtoMessage() {} func (x *EmptyReq) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[22] + mi := &file_comm_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1595,7 +1722,7 @@ func (x *EmptyReq) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyReq.ProtoReflect.Descriptor instead. func (*EmptyReq) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{22} + return file_comm_proto_rawDescGZIP(), []int{24} } type EmptyResp struct { @@ -1607,7 +1734,7 @@ type EmptyResp struct { func (x *EmptyResp) Reset() { *x = EmptyResp{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[23] + mi := &file_comm_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1620,7 +1747,7 @@ func (x *EmptyResp) String() string { func (*EmptyResp) ProtoMessage() {} func (x *EmptyResp) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[23] + mi := &file_comm_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1633,7 +1760,7 @@ func (x *EmptyResp) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyResp.ProtoReflect.Descriptor instead. func (*EmptyResp) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{23} + return file_comm_proto_rawDescGZIP(), []int{25} } // rpc 通用请求消息 1 @@ -1648,7 +1775,7 @@ type RPCGeneralReqA1 struct { func (x *RPCGeneralReqA1) Reset() { *x = RPCGeneralReqA1{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[24] + mi := &file_comm_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1661,7 +1788,7 @@ func (x *RPCGeneralReqA1) String() string { func (*RPCGeneralReqA1) ProtoMessage() {} func (x *RPCGeneralReqA1) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[24] + mi := &file_comm_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1674,7 +1801,7 @@ func (x *RPCGeneralReqA1) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCGeneralReqA1.ProtoReflect.Descriptor instead. func (*RPCGeneralReqA1) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{24} + return file_comm_proto_rawDescGZIP(), []int{26} } func (x *RPCGeneralReqA1) GetParam1() string { @@ -1697,7 +1824,7 @@ type RPCGeneralReqA2 struct { func (x *RPCGeneralReqA2) Reset() { *x = RPCGeneralReqA2{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[25] + mi := &file_comm_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1710,7 +1837,7 @@ func (x *RPCGeneralReqA2) String() string { func (*RPCGeneralReqA2) ProtoMessage() {} func (x *RPCGeneralReqA2) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[25] + mi := &file_comm_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1723,7 +1850,7 @@ func (x *RPCGeneralReqA2) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCGeneralReqA2.ProtoReflect.Descriptor instead. func (*RPCGeneralReqA2) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{25} + return file_comm_proto_rawDescGZIP(), []int{27} } func (x *RPCGeneralReqA2) GetParam1() string { @@ -1754,7 +1881,7 @@ type RPCGeneralReqA3 struct { func (x *RPCGeneralReqA3) Reset() { *x = RPCGeneralReqA3{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[26] + mi := &file_comm_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1767,7 +1894,7 @@ func (x *RPCGeneralReqA3) String() string { func (*RPCGeneralReqA3) ProtoMessage() {} func (x *RPCGeneralReqA3) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[26] + mi := &file_comm_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1780,7 +1907,7 @@ func (x *RPCGeneralReqA3) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCGeneralReqA3.ProtoReflect.Descriptor instead. func (*RPCGeneralReqA3) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{26} + return file_comm_proto_rawDescGZIP(), []int{28} } func (x *RPCGeneralReqA3) GetParam1() string { @@ -1819,7 +1946,7 @@ type RPCGeneralReqA4 struct { func (x *RPCGeneralReqA4) Reset() { *x = RPCGeneralReqA4{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[27] + mi := &file_comm_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1832,7 +1959,7 @@ func (x *RPCGeneralReqA4) String() string { func (*RPCGeneralReqA4) ProtoMessage() {} func (x *RPCGeneralReqA4) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[27] + mi := &file_comm_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1845,7 +1972,7 @@ func (x *RPCGeneralReqA4) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCGeneralReqA4.ProtoReflect.Descriptor instead. func (*RPCGeneralReqA4) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{27} + return file_comm_proto_rawDescGZIP(), []int{29} } func (x *RPCGeneralReqA4) GetParam1() string { @@ -1889,7 +2016,7 @@ type RPCGeneralReqB1 struct { func (x *RPCGeneralReqB1) Reset() { *x = RPCGeneralReqB1{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[28] + mi := &file_comm_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1902,7 +2029,7 @@ func (x *RPCGeneralReqB1) String() string { func (*RPCGeneralReqB1) ProtoMessage() {} func (x *RPCGeneralReqB1) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[28] + mi := &file_comm_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1915,7 +2042,7 @@ func (x *RPCGeneralReqB1) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCGeneralReqB1.ProtoReflect.Descriptor instead. func (*RPCGeneralReqB1) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{28} + return file_comm_proto_rawDescGZIP(), []int{30} } func (x *RPCGeneralReqB1) GetParam1() string { @@ -1946,7 +2073,7 @@ type RPCRTaskReq struct { func (x *RPCRTaskReq) Reset() { *x = RPCRTaskReq{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[29] + mi := &file_comm_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1959,7 +2086,7 @@ func (x *RPCRTaskReq) String() string { func (*RPCRTaskReq) ProtoMessage() {} func (x *RPCRTaskReq) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[29] + mi := &file_comm_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1972,7 +2099,7 @@ func (x *RPCRTaskReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCRTaskReq.ProtoReflect.Descriptor instead. func (*RPCRTaskReq) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{29} + return file_comm_proto_rawDescGZIP(), []int{31} } func (x *RPCRTaskReq) GetUid() string { @@ -2020,7 +2147,7 @@ type ServiceDBInfo struct { func (x *ServiceDBInfo) Reset() { *x = ServiceDBInfo{} if protoimpl.UnsafeEnabled { - mi := &file_comm_proto_msgTypes[30] + mi := &file_comm_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2033,7 +2160,7 @@ func (x *ServiceDBInfo) String() string { func (*ServiceDBInfo) ProtoMessage() {} func (x *ServiceDBInfo) ProtoReflect() protoreflect.Message { - mi := &file_comm_proto_msgTypes[30] + mi := &file_comm_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2046,7 +2173,7 @@ func (x *ServiceDBInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ServiceDBInfo.ProtoReflect.Descriptor instead. func (*ServiceDBInfo) Descriptor() ([]byte, []int) { - return file_comm_proto_rawDescGZIP(), []int{30} + return file_comm_proto_rawDescGZIP(), []int{32} } func (x *ServiceDBInfo) GetServerid() string { @@ -2224,148 +2351,161 @@ var file_comm_proto_rawDesc = []byte{ 0x01, 0x28, 0x09, 0x52, 0x07, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x75, 0x0a, 0x13, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x43, - 0x61, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, - 0x08, 0x4d, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x4d, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x75, 0x62, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x53, 0x75, 0x62, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x36, 0x0a, - 0x0e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x65, 0x52, 0x65, 0x71, 0x12, - 0x24, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xae, 0x01, 0x0a, 0x12, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, - 0x49, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x70, 0x12, 0x24, 0x0a, 0x0d, - 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x8a, 0x01, 0x0a, 0x14, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x55, 0x73, 0x65, 0x72, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, + 0x12, 0x0a, 0x04, 0x75, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, + 0x69, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4d, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x44, 0x61, 0x74, + 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x44, + 0x61, 0x74, 0x61, 0x22, 0x75, 0x0a, 0x13, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x73, 0x74, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x61, + 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4d, 0x61, + 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x28, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x36, 0x0a, 0x0e, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x65, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x0d, + 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0xaf, 0x01, 0x0a, 0x13, 0x4e, 0x6f, 0x74, 0x69, 0x63, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, - 0x0a, 0x02, 0x49, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x70, 0x12, 0x24, - 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x12, 0x2a, 0x0a, 0x10, - 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0xae, 0x01, 0x0a, 0x12, 0x4e, 0x6f, 0x74, - 0x69, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, - 0x0e, 0x0a, 0x02, 0x49, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x70, 0x12, - 0x24, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, - 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x12, 0x2a, 0x0a, - 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x09, 0x53, 0x6b, 0x69, - 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x22, 0x36, 0x0a, 0x0a, 0x55, 0x73, - 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x41, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x01, 0x41, 0x12, 0x0c, 0x0a, 0x01, 0x54, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x01, 0x54, 0x12, 0x0c, 0x0a, 0x01, 0x4e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x01, 0x4e, 0x22, 0x42, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x12, 0x0c, - 0x0a, 0x01, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x41, 0x12, 0x0c, 0x0a, 0x01, - 0x54, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x54, 0x12, 0x0c, 0x0a, 0x01, 0x4e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x4e, 0x12, 0x0c, 0x0a, 0x01, 0x4f, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x01, 0x4f, 0x22, 0x9e, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x73, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x66, 0x72, 0x61, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x39, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x22, 0x54, 0x0a, 0x0a, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x1a, 0x0a, 0x06, 0x55, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x75, 0x69, 0x64, 0x22, 0x1d, 0x0a, 0x07, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x71, 0x22, - 0x0b, 0x0a, 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x29, 0x0a, 0x0f, - 0x52, 0x50, 0x43, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x41, 0x31, 0x12, + 0x49, 0x64, 0x22, 0xae, 0x01, 0x0a, 0x12, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x70, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x70, 0x12, 0x24, 0x0a, 0x0d, 0x55, 0x73, 0x65, + 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x54, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x13, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x6f, + 0x72, 0x6b, 0x65, 0x72, 0x53, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x57, + 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x53, 0x49, 0x64, 0x22, 0xaf, 0x01, 0x0a, 0x13, 0x4e, 0x6f, 0x74, + 0x69, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x70, + 0x12, 0x24, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, + 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x12, 0x2a, + 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0xae, 0x01, 0x0a, 0x12, 0x4e, + 0x6f, 0x74, 0x69, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, + 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, + 0x70, 0x12, 0x24, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x1e, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x61, 0x67, 0x12, + 0x2a, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x09, 0x53, + 0x6b, 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, + 0x6c, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, + 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x22, 0x36, 0x0a, 0x0a, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x41, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x41, 0x12, 0x0c, 0x0a, 0x01, 0x54, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x01, 0x54, 0x12, 0x0c, 0x0a, 0x01, 0x4e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x01, 0x4e, 0x22, 0x42, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, + 0x12, 0x0c, 0x0a, 0x01, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x41, 0x12, 0x0c, + 0x0a, 0x01, 0x54, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x54, 0x12, 0x0c, 0x0a, 0x01, + 0x4e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x4e, 0x12, 0x0c, 0x0a, 0x01, 0x4f, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x4f, 0x22, 0xb0, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x73, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6c, + 0x76, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x39, 0x0a, 0x09, 0x54, + 0x61, 0x73, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x54, 0x0a, 0x0a, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x1a, 0x0a, 0x06, + 0x55, 0x49, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x1d, 0x0a, 0x07, 0x4e, 0x61, 0x6d, 0x65, + 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x52, 0x65, 0x71, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x29, 0x0a, 0x0f, 0x52, 0x50, 0x43, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, + 0x71, 0x41, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0x41, 0x0a, 0x0f, 0x52, + 0x50, 0x43, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x41, 0x32, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x22, 0x59, + 0x0a, 0x0f, 0x52, 0x50, 0x43, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x41, + 0x33, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x71, 0x0a, 0x0f, 0x52, 0x50, 0x43, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x41, 0x34, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x33, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x34, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x34, 0x22, 0x41, 0x0a, 0x0f, + 0x52, 0x50, 0x43, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x42, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0x41, 0x0a, 0x0f, 0x52, 0x50, 0x43, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x41, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x22, 0x59, 0x0a, 0x0f, 0x52, 0x50, - 0x43, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x41, 0x33, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x71, 0x0a, 0x0f, 0x52, 0x50, 0x43, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x41, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x34, 0x22, 0x41, 0x0a, 0x0f, 0x52, 0x50, 0x43, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x42, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x22, 0x51, 0x0a, 0x0b, 0x52, - 0x50, 0x43, 0x52, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x22, 0xa1, - 0x03, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x42, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x6f, 0x73, - 0x73, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x6f, 0x73, 0x73, - 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x49, 0x73, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x72, 0x65, 0x64, 0x69, - 0x73, 0x49, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, - 0x64, 0x69, 0x73, 0x41, 0x64, 0x64, 0x72, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x72, - 0x65, 0x64, 0x69, 0x73, 0x41, 0x64, 0x64, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x64, 0x69, - 0x73, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x72, 0x65, 0x64, 0x69, 0x73, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x72, 0x65, 0x64, 0x69, 0x73, 0x44, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x72, 0x65, 0x64, 0x69, 0x73, 0x44, 0x62, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x6f, 0x6e, 0x67, - 0x6f, 0x64, 0x62, 0x55, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4d, 0x6f, - 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x55, 0x72, 0x6c, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x67, - 0x6f, 0x64, 0x62, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x2a, 0x43, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x48, 0x70, 0x10, 0x00, - 0x12, 0x07, 0x0a, 0x03, 0x41, 0x74, 0x6b, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x65, 0x66, - 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x70, 0x65, 0x65, 0x64, 0x10, 0x03, 0x12, 0x08, 0x0a, - 0x04, 0x43, 0x72, 0x69, 0x74, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x32, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x22, + 0x51, 0x0a, 0x0b, 0x52, 0x50, 0x43, 0x52, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x22, 0xa1, 0x03, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x42, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x69, 0x64, + 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x72, 0x6f, 0x73, 0x73, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x72, 0x6f, 0x73, 0x73, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, + 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x70, + 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x49, + 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x72, 0x65, 0x64, 0x69, 0x73, 0x49, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1c, + 0x0a, 0x09, 0x72, 0x65, 0x64, 0x69, 0x73, 0x41, 0x64, 0x64, 0x72, 0x18, 0x09, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, 0x69, 0x73, 0x41, 0x64, 0x64, 0x72, 0x12, 0x24, 0x0a, 0x0d, + 0x72, 0x65, 0x64, 0x69, 0x73, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x64, 0x69, 0x73, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x64, 0x69, 0x73, 0x44, 0x62, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x64, 0x69, 0x73, 0x44, 0x62, 0x12, 0x1e, 0x0a, 0x0a, + 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x55, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x55, 0x72, 0x6c, 0x12, 0x28, 0x0a, 0x0f, + 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x44, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2a, 0x43, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, + 0x48, 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x74, 0x6b, 0x10, 0x01, 0x12, 0x07, 0x0a, + 0x03, 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x70, 0x65, 0x65, 0x64, 0x10, + 0x03, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, 0x74, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2381,59 +2521,62 @@ func file_comm_proto_rawDescGZIP() []byte { } var file_comm_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_comm_proto_goTypes = []interface{}{ - (HeroAttributesType)(0), // 0: HeroAttributesType - (*ErrorData)(nil), // 1: ErrorData - (*MessagePackage)(nil), // 2: MessagePackage - (*UserMessage)(nil), // 3: UserMessage - (*AgentMessage)(nil), // 4: AgentMessage - (*RPCMessageReply)(nil), // 5: RPCMessageReply - (*AgentBuildReq)(nil), // 6: AgentBuildReq - (*AgentUnBuildReq)(nil), // 7: AgentUnBuildReq - (*AgentSendMessageReq)(nil), // 8: AgentSendMessageReq - (*BatchMessageReq)(nil), // 9: BatchMessageReq - (*BroadCastMessageReq)(nil), // 10: BroadCastMessageReq - (*AgentCloseeReq)(nil), // 11: AgentCloseeReq - (*NoticeUserLoginReq)(nil), // 12: NoticeUserLoginReq - (*NoticeUserCreateReq)(nil), // 13: NoticeUserCreateReq - (*NoticeUserCloseReq)(nil), // 14: NoticeUserCloseReq - (*SkillData)(nil), // 15: SkillData - (*UserAssets)(nil), // 16: UserAssets - (*UserAtno)(nil), // 17: UserAtno - (*BaseUserInfo)(nil), // 18: BaseUserInfo - (*TaskParam)(nil), // 19: TaskParam - (*RtaskParam)(nil), // 20: RtaskParam - (*UIdReq)(nil), // 21: UIdReq - (*NameReq)(nil), // 22: NameReq - (*EmptyReq)(nil), // 23: EmptyReq - (*EmptyResp)(nil), // 24: EmptyResp - (*RPCGeneralReqA1)(nil), // 25: RPCGeneralReqA1 - (*RPCGeneralReqA2)(nil), // 26: RPCGeneralReqA2 - (*RPCGeneralReqA3)(nil), // 27: RPCGeneralReqA3 - (*RPCGeneralReqA4)(nil), // 28: RPCGeneralReqA4 - (*RPCGeneralReqB1)(nil), // 29: RPCGeneralReqB1 - (*RPCRTaskReq)(nil), // 30: RPCRTaskReq - (*ServiceDBInfo)(nil), // 31: ServiceDBInfo - (ErrorCode)(0), // 32: ErrorCode - (*anypb.Any)(nil), // 33: google.protobuf.Any + (HeroAttributesType)(0), // 0: HeroAttributesType + (*ErrorData)(nil), // 1: ErrorData + (*MessagePackage)(nil), // 2: MessagePackage + (*UserMessage)(nil), // 3: UserMessage + (*AgentMessage)(nil), // 4: AgentMessage + (*RPCMessageReply)(nil), // 5: RPCMessageReply + (*AgentBuildReq)(nil), // 6: AgentBuildReq + (*AgentUnBuildReq)(nil), // 7: AgentUnBuildReq + (*AgentSendMessageReq)(nil), // 8: AgentSendMessageReq + (*BatchMessageReq)(nil), // 9: BatchMessageReq + (*BatchUsersMessageReq)(nil), // 10: BatchUsersMessageReq + (*BroadCastMessageReq)(nil), // 11: BroadCastMessageReq + (*AgentCloseeReq)(nil), // 12: AgentCloseeReq + (*NoticeUserLoginReq)(nil), // 13: NoticeUserLoginReq + (*NoticeUserLoginResp)(nil), // 14: NoticeUserLoginResp + (*NoticeUserCreateReq)(nil), // 15: NoticeUserCreateReq + (*NoticeUserCloseReq)(nil), // 16: NoticeUserCloseReq + (*SkillData)(nil), // 17: SkillData + (*UserAssets)(nil), // 18: UserAssets + (*UserAtno)(nil), // 19: UserAtno + (*BaseUserInfo)(nil), // 20: BaseUserInfo + (*TaskParam)(nil), // 21: TaskParam + (*RtaskParam)(nil), // 22: RtaskParam + (*UIdReq)(nil), // 23: UIdReq + (*NameReq)(nil), // 24: NameReq + (*EmptyReq)(nil), // 25: EmptyReq + (*EmptyResp)(nil), // 26: EmptyResp + (*RPCGeneralReqA1)(nil), // 27: RPCGeneralReqA1 + (*RPCGeneralReqA2)(nil), // 28: RPCGeneralReqA2 + (*RPCGeneralReqA3)(nil), // 29: RPCGeneralReqA3 + (*RPCGeneralReqA4)(nil), // 30: RPCGeneralReqA4 + (*RPCGeneralReqB1)(nil), // 31: RPCGeneralReqB1 + (*RPCRTaskReq)(nil), // 32: RPCRTaskReq + (*ServiceDBInfo)(nil), // 33: ServiceDBInfo + (ErrorCode)(0), // 34: ErrorCode + (*anypb.Any)(nil), // 35: google.protobuf.Any } var file_comm_proto_depIdxs = []int32{ - 32, // 0: ErrorData.code:type_name -> ErrorCode - 16, // 1: ErrorData.atn:type_name -> UserAssets + 34, // 0: ErrorData.code:type_name -> ErrorCode + 18, // 1: ErrorData.atn:type_name -> UserAssets 3, // 2: MessagePackage.messages:type_name -> UserMessage - 33, // 3: UserMessage.data:type_name -> google.protobuf.Any - 33, // 4: AgentMessage.Message:type_name -> google.protobuf.Any + 35, // 3: UserMessage.data:type_name -> google.protobuf.Any + 35, // 4: AgentMessage.Message:type_name -> google.protobuf.Any 1, // 5: RPCMessageReply.ErrorData:type_name -> ErrorData 3, // 6: RPCMessageReply.Reply:type_name -> UserMessage 3, // 7: AgentSendMessageReq.Reply:type_name -> UserMessage - 33, // 8: BatchMessageReq.Data:type_name -> google.protobuf.Any - 33, // 9: BroadCastMessageReq.Data:type_name -> google.protobuf.Any - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 35, // 8: BatchMessageReq.Data:type_name -> google.protobuf.Any + 35, // 9: BatchUsersMessageReq.Data:type_name -> google.protobuf.Any + 35, // 10: BroadCastMessageReq.Data:type_name -> google.protobuf.Any + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_comm_proto_init() } @@ -2552,7 +2695,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BroadCastMessageReq); i { + switch v := v.(*BatchUsersMessageReq); i { case 0: return &v.state case 1: @@ -2564,7 +2707,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AgentCloseeReq); i { + switch v := v.(*BroadCastMessageReq); i { case 0: return &v.state case 1: @@ -2576,7 +2719,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NoticeUserLoginReq); i { + switch v := v.(*AgentCloseeReq); i { case 0: return &v.state case 1: @@ -2588,7 +2731,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NoticeUserCreateReq); i { + switch v := v.(*NoticeUserLoginReq); i { case 0: return &v.state case 1: @@ -2600,7 +2743,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NoticeUserCloseReq); i { + switch v := v.(*NoticeUserLoginResp); i { case 0: return &v.state case 1: @@ -2612,7 +2755,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SkillData); i { + switch v := v.(*NoticeUserCreateReq); i { case 0: return &v.state case 1: @@ -2624,7 +2767,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserAssets); i { + switch v := v.(*NoticeUserCloseReq); i { case 0: return &v.state case 1: @@ -2636,7 +2779,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserAtno); i { + switch v := v.(*SkillData); i { case 0: return &v.state case 1: @@ -2648,7 +2791,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BaseUserInfo); i { + switch v := v.(*UserAssets); i { case 0: return &v.state case 1: @@ -2660,7 +2803,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskParam); i { + switch v := v.(*UserAtno); i { case 0: return &v.state case 1: @@ -2672,7 +2815,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RtaskParam); i { + switch v := v.(*BaseUserInfo); i { case 0: return &v.state case 1: @@ -2684,7 +2827,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UIdReq); i { + switch v := v.(*TaskParam); i { case 0: return &v.state case 1: @@ -2696,7 +2839,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NameReq); i { + switch v := v.(*RtaskParam); i { case 0: return &v.state case 1: @@ -2708,7 +2851,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyReq); i { + switch v := v.(*UIdReq); i { case 0: return &v.state case 1: @@ -2720,7 +2863,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyResp); i { + switch v := v.(*NameReq); i { case 0: return &v.state case 1: @@ -2732,7 +2875,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCGeneralReqA1); i { + switch v := v.(*EmptyReq); i { case 0: return &v.state case 1: @@ -2744,7 +2887,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCGeneralReqA2); i { + switch v := v.(*EmptyResp); i { case 0: return &v.state case 1: @@ -2756,7 +2899,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCGeneralReqA3); i { + switch v := v.(*RPCGeneralReqA1); i { case 0: return &v.state case 1: @@ -2768,7 +2911,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCGeneralReqA4); i { + switch v := v.(*RPCGeneralReqA2); i { case 0: return &v.state case 1: @@ -2780,7 +2923,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCGeneralReqB1); i { + switch v := v.(*RPCGeneralReqA3); i { case 0: return &v.state case 1: @@ -2792,7 +2935,7 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCRTaskReq); i { + switch v := v.(*RPCGeneralReqA4); i { case 0: return &v.state case 1: @@ -2804,6 +2947,30 @@ func file_comm_proto_init() { } } file_comm_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RPCGeneralReqB1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_comm_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RPCRTaskReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_comm_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServiceDBInfo); i { case 0: return &v.state @@ -2822,7 +2989,7 @@ func file_comm_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_comm_proto_rawDesc, NumEnums: 1, - NumMessages: 31, + NumMessages: 33, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/dcolor_db.pb.go b/pb/dcolor_db.pb.go index 61957d998..8b4f52bbd 100644 --- a/pb/dcolor_db.pb.go +++ b/pb/dcolor_db.pb.go @@ -70,70 +70,6 @@ func (DBDColorDifficulty) EnumDescriptor() ([]byte, []int) { return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{0} } -type DBDColorColor int32 - -const ( - DBDColorColor_Color_0 DBDColorColor = 0 - DBDColorColor_Color_1 DBDColorColor = 1 - DBDColorColor_Color_2 DBDColorColor = 2 - DBDColorColor_Color_3 DBDColorColor = 3 - DBDColorColor_Color_4 DBDColorColor = 4 - DBDColorColor_Color_5 DBDColorColor = 5 - DBDColorColor_Color_6 DBDColorColor = 6 - DBDColorColor_Color_7 DBDColorColor = 7 -) - -// Enum value maps for DBDColorColor. -var ( - DBDColorColor_name = map[int32]string{ - 0: "Color_0", - 1: "Color_1", - 2: "Color_2", - 3: "Color_3", - 4: "Color_4", - 5: "Color_5", - 6: "Color_6", - 7: "Color_7", - } - DBDColorColor_value = map[string]int32{ - "Color_0": 0, - "Color_1": 1, - "Color_2": 2, - "Color_3": 3, - "Color_4": 4, - "Color_5": 5, - "Color_6": 6, - "Color_7": 7, - } -) - -func (x DBDColorColor) Enum() *DBDColorColor { - p := new(DBDColorColor) - *p = x - return p -} - -func (x DBDColorColor) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DBDColorColor) Descriptor() protoreflect.EnumDescriptor { - return file_dcolor_dcolor_db_proto_enumTypes[1].Descriptor() -} - -func (DBDColorColor) Type() protoreflect.EnumType { - return &file_dcolor_dcolor_db_proto_enumTypes[1] -} - -func (x DBDColorColor) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DBDColorColor.Descriptor instead. -func (DBDColorColor) EnumDescriptor() ([]byte, []int) { - return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{1} -} - //切磋请求记录 type DBDColor struct { state protoimpl.MessageState @@ -449,11 +385,11 @@ type DBDColorResult struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` - Results []DBDColorColor `protobuf:"varint,3,rep,packed,name=results,proto3,enum=DBDColorColor" json:"results"` - Allright int32 `protobuf:"varint,4,opt,name=allright,proto3" json:"allright"` - Halfpair int32 `protobuf:"varint,5,opt,name=halfpair,proto3" json:"halfpair"` + Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` + Results []int32 `protobuf:"varint,3,rep,packed,name=results,proto3" json:"results"` + Allright int32 `protobuf:"varint,4,opt,name=allright,proto3" json:"allright"` + Halfpair int32 `protobuf:"varint,5,opt,name=halfpair,proto3" json:"halfpair"` } func (x *DBDColorResult) Reset() { @@ -502,7 +438,7 @@ func (x *DBDColorResult) GetUid() string { return "" } -func (x *DBDColorResult) GetResults() []DBDColorColor { +func (x *DBDColorResult) GetResults() []int32 { if x != nil { return x.Results } @@ -530,7 +466,7 @@ type DBDColorRoom struct { unknownFields protoimpl.UnknownFields Rid string `protobuf:"bytes,1,opt,name=rid,proto3" json:"rid"` - Results []DBDColorColor `protobuf:"varint,2,rep,packed,name=results,proto3,enum=DBDColorColor" json:"results"` + Results []int32 `protobuf:"varint,2,rep,packed,name=results,proto3" json:"results"` Red *DBDColorRoomPlayer `protobuf:"bytes,3,opt,name=red,proto3" json:"red"` Blue *DBDColorRoomPlayer `protobuf:"bytes,4,opt,name=blue,proto3" json:"blue"` Handles []*DBDColorResult `protobuf:"bytes,5,rep,name=handles,proto3" json:"handles"` @@ -575,7 +511,7 @@ func (x *DBDColorRoom) GetRid() string { return "" } -func (x *DBDColorRoom) GetResults() []DBDColorColor { +func (x *DBDColorRoom) GetResults() []int32 { if x != nil { return x.Results } @@ -645,20 +581,18 @@ var file_dcolor_dcolor_db_proto_rawDesc = []byte{ 0x73, 0x61, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, - 0x9a, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, + 0x8a, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x44, 0x42, - 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x07, 0x72, 0x65, 0x73, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x6c, 0x72, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x72, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x61, 0x6c, 0x66, 0x70, 0x61, 0x69, 0x72, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x68, 0x61, 0x6c, 0x66, 0x70, 0x61, 0x69, 0x72, 0x22, 0xc5, 0x01, 0x0a, + 0x28, 0x05, 0x52, 0x08, 0x68, 0x61, 0x6c, 0x66, 0x70, 0x61, 0x69, 0x72, 0x22, 0xb5, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, - 0x28, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, - 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, @@ -671,15 +605,7 @@ var file_dcolor_dcolor_db_proto_rawDesc = []byte{ 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x65, 0x6c, 0x6c, 0x10, 0x02, - 0x2a, 0x77, 0x0a, 0x0d, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x43, 0x6f, 0x6c, 0x6f, - 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x30, 0x10, 0x00, 0x12, 0x0b, - 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, - 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, - 0x72, 0x5f, 0x33, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x34, - 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x35, 0x10, 0x05, 0x12, - 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x36, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x37, 0x10, 0x07, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -694,33 +620,30 @@ func file_dcolor_dcolor_db_proto_rawDescGZIP() []byte { return file_dcolor_dcolor_db_proto_rawDescData } -var file_dcolor_dcolor_db_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_dcolor_dcolor_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_dcolor_dcolor_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_dcolor_dcolor_db_proto_goTypes = []interface{}{ (DBDColorDifficulty)(0), // 0: DBDColorDifficulty - (DBDColorColor)(0), // 1: DBDColorColor - (*DBDColor)(nil), // 2: DBDColor - (*DBDColorQiecuoInvite)(nil), // 3: DBDColorQiecuoInvite - (*DBDColorQiecuoRecord)(nil), // 4: DBDColorQiecuoRecord - (*DBDColorRoomPlayer)(nil), // 5: DBDColorRoomPlayer - (*DBDColorResult)(nil), // 6: DBDColorResult - (*DBDColorRoom)(nil), // 7: DBDColorRoom - (*BaseUserInfo)(nil), // 8: BaseUserInfo + (*DBDColor)(nil), // 1: DBDColor + (*DBDColorQiecuoInvite)(nil), // 2: DBDColorQiecuoInvite + (*DBDColorQiecuoRecord)(nil), // 3: DBDColorQiecuoRecord + (*DBDColorRoomPlayer)(nil), // 4: DBDColorRoomPlayer + (*DBDColorResult)(nil), // 5: DBDColorResult + (*DBDColorRoom)(nil), // 6: DBDColorRoom + (*BaseUserInfo)(nil), // 7: BaseUserInfo } var file_dcolor_dcolor_db_proto_depIdxs = []int32{ - 3, // 0: DBDColorQiecuoRecord.targets:type_name -> DBDColorQiecuoInvite + 2, // 0: DBDColorQiecuoRecord.targets:type_name -> DBDColorQiecuoInvite 0, // 1: DBDColorQiecuoRecord.difficulty:type_name -> DBDColorDifficulty - 8, // 2: DBDColorRoomPlayer.info:type_name -> BaseUserInfo - 1, // 3: DBDColorResult.results:type_name -> DBDColorColor - 1, // 4: DBDColorRoom.results:type_name -> DBDColorColor - 5, // 5: DBDColorRoom.red:type_name -> DBDColorRoomPlayer - 5, // 6: DBDColorRoom.blue:type_name -> DBDColorRoomPlayer - 6, // 7: DBDColorRoom.handles:type_name -> DBDColorResult - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 7, // 2: DBDColorRoomPlayer.info:type_name -> BaseUserInfo + 4, // 3: DBDColorRoom.red:type_name -> DBDColorRoomPlayer + 4, // 4: DBDColorRoom.blue:type_name -> DBDColorRoomPlayer + 5, // 5: DBDColorRoom.handles:type_name -> DBDColorResult + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_dcolor_dcolor_db_proto_init() } @@ -808,7 +731,7 @@ func file_dcolor_dcolor_db_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_dcolor_dcolor_db_proto_rawDesc, - NumEnums: 2, + NumEnums: 1, NumMessages: 6, NumExtensions: 0, NumServices: 0, diff --git a/pb/dcolor_msg.pb.go b/pb/dcolor_msg.pb.go index 62f6f5682..175574f80 100644 --- a/pb/dcolor_msg.pb.go +++ b/pb/dcolor_msg.pb.go @@ -168,7 +168,7 @@ type DColorSingleResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Results []DBDColorColor `protobuf:"varint,2,rep,packed,name=results,proto3,enum=DBDColorColor" json:"results"` + Results []int32 `protobuf:"varint,2,rep,packed,name=results,proto3" json:"results"` } func (x *DColorSingleResp) Reset() { @@ -203,7 +203,7 @@ func (*DColorSingleResp) Descriptor() ([]byte, []int) { return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{3} } -func (x *DColorSingleResp) GetResults() []DBDColorColor { +func (x *DColorSingleResp) GetResults() []int32 { if x != nil { return x.Results } @@ -218,7 +218,7 @@ type DColorSingleOverReq struct { Difficulty DBDColorDifficulty `protobuf:"varint,1,opt,name=difficulty,proto3,enum=DBDColorDifficulty" json:"difficulty"` Repeat bool `protobuf:"varint,2,opt,name=Repeat,proto3" json:"Repeat"` - Results []DBDColorColor `protobuf:"varint,3,rep,packed,name=results,proto3,enum=DBDColorColor" json:"results"` + Results []int32 `protobuf:"varint,3,rep,packed,name=results,proto3" json:"results"` Handles []*DBDColorResult `protobuf:"bytes,4,rep,name=handles,proto3" json:"handles"` Time float32 `protobuf:"fixed32,5,opt,name=time,proto3" json:"time"` } @@ -269,7 +269,7 @@ func (x *DColorSingleOverReq) GetRepeat() bool { return false } -func (x *DColorSingleOverReq) GetResults() []DBDColorColor { +func (x *DColorSingleOverReq) GetResults() []int32 { if x != nil { return x.Results } @@ -948,8 +948,8 @@ type DColorHandleReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"` - Results []DBDColorColor `protobuf:"varint,2,rep,packed,name=results,proto3,enum=DBDColorColor" json:"results"` + Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"` + Results []int32 `protobuf:"varint,2,rep,packed,name=results,proto3" json:"results"` } func (x *DColorHandleReq) Reset() { @@ -991,7 +991,7 @@ func (x *DColorHandleReq) GetIndex() int32 { return 0 } -func (x *DColorHandleReq) GetResults() []DBDColorColor { +func (x *DColorHandleReq) GetResults() []int32 { if x != nil { return x.Results } @@ -1174,19 +1174,17 @@ var file_dcolor_dcolor_msg_proto_rawDesc = []byte{ 0x72, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x22, - 0x3c, 0x0a, 0x10, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x43, - 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xcb, 0x01, + 0x2c, 0x0a, 0x10, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x13, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x52, 0x65, 0x70, 0x65, - 0x61, 0x74, 0x12, 0x28, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x43, 0x6f, - 0x6c, 0x6f, 0x72, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x07, + 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, @@ -1245,12 +1243,11 @@ var file_dcolor_dcolor_msg_proto_rawDesc = []byte{ 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, 0x22, 0x51, 0x0a, 0x0f, 0x44, 0x43, 0x6f, 0x6c, + 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, 0x22, 0x41, 0x0a, 0x0f, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x28, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x43, 0x6f, 0x6c, - 0x6f, 0x72, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x44, + 0x78, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x51, 0x0a, 0x14, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, @@ -1305,29 +1302,25 @@ var file_dcolor_dcolor_msg_proto_goTypes = []interface{}{ (*DColorGameOverPush)(nil), // 20: DColorGameOverPush (*DBDColor)(nil), // 21: DBDColor (DBDColorDifficulty)(0), // 22: DBDColorDifficulty - (DBDColorColor)(0), // 23: DBDColorColor - (*DBDColorResult)(nil), // 24: DBDColorResult - (*BaseUserInfo)(nil), // 25: BaseUserInfo - (*DBDColorRoom)(nil), // 26: DBDColorRoom + (*DBDColorResult)(nil), // 23: DBDColorResult + (*BaseUserInfo)(nil), // 24: BaseUserInfo + (*DBDColorRoom)(nil), // 25: DBDColorRoom } var file_dcolor_dcolor_msg_proto_depIdxs = []int32{ 21, // 0: DColorInfoResp.info:type_name -> DBDColor 22, // 1: DColorSingleReq.difficulty:type_name -> DBDColorDifficulty - 23, // 2: DColorSingleResp.results:type_name -> DBDColorColor - 22, // 3: DColorSingleOverReq.difficulty:type_name -> DBDColorDifficulty - 23, // 4: DColorSingleOverReq.results:type_name -> DBDColorColor - 24, // 5: DColorSingleOverReq.handles:type_name -> DBDColorResult - 22, // 6: DColorQiecuoReq.difficulty:type_name -> DBDColorDifficulty - 25, // 7: DColorQiecuonotifyPush.user:type_name -> BaseUserInfo - 22, // 8: DColorQiecuonotifyPush.difficulty:type_name -> DBDColorDifficulty - 26, // 9: DColorGameReadyPush.room:type_name -> DBDColorRoom - 23, // 10: DColorHandleReq.results:type_name -> DBDColorColor - 24, // 11: DColorGameHandlePush.handle:type_name -> DBDColorResult - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 22, // 2: DColorSingleOverReq.difficulty:type_name -> DBDColorDifficulty + 23, // 3: DColorSingleOverReq.handles:type_name -> DBDColorResult + 22, // 4: DColorQiecuoReq.difficulty:type_name -> DBDColorDifficulty + 24, // 5: DColorQiecuonotifyPush.user:type_name -> BaseUserInfo + 22, // 6: DColorQiecuonotifyPush.difficulty:type_name -> DBDColorDifficulty + 25, // 7: DColorGameReadyPush.room:type_name -> DBDColorRoom + 23, // 8: DColorGameHandlePush.handle:type_name -> DBDColorResult + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_dcolor_dcolor_msg_proto_init() } diff --git a/pb/maincity_db.pb.go b/pb/maincity_db.pb.go new file mode 100644 index 000000000..1b8dbb573 --- /dev/null +++ b/pb/maincity_db.pb.go @@ -0,0 +1,311 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: maincity/maincity_db.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MainCityScene int32 + +const ( + MainCityScene_MainCity MainCityScene = 0 //主城 + MainCityScene_WUGUAN MainCityScene = 1 //武馆 +) + +// Enum value maps for MainCityScene. +var ( + MainCityScene_name = map[int32]string{ + 0: "MainCity", + 1: "WUGUAN", + } + MainCityScene_value = map[string]int32{ + "MainCity": 0, + "WUGUAN": 1, + } +) + +func (x MainCityScene) Enum() *MainCityScene { + p := new(MainCityScene) + *p = x + return p +} + +func (x MainCityScene) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MainCityScene) Descriptor() protoreflect.EnumDescriptor { + return file_maincity_maincity_db_proto_enumTypes[0].Descriptor() +} + +func (MainCityScene) Type() protoreflect.EnumType { + return &file_maincity_maincity_db_proto_enumTypes[0] +} + +func (x MainCityScene) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MainCityScene.Descriptor instead. +func (MainCityScene) EnumDescriptor() ([]byte, []int) { + return file_maincity_maincity_db_proto_rawDescGZIP(), []int{0} +} + +type DBVector3 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x"` + Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y"` + Z float32 `protobuf:"fixed32,3,opt,name=z,proto3" json:"z"` +} + +func (x *DBVector3) Reset() { + *x = DBVector3{} + if protoimpl.UnsafeEnabled { + mi := &file_maincity_maincity_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBVector3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBVector3) ProtoMessage() {} + +func (x *DBVector3) ProtoReflect() protoreflect.Message { + mi := &file_maincity_maincity_db_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBVector3.ProtoReflect.Descriptor instead. +func (*DBVector3) Descriptor() ([]byte, []int) { + return file_maincity_maincity_db_proto_rawDescGZIP(), []int{0} +} + +func (x *DBVector3) GetX() float32 { + if x != nil { + return x.X + } + return 0 +} + +func (x *DBVector3) GetY() float32 { + if x != nil { + return x.Y + } + return 0 +} + +func (x *DBVector3) GetZ() float32 { + if x != nil { + return x.Z + } + return 0 +} + +type DBMainCityPos struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Player *BaseUserInfo `protobuf:"bytes,1,opt,name=player,proto3" json:"player"` + Pos *DBVector3 `protobuf:"bytes,2,opt,name=pos,proto3" json:"pos"` + Target *DBVector3 `protobuf:"bytes,3,opt,name=target,proto3" json:"target"` + Scene MainCityScene `protobuf:"varint,4,opt,name=scene,proto3,enum=MainCityScene" json:"scene"` +} + +func (x *DBMainCityPos) Reset() { + *x = DBMainCityPos{} + if protoimpl.UnsafeEnabled { + mi := &file_maincity_maincity_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBMainCityPos) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBMainCityPos) ProtoMessage() {} + +func (x *DBMainCityPos) ProtoReflect() protoreflect.Message { + mi := &file_maincity_maincity_db_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBMainCityPos.ProtoReflect.Descriptor instead. +func (*DBMainCityPos) Descriptor() ([]byte, []int) { + return file_maincity_maincity_db_proto_rawDescGZIP(), []int{1} +} + +func (x *DBMainCityPos) GetPlayer() *BaseUserInfo { + if x != nil { + return x.Player + } + return nil +} + +func (x *DBMainCityPos) GetPos() *DBVector3 { + if x != nil { + return x.Pos + } + return nil +} + +func (x *DBMainCityPos) GetTarget() *DBVector3 { + if x != nil { + return x.Target + } + return nil +} + +func (x *DBMainCityPos) GetScene() MainCityScene { + if x != nil { + return x.Scene + } + return MainCityScene_MainCity +} + +var File_maincity_maincity_db_proto protoreflect.FileDescriptor + +var file_maincity_maincity_db_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x6d, 0x61, 0x69, 0x6e, 0x63, 0x69, 0x74, 0x79, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x63, + 0x69, 0x74, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, + 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x35, 0x0a, 0x09, 0x44, 0x42, 0x56, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x33, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, + 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x7a, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x7a, 0x22, + 0x9e, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x50, 0x6f, + 0x73, 0x12, 0x25, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x06, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x33, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x12, 0x22, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x56, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x33, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x73, 0x63, + 0x65, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x4d, 0x61, 0x69, 0x6e, + 0x43, 0x69, 0x74, 0x79, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x52, 0x05, 0x73, 0x63, 0x65, 0x6e, 0x65, + 0x2a, 0x29, 0x0a, 0x0d, 0x4d, 0x61, 0x69, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x53, 0x63, 0x65, 0x6e, + 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x61, 0x69, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x57, 0x55, 0x47, 0x55, 0x41, 0x4e, 0x10, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_maincity_maincity_db_proto_rawDescOnce sync.Once + file_maincity_maincity_db_proto_rawDescData = file_maincity_maincity_db_proto_rawDesc +) + +func file_maincity_maincity_db_proto_rawDescGZIP() []byte { + file_maincity_maincity_db_proto_rawDescOnce.Do(func() { + file_maincity_maincity_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_maincity_maincity_db_proto_rawDescData) + }) + return file_maincity_maincity_db_proto_rawDescData +} + +var file_maincity_maincity_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_maincity_maincity_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_maincity_maincity_db_proto_goTypes = []interface{}{ + (MainCityScene)(0), // 0: MainCityScene + (*DBVector3)(nil), // 1: DBVector3 + (*DBMainCityPos)(nil), // 2: DBMainCityPos + (*BaseUserInfo)(nil), // 3: BaseUserInfo +} +var file_maincity_maincity_db_proto_depIdxs = []int32{ + 3, // 0: DBMainCityPos.player:type_name -> BaseUserInfo + 1, // 1: DBMainCityPos.pos:type_name -> DBVector3 + 1, // 2: DBMainCityPos.target:type_name -> DBVector3 + 0, // 3: DBMainCityPos.scene:type_name -> MainCityScene + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_maincity_maincity_db_proto_init() } +func file_maincity_maincity_db_proto_init() { + if File_maincity_maincity_db_proto != nil { + return + } + file_comm_proto_init() + if !protoimpl.UnsafeEnabled { + file_maincity_maincity_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBVector3); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_maincity_maincity_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBMainCityPos); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_maincity_maincity_db_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_maincity_maincity_db_proto_goTypes, + DependencyIndexes: file_maincity_maincity_db_proto_depIdxs, + EnumInfos: file_maincity_maincity_db_proto_enumTypes, + MessageInfos: file_maincity_maincity_db_proto_msgTypes, + }.Build() + File_maincity_maincity_db_proto = out.File + file_maincity_maincity_db_proto_rawDesc = nil + file_maincity_maincity_db_proto_goTypes = nil + file_maincity_maincity_db_proto_depIdxs = nil +} diff --git a/pb/maincity_msg.pb.go b/pb/maincity_msg.pb.go new file mode 100644 index 000000000..dc53b498f --- /dev/null +++ b/pb/maincity_msg.pb.go @@ -0,0 +1,214 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: maincity/maincity_msg.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +//同步 无回应 +type MainCitySynchPosPeek struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pos *DBMainCityPos `protobuf:"bytes,1,opt,name=pos,proto3" json:"pos"` +} + +func (x *MainCitySynchPosPeek) Reset() { + *x = MainCitySynchPosPeek{} + if protoimpl.UnsafeEnabled { + mi := &file_maincity_maincity_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MainCitySynchPosPeek) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MainCitySynchPosPeek) ProtoMessage() {} + +func (x *MainCitySynchPosPeek) ProtoReflect() protoreflect.Message { + mi := &file_maincity_maincity_msg_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MainCitySynchPosPeek.ProtoReflect.Descriptor instead. +func (*MainCitySynchPosPeek) Descriptor() ([]byte, []int) { + return file_maincity_maincity_msg_proto_rawDescGZIP(), []int{0} +} + +func (x *MainCitySynchPosPeek) GetPos() *DBMainCityPos { + if x != nil { + return x.Pos + } + return nil +} + +//坐标同步 +type MainCitySynchPosPush struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pos *DBMainCityPos `protobuf:"bytes,1,opt,name=pos,proto3" json:"pos"` +} + +func (x *MainCitySynchPosPush) Reset() { + *x = MainCitySynchPosPush{} + if protoimpl.UnsafeEnabled { + mi := &file_maincity_maincity_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MainCitySynchPosPush) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MainCitySynchPosPush) ProtoMessage() {} + +func (x *MainCitySynchPosPush) ProtoReflect() protoreflect.Message { + mi := &file_maincity_maincity_msg_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MainCitySynchPosPush.ProtoReflect.Descriptor instead. +func (*MainCitySynchPosPush) Descriptor() ([]byte, []int) { + return file_maincity_maincity_msg_proto_rawDescGZIP(), []int{1} +} + +func (x *MainCitySynchPosPush) GetPos() *DBMainCityPos { + if x != nil { + return x.Pos + } + return nil +} + +var File_maincity_maincity_msg_proto protoreflect.FileDescriptor + +var file_maincity_maincity_msg_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x6d, 0x61, 0x69, 0x6e, 0x63, 0x69, 0x74, 0x79, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x63, + 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6d, + 0x61, 0x69, 0x6e, 0x63, 0x69, 0x74, 0x79, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x63, 0x69, 0x74, 0x79, + 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x14, 0x4d, 0x61, 0x69, + 0x6e, 0x43, 0x69, 0x74, 0x79, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x50, 0x6f, 0x73, 0x50, 0x65, 0x65, + 0x6b, 0x12, 0x20, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x73, 0x52, 0x03, + 0x70, 0x6f, 0x73, 0x22, 0x38, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x53, + 0x79, 0x6e, 0x63, 0x68, 0x50, 0x6f, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x03, 0x70, + 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, + 0x6e, 0x43, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x73, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_maincity_maincity_msg_proto_rawDescOnce sync.Once + file_maincity_maincity_msg_proto_rawDescData = file_maincity_maincity_msg_proto_rawDesc +) + +func file_maincity_maincity_msg_proto_rawDescGZIP() []byte { + file_maincity_maincity_msg_proto_rawDescOnce.Do(func() { + file_maincity_maincity_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_maincity_maincity_msg_proto_rawDescData) + }) + return file_maincity_maincity_msg_proto_rawDescData +} + +var file_maincity_maincity_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_maincity_maincity_msg_proto_goTypes = []interface{}{ + (*MainCitySynchPosPeek)(nil), // 0: MainCitySynchPosPeek + (*MainCitySynchPosPush)(nil), // 1: MainCitySynchPosPush + (*DBMainCityPos)(nil), // 2: DBMainCityPos +} +var file_maincity_maincity_msg_proto_depIdxs = []int32{ + 2, // 0: MainCitySynchPosPeek.pos:type_name -> DBMainCityPos + 2, // 1: MainCitySynchPosPush.pos:type_name -> DBMainCityPos + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_maincity_maincity_msg_proto_init() } +func file_maincity_maincity_msg_proto_init() { + if File_maincity_maincity_msg_proto != nil { + return + } + file_maincity_maincity_db_proto_init() + if !protoimpl.UnsafeEnabled { + file_maincity_maincity_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MainCitySynchPosPeek); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_maincity_maincity_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MainCitySynchPosPush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_maincity_maincity_msg_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_maincity_maincity_msg_proto_goTypes, + DependencyIndexes: file_maincity_maincity_msg_proto_depIdxs, + MessageInfos: file_maincity_maincity_msg_proto_msgTypes, + }.Build() + File_maincity_maincity_msg_proto = out.File + file_maincity_maincity_msg_proto_rawDesc = nil + file_maincity_maincity_msg_proto_goTypes = nil + file_maincity_maincity_msg_proto_depIdxs = nil +} diff --git a/pb/parkour_msg.pb.go b/pb/parkour_msg.pb.go index baf2a1ebc..b7380c1ac 100644 --- a/pb/parkour_msg.pb.go +++ b/pb/parkour_msg.pb.go @@ -1514,9 +1514,10 @@ type ParkourRaceOverPush struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Winside int32 `protobuf:"varint,1,opt,name=winside,proto3" json:"winside"` //0平局 1 红方胜利 2 蓝方胜利 - Race *DBRace `protobuf:"bytes,2,opt,name=race,proto3" json:"race"` //比赛信息 - Award []*UserAtno `protobuf:"bytes,3,rep,name=award,proto3" json:"award"` //奖励 + Winside int32 `protobuf:"varint,1,opt,name=winside,proto3" json:"winside"` //0平局 1 红方胜利 2 蓝方胜利 + Race *DBRace `protobuf:"bytes,2,opt,name=race,proto3" json:"race"` //比赛信息 + Weekintegral int32 `protobuf:"varint,3,opt,name=weekintegral,proto3" json:"weekintegral"` //周长积分 + Award []*UserAtno `protobuf:"bytes,4,rep,name=award,proto3" json:"award"` //奖励 } func (x *ParkourRaceOverPush) Reset() { @@ -1565,6 +1566,13 @@ func (x *ParkourRaceOverPush) GetRace() *DBRace { return nil } +func (x *ParkourRaceOverPush) GetWeekintegral() int32 { + if x != nil { + return x.Weekintegral + } + return 0 +} + func (x *ParkourRaceOverPush) GetAward() []*UserAtno { if x != nil { return x.Award @@ -2163,50 +2171,52 @@ var file_parkour_parkour_msg_proto_rawDesc = []byte{ 0x52, 0x65, 0x76, 0x69, 0x76, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x68, 0x70, 0x22, 0x6d, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x52, 0x61, - 0x63, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, - 0x6e, 0x73, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, - 0x73, 0x69, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x52, 0x04, 0x72, 0x61, 0x63, - 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, - 0x72, 0x64, 0x22, 0x27, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x69, 0x64, 0x22, 0x36, 0x0a, 0x14, 0x50, - 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x52, 0x04, 0x69, - 0x6e, 0x66, 0x6f, 0x22, 0x7e, 0x0a, 0x16, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, - 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, - 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x6d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, - 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x03, 0x61, 0x69, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x03, - 0x61, 0x69, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, - 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x38, - 0x0a, 0x18, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, - 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, - 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x50, 0x43, 0x50, - 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5c, 0x0a, 0x16, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, - 0x6f, 0x75, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x63, 0x63, 0x52, 0x65, 0x71, 0x12, - 0x1f, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, - 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, - 0x12, 0x21, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x04, 0x62, - 0x75, 0x6c, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, - 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x63, 0x63, 0x52, 0x65, 0x73, 0x70, 0x22, 0x49, - 0x0a, 0x19, 0x52, 0x50, 0x43, 0x5f, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x54, 0x72, 0x75, - 0x73, 0x74, 0x65, 0x65, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x50, 0x43, - 0x5f, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x65, 0x73, - 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x02, 0x68, 0x70, 0x22, 0x91, 0x01, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x52, + 0x61, 0x63, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x77, + 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, + 0x6e, 0x73, 0x69, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x52, 0x04, 0x72, 0x61, + 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x69, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, + 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x27, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x6b, 0x6f, + 0x75, 0x72, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, + 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x69, 0x64, + 0x22, 0x36, 0x0a, 0x14, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x72, 0x6b, 0x6f, + 0x75, 0x72, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x7e, 0x0a, 0x16, 0x52, 0x50, 0x43, 0x50, + 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, + 0x12, 0x25, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x03, 0x61, 0x69, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x03, 0x61, 0x69, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x50, 0x43, 0x50, + 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x38, 0x0a, 0x18, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, + 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, + 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x22, 0x1b, 0x0a, + 0x19, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5c, 0x0a, 0x16, 0x52, 0x50, + 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x63, + 0x63, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x52, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x50, 0x43, 0x50, + 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x63, 0x63, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x49, 0x0a, 0x19, 0x52, 0x50, 0x43, 0x5f, 0x50, 0x61, 0x72, 0x6b, 0x6f, + 0x75, 0x72, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x65, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, + 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x1c, + 0x0a, 0x1a, 0x52, 0x50, 0x43, 0x5f, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x54, 0x72, 0x75, + 0x73, 0x74, 0x65, 0x65, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/services/comp_gateroute.go b/services/comp_gateroute.go index d01710e9a..f8e54bb27 100644 --- a/services/comp_gateroute.go +++ b/services/comp_gateroute.go @@ -181,7 +181,7 @@ func (this *SCompGateRoute) ReceiveMsg(ctx context.Context, args *pb.AgentMessag } // RPC_NoticeUserClose 接收用户登录通知 -func (this *SCompGateRoute) NoticeUserLogin(ctx context.Context, args *pb.NoticeUserLoginReq, reply *pb.RPCMessageReply) error { +func (this *SCompGateRoute) NoticeUserLogin(ctx context.Context, args *pb.NoticeUserLoginReq, reply *pb.NoticeUserLoginResp) error { log.Debug("RPC_NoticeUserLogin", log.Field{Key: "args", Value: args}) conn, err := db.Local() if err != nil { @@ -198,7 +198,10 @@ func (this *SCompGateRoute) NoticeUserLogin(ctx context.Context, args *pb.Notice } model.AddList(comm.RDS_EMPTY, args.UserId, user, db.SetDBMgoLog(false)) session := this.GetUserSession(user) + defer this.PutUserSession(session) event.TriggerEvent(comm.EventUserLogin, session) + session.Push() + reply.WorkerSId = this.service.GetId() return nil } diff --git a/services/worker/main.go b/services/worker/main.go index 3d4384500..953c7f660 100644 --- a/services/worker/main.go +++ b/services/worker/main.go @@ -17,6 +17,7 @@ import ( "go_dreamfactory/modules/chat" "go_dreamfactory/modules/combat" "go_dreamfactory/modules/dailytask" + "go_dreamfactory/modules/dcolor" "go_dreamfactory/modules/dispatch" "go_dreamfactory/modules/dragon" "go_dreamfactory/modules/enchant" @@ -39,6 +40,7 @@ import ( "go_dreamfactory/modules/library" "go_dreamfactory/modules/linestory" "go_dreamfactory/modules/mail" + "go_dreamfactory/modules/maincity" "go_dreamfactory/modules/mainline" "go_dreamfactory/modules/moonfantasy" "go_dreamfactory/modules/notify" @@ -168,6 +170,8 @@ func main() { achieve.NewModule(), jielong.NewModule(), entertainment.NewModule(), + dcolor.NewModule(), + maincity.NewModule(), ) }