From 33ca47e77b61c67c7b641940482612be45372499 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 16 Nov 2023 15:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=B0=8F=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E7=A6=BB=E7=BA=BF=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 3 +- comm/imodule.go | 6 +- modules/caninerabbit/module.go | 12 ++ modules/caninerabbit/room.go | 1 + modules/dcolor/module.go | 13 ++ modules/dcolor/room.go | 54 ++++++ modules/gameinvite/api_accept.go | 34 ++-- modules/gameinvite/module.go | 52 ++++++ modules/practice/api_accept.go | 140 --------------- modules/practice/api_qiecuo.go | 143 --------------- modules/practice/api_refuse.go | 87 --------- modules/practice/modelQiecuo.go | 75 -------- modules/practice/module.go | 6 - modules/pvp/core.go | 4 +- modules/pvp/module.go | 300 ++++++++++++++++--------------- pb/gameinvite_db.pb.go | 43 +++-- pb/gameinvite_msg.pb.go | 149 ++++++++++++++- pb/island_db.pb.go | 96 +++++----- pb/island_msg.pb.go | 106 ++++++----- pb/pvp_db.pb.go | 145 +++++++-------- pb/pvp_msg.pb.go | 196 ++++++++++---------- 21 files changed, 763 insertions(+), 902 deletions(-) delete mode 100644 modules/practice/api_accept.go delete mode 100644 modules/practice/api_qiecuo.go delete mode 100644 modules/practice/api_refuse.go delete mode 100644 modules/practice/modelQiecuo.go diff --git a/comm/const.go b/comm/const.go index 1c7a6e04d..62b55c9e9 100644 --- a/comm/const.go +++ b/comm/const.go @@ -511,7 +511,8 @@ const ( //Rpc RPC_XXLOffLine core.Rpc_Key = "RPC_XXLOffLine" //三消离线 - Rpc_AccountBan core.Rpc_Key = "Rpc_AccountBan" // 账号状态 + Rpc_AccountBan core.Rpc_Key = "Rpc_AccountBan" // 账号状态 + RPC_GameinviteOffline core.Rpc_Key = "RPC_GameinviteOffline" // 游戏邀请离线通知 ) // 事件类型定义处 diff --git a/comm/imodule.go b/comm/imodule.go index ef5817346..6c6c803c1 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -464,11 +464,13 @@ type ( //查询战斗数 QueryBattle(id string) (battle *pb.DBPvpBattle, err error) //创建实时Pvp - CreatePvp(red, blue *pb.PvpUserInfo, ptype pb.PvpType) (battleId string, errdata *pb.ErrorData) + CreateRoom(sessions []IUserSession, rulesStr string) (roomid string, err error) //推送战斗输出指令 PvpOutCmdPush(out *pb.PvpOutCmdPush) //推送战斗结束 PvpFinishPush(out *pb.BattleFinishPush) + //用户离线 + UserOffline(roomid string, uid string) (err error) } ISmithy interface { @@ -671,10 +673,12 @@ type ( //游戏邀请 IDColor interface { CreateRoom(sessions []IUserSession, rulesStr string) (roomid string, err error) + UserOffline(roomid string, uid string) (err error) } //犬兔大战 ICanineRabbit interface { CreateRoom(sessions []IUserSession, rulesStr string) (roomid string, err error) + UserOffline(roomid string, uid string) (err error) } IEntertainment interface { // 添加三消卡片资源 diff --git a/modules/caninerabbit/module.go b/modules/caninerabbit/module.go index 552885756..f027271c9 100644 --- a/modules/caninerabbit/module.go +++ b/modules/caninerabbit/module.go @@ -158,3 +158,15 @@ func (this *CanineRabbit) CreateRoom(sessions []comm.IUserSession, rulesStr stri go room.GameStart() return } + +//用户离线 +func (this *CanineRabbit) UserOffline(roomid string, uid string) (err error) { + var ( + room *Room + ) + if room, err = this.rooms.queryRoom(roomid); err != nil { + return + } + err = room.PlayerWin(uid, &pb.CanineRabbitWinReq{Roomid: roomid, Iswin: false}) + return +} diff --git a/modules/caninerabbit/room.go b/modules/caninerabbit/room.go index 9d27b8686..bae140991 100644 --- a/modules/caninerabbit/room.go +++ b/modules/caninerabbit/room.go @@ -162,6 +162,7 @@ func (this *Room) PlayerWin(uid string, handle *pb.CanineRabbitWinReq) (err erro } return } + func (this *Room) Broadcast(stype string, msg proto.Message) (err error) { if err = this.module.SendMsgToSession(string(this.module.GetType()), stype, msg, this.sessions...); err != nil { this.module.Errorln(err) diff --git a/modules/dcolor/module.go b/modules/dcolor/module.go index 779c39fb0..d5f2fde71 100644 --- a/modules/dcolor/module.go +++ b/modules/dcolor/module.go @@ -51,6 +51,7 @@ func (this *DColor) Start() (err error) { return } this.gameInvite = module.(comm.IGameInvite) + return } @@ -122,3 +123,15 @@ func (this *DColor) CreateRoom(sessions []comm.IUserSession, rulesStr string) (r go room.GameStart() return } + +//用户离线 +func (this *DColor) UserOffline(roomid string, uid string) (err error) { + var ( + room *Room + ) + if room, err = this.rooms.queryRoom(roomid); err != nil { + return + } + err = room.PlayerOffline(uid) + return +} diff --git a/modules/dcolor/room.go b/modules/dcolor/room.go index ead662d82..1495d3613 100644 --- a/modules/dcolor/room.go +++ b/modules/dcolor/room.go @@ -138,6 +138,60 @@ func (this *Room) PlayerHandle(uid string, handle *pb.DColorHandleReq) (err erro return } +func (this *Room) PlayerOffline(uid string) (err error) { + var ( + conf *cfg.GameGColorGetfractionData + tconf *cfg.GameGColortTmedecayData + ) + endtime := int32(configure.Now().Sub(this.starttime).Seconds()) + if conf, err = this.module.configure.getGameGColorGetfractionData(int32(this.data.Difficulty)+1, this.data.Repeat, 8); err != nil { + this.module.Errorln(err) + return + } + if tconf, err = this.module.configure.getGameGColortTmedecayData(endtime); err != nil { + this.module.Errorln(err) + return + } + this.currside = 3 + if uid == this.data.Blue.Info.Uid { + this.data.Red.Score = int32(math.Floor(float64(conf.Fraction) * float64(tconf.Pro) / float64(1000))) + this.data.Blue.Score = this.data.Red.Score / 2 + } else { + this.data.Blue.Score = int32(math.Floor(float64(conf.Fraction) * float64(tconf.Pro) / float64(1000))) + this.data.Red.Score = this.data.Red.Score / 2 + } + + this.data.Red.Integral += this.data.Red.Score + this.data.Red.Accruedintegral += this.data.Blue.Score + if this.data.Red.Score > this.data.Red.Maxintegral { + this.data.Red.Maxintegral = this.data.Red.Score + } + this.data.Blue.Integral += this.data.Blue.Score + this.data.Blue.Accruedintegral += this.data.Blue.Score + if this.data.Blue.Score > this.data.Blue.Maxintegral { + this.data.Blue.Maxintegral = this.data.Blue.Score + } + this.module.model.Change(this.data.Red.Info.Uid, map[string]interface{}{ + "integral": this.data.Red.Integral, + "accruedintegral": this.data.Red.Accruedintegral, + "maxintegral": this.data.Red.Maxintegral, + }) + this.module.model.Change(this.data.Blue.Info.Uid, map[string]interface{}{ + "integral": this.data.Blue.Integral, + "accruedintegral": this.data.Blue.Accruedintegral, + "maxintegral": this.data.Blue.Maxintegral, + }) + if err = this.Broadcast("gameover", &pb.DColorGameOverPush{ + Winside: this.currside, + RedIntegral: this.data.Red.Score, + BlueIntegral: this.data.Blue.Score, + }); err != nil { + this.module.Errorln(err) + } + this.module.rooms.removeRoom(this.data.Rid) + return +} + func (this *Room) comparison(results []int32) (allright, halfpair int32) { var ( resultscolor []int32 diff --git a/modules/gameinvite/api_accept.go b/modules/gameinvite/api_accept.go index 1d47a0aba..d9116d251 100644 --- a/modules/gameinvite/api_accept.go +++ b/modules/gameinvite/api_accept.go @@ -110,6 +110,16 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.GameInviteAcceptR &pb.GameInviteQiecuonotifyPush{User: comm.GetUserBaseInfo(user), NotifyType: 2, Gtype: req.Gtype}, req.Uid) switch req.Gtype { + case 1: + if roomid, err = this.module.pvp.CreateRoom(sessions, rules); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + break case 2: if roomid, err = this.module.caninerabbit.CreateRoom(sessions, rules); err != nil { errdata = &pb.ErrorData{ @@ -132,25 +142,27 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.GameInviteAcceptR break } redRecord.Status = 1 - redRecord.Battid = roomid + redRecord.Roomid = roomid + redRecord.Spath = fmt.Sprintf("%s/%s", this.module.service.GetType(), this.module.service.GetId()) gamedata.Member = []string{session.GetUserId(), req.Uid} blueRecord.Status = 1 - blueRecord.Battid = roomid - blueRecord.Invite[redRecord.Gtype] = &pb.GameInviteData{ - Member: []string{session.GetUserId(), req.Uid}, - Rules: gamedata.Rules, - } + blueRecord.Roomid = roomid + blueRecord.Spath = fmt.Sprintf("%s/%s", this.module.service.GetType(), this.module.service.GetId()) + blueRecord.Invite[redRecord.Gtype] = gamedata this.module.model.Change(session.GetUserId(), map[string]interface{}{ - "status": 1, + "status": redRecord.Status, + "gtype": req.Gtype, "invite": blueRecord.Invite, - "battid": blueRecord.Battid, + "roomid": blueRecord.Roomid, + "spath": blueRecord.Spath, }) this.module.model.Change(req.Uid, map[string]interface{}{ - "status": 1, + "status": blueRecord.Status, + "gtype": req.Gtype, "invite": redRecord.Invite, - "battid": redRecord.Battid, + "roomid": redRecord.Roomid, + "spath": redRecord.Spath, }) - session.SendMsg(string(this.module.GetType()), "accept", &pb.GameInviteAcceptResp{ IsSucc: true, }) diff --git a/modules/gameinvite/module.go b/modules/gameinvite/module.go index 13a06af78..9945fab2d 100644 --- a/modules/gameinvite/module.go +++ b/modules/gameinvite/module.go @@ -1,9 +1,13 @@ package gameinvite import ( + "context" + "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/event" "go_dreamfactory/modules" + "go_dreamfactory/pb" ) type GameInvite struct { @@ -11,6 +15,7 @@ type GameInvite struct { service comm.IService api *apiComp model *modelComp + pvp comm.IPvp dcolor comm.IDColor caninerabbit comm.ICanineRabbit } @@ -41,6 +46,10 @@ func (this *GameInvite) Start() (err error) { return } var module core.IModule + if module, err = this.service.GetModule(comm.ModulePvp); err != nil { + return + } + this.pvp = module.(comm.IPvp) if module, err = this.service.GetModule(comm.ModuleDcolor); err != nil { return } @@ -49,8 +58,51 @@ func (this *GameInvite) Start() (err error) { return } this.caninerabbit = module.(comm.ICanineRabbit) + this.service.RegisterFunctionName(string(comm.RPC_GameinviteOffline), this.trusteeship) + event.RegisterGO(comm.EventUserOffline, this.Useroffline) return } func (this *GameInvite) GameInviteEnd(gtype int32, uid string) { this.model.endQiecuo(gtype, uid) } + +// 用户离线处理 +func (this *GameInvite) Useroffline(uid, sessionid string) { + var ( + info *pb.GameInviteQiecuoRecord + spath string = fmt.Sprintf("%s/%s", this.service.GetType(), this.service.GetId()) + err error + ) + if info, err = this.model.queryQiecuo(uid); err != nil { + return + } + if info.Status == 1 { + if info.Spath == spath { + this.trusteeship(context.Background(), &pb.RPC_GameInviteOfflineReq{Gtype: info.Gtype, Roomid: info.Roomid, Offuid: uid}, &pb.RPC_GameInviteOfflineResp{}) + } else { + err = this.service.RpcCall( + context.Background(), + spath, + string(comm.RPC_GameinviteOffline), + &pb.RPC_GameInviteOfflineReq{Gtype: info.Gtype, Roomid: info.Roomid, Offuid: uid}, + &pb.RPC_GameInviteOfflineResp{}) + if err != nil { + this.Errorln(err) + return + } + } + } +} + +// 用户离线处理 +func (this *GameInvite) trusteeship(ctx context.Context, req *pb.RPC_GameInviteOfflineReq, resp *pb.RPC_GameInviteOfflineResp) (err error) { + switch req.Gtype { + case 1: + err = this.pvp.UserOffline(req.Roomid, req.Offuid) + case 2: + err = this.caninerabbit.UserOffline(req.Roomid, req.Offuid) + case 3: + err = this.dcolor.UserOffline(req.Roomid, req.Offuid) + } + return +} diff --git a/modules/practice/api_accept.go b/modules/practice/api_accept.go deleted file mode 100644 index 271100c78..000000000 --- a/modules/practice/api_accept.go +++ /dev/null @@ -1,140 +0,0 @@ -package practice - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/lego/sys/log" - "go_dreamfactory/pb" - "go_dreamfactory/sys/configure" - "time" -) - -//接受切磋 - -func (this *apiComp) AcceptCheck(session comm.IUserSession, req *pb.PracticeAcceptReq) (errdata *pb.ErrorData) { - if req.Uid == "" { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - } - } - return -} - -func (this *apiComp) Accept(session comm.IUserSession, req *pb.PracticeAcceptReq) (errdata *pb.ErrorData) { - if errdata = this.AcceptCheck(session, req); errdata != nil { - return - } - var ( - err error - redRecord *pb.DBPracticeQiecuoRecord - blueRecord *pb.DBPracticeQiecuoRecord - keep bool - ) - - //校验切磋请求是否超时 - if redRecord, err = this.module.modelQiecuo.queryQiecuo(req.Uid); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - return - } - if blueRecord, err = this.module.modelQiecuo.queryQiecuo(session.GetUserId()); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - return - } - if redRecord.Status == 1 { //已经在战斗中了 - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_PracticeQiecuoing, - Title: pb.ErrorCode_PracticeQiecuoing.ToString(), - } - return - } - keep = false - for _, v := range redRecord.Targets { - if v.Uid == session.GetUserId() { - if configure.Now().Sub(time.Unix(v.Timestamp, 0)).Seconds() > 10 { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_PracticeInviteTimeOut, - Title: pb.ErrorCode_PracticeInviteTimeOut.ToString(), - } - return - } - keep = true - } - } - if !keep { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - } - return - } - - //发起者 red - red, err := this.module.ModuleUser.GetUser(req.Uid) - if err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_UserNofound, - Title: pb.ErrorCode_UserNofound.ToString(), - } - this.module.Error("未找到红方信息", log.Field{Key: "uid", Value: req.Uid}) - return - } - blue, err := this.module.ModuleUser.GetUser(session.GetUserId()) - if err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_UserNofound, - Title: pb.ErrorCode_UserNofound.ToString(), - } - this.module.Error("未找到蓝方信息", log.Field{Key: "uid", Value: session.GetUserId()}) - return - } - if redRecord.Battid, errdata = this.module.pvp.CreatePvp( - &pb.PvpUserInfo{Uid: red.Uid, Name: red.Name, Avatar: red.Avatar, Lv: red.Lv}, - &pb.PvpUserInfo{Uid: blue.Uid, Name: blue.Name, Avatar: blue.Avatar, Lv: blue.Lv}, - pb.PvpType_friends, - ); errdata != nil { - this.module.Error("CreatePvp", log.Field{Key: "code", Value: errdata}) - return - } - redRecord.Status = 1 - redRecord.Member = []string{session.GetUserId(), req.Uid} - blueRecord.Status = 1 - blueRecord.Member = []string{session.GetUserId(), req.Uid} - this.module.modelQiecuo.Change(session.GetUserId(), map[string]interface{}{ - "status": 1, - "member": redRecord.Member, - "battid": redRecord.Battid, - }) - this.module.modelQiecuo.Change(req.Uid, map[string]interface{}{ - "status": 1, - "member": redRecord.Member, - "battid": redRecord.Battid, - }) - - if err := session.SendMsg(string(this.module.GetType()), "accept", &pb.PracticeAcceptResp{ - IsSucc: true, - }); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_SystemError, - Title: pb.ErrorCode_SystemError.ToString(), - Message: err.Error(), - } - return - } - - this.module.SendMsgToUser(string(this.module.GetType()), "qiecuonotify", - &pb.PracticeQiecuonotifyPush{Uid: session.GetUserId(), NotifyType: 2}, req.Uid) - _session, _ := this.module.GetUserSession(req.Uid) - - go this.module.AsynHandleSession(_session.Clone(), func(session comm.IUserSession) { - this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype183, 1)) - }) - return -} diff --git a/modules/practice/api_qiecuo.go b/modules/practice/api_qiecuo.go deleted file mode 100644 index 3743d1f48..000000000 --- a/modules/practice/api_qiecuo.go +++ /dev/null @@ -1,143 +0,0 @@ -package practice - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/lego/sys/log" - "go_dreamfactory/pb" - "go_dreamfactory/sys/configure" - "time" -) - -// 踢馆(熊猫武馆) -func (this *apiComp) QiecuoCheck(session comm.IUserSession, req *pb.PracticeQiecuoReq) (errdata *pb.ErrorData) { - if req.Fid == "" { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - } - } - return -} - -func (this *apiComp) Qiecuo(session comm.IUserSession, req *pb.PracticeQiecuoReq) (errdata *pb.ErrorData) { - if errdata = this.QiecuoCheck(session, req); errdata != nil { - return - } - var ( - err error - result *pb.DBPracticeQiecuoRecord - fresult *pb.DBPracticeQiecuoRecord - user *pb.DBUser - battle *pb.DBPvpBattle - keep bool - ) - - //切磋请求处理 - if result, err = this.module.modelQiecuo.queryQiecuo(session.GetUserId()); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - return - } - if fresult, err = this.module.modelQiecuo.queryQiecuo(req.Fid); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - return - } - - if result.Status == 1 || fresult.Status == 1 { //已经在战斗中了 - if result.Battid == fresult.Battid { //两个人正在战斗中 - if battle, err = this.module.pvp.QueryBattle(result.Battid); err != nil { - this.module.Error("查询pvp数据失败!", log.Field{Key: "id", Value: result.Battid}, log.Field{Key: "err", Value: err.Error()}) - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_SystemError, - Title: pb.ErrorCode_SystemError.ToString(), - Message: err.Error(), - } - return - } - if err = session.SendMsg(string(this.module.GetType()), "qiecuo", &pb.PracticeQiecuoResp{Fid: req.Fid, Isbattle: true, Battle: battle}); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_SystemError, - Title: pb.ErrorCode_SystemError.ToString(), - } - return - } - return - } else { - if result.Status == 1 { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_PracticeYouQiecuoing, - Title: pb.ErrorCode_PracticeYouQiecuoing.ToString(), - } - return - } else { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_PracticeTargetQiecuoing, - Title: pb.ErrorCode_PracticeTargetQiecuoing.ToString(), - } - return - } - } - } - //目标是否在线 - if !this.module.ModuleUser.IsOnline(req.Fid) { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_UserOffline, - Title: pb.ErrorCode_UserOffline.ToString(), - } - return - } - - if user, err = this.module.ModuleUser.GetUser(session.GetUserId()); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - return - } - - keep = false - for _, v := range result.Targets { - if v.Uid == req.Fid { - keep = true - if configure.Now().Sub(time.Unix(v.Timestamp, 0)).Seconds() > 10 { - v.Timestamp = configure.Now().Unix() - } else { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_PracticeSent, - Title: pb.ErrorCode_PracticeSent.ToString(), - } - return - } - } - } - if !keep { - result.Targets = append(result.Targets, &pb.DBPracticeQiecuoInvite{ - Uid: req.Fid, - Timestamp: configure.Now().Unix(), - }) - } - this.module.modelQiecuo.Change(session.GetUserId(), map[string]interface{}{ - "targets": result.Targets, - }) - - if err = session.SendMsg(string(this.module.GetType()), "qiecuo", &pb.PracticeQiecuoResp{Fid: req.Fid}); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_SystemError, - Title: pb.ErrorCode_SystemError.ToString(), - } - return - } - - this.module.SendMsgToUser(string(this.module.GetType()), "qiecuonotify", - &pb.PracticeQiecuonotifyPush{Uid: session.GetUserId(), Name: user.Name, NotifyType: 1}, req.Fid) - - return -} diff --git a/modules/practice/api_refuse.go b/modules/practice/api_refuse.go deleted file mode 100644 index 62cddcd84..000000000 --- a/modules/practice/api_refuse.go +++ /dev/null @@ -1,87 +0,0 @@ -package practice - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/pb" -) - -// 切磋终止 -func (this *apiComp) RefuseCheck(session comm.IUserSession, req *pb.PracticeRefuseReq) (errdata *pb.ErrorData) { - return -} - -//拒绝切磋 -func (this *apiComp) Refuse(session comm.IUserSession, req *pb.PracticeRefuseReq) (errdata *pb.ErrorData) { - if errdata = this.RefuseCheck(session, req); errdata != nil { - return - } - var ( - err error - result *pb.DBPracticeQiecuoRecord - keep bool - room *pb.DBPracticeRoom - ) - - //切磋请求处理 - if result, err = this.module.modelQiecuo.queryQiecuo(req.Uid); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - return - } - keep = false - for i, v := range result.Targets { - if v.Uid == session.GetUserId() { - result.Targets = append(result.Targets[0:i], result.Targets[i+1:]...) - keep = true - } - } - - if !keep { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - } - return - } - - this.module.modelQiecuo.Change(session.GetUserId(), map[string]interface{}{ - "targets": result.Targets, - }) - - if room, err = this.module.modelPandata.queryUserMartialhall(req.Uid); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - return - } - - for i, v := range room.Statuers { - if v.Uid == session.GetUserId() { //移除雕像 - room.Statuers = append(room.Statuers[0:i], room.Statuers[i+1:]...) - this.module.modelPandata.Change(req.Uid, map[string]interface{}{ - "statuers": room.Statuers, - }) - break - } - } - - if err := session.SendMsg(string(this.module.GetType()), "refuse", &pb.PracticeRefuseResp{ - IsSucc: true, - }); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_SystemError, - Title: pb.ErrorCode_SystemError.ToString(), - Message: err.Error(), - } - return - } - - this.module.SendMsgToUser(string(this.module.GetType()), "qiecuonotify", - &pb.PracticeQiecuonotifyPush{Uid: session.GetUserId(), Name: "", NotifyType: 3}, req.Uid) - return -} diff --git a/modules/practice/modelQiecuo.go b/modules/practice/modelQiecuo.go deleted file mode 100644 index 9c38b3c3c..000000000 --- a/modules/practice/modelQiecuo.go +++ /dev/null @@ -1,75 +0,0 @@ -package practice - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/mgo" - "go_dreamfactory/modules" - "go_dreamfactory/pb" - - "go.mongodb.org/mongo-driver/bson/primitive" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/x/bsonx" -) - -// /熊猫武馆数据表 -type modelQiecuo struct { - modules.MCompModel - module *Practice -} - -func (this *modelQiecuo) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { - this.TableName = comm.TablePandataQiecuo - this.MCompModel.Init(service, module, comp, opt) - this.module = module.(*Practice) - //创建uid索引 - this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ - Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, - }) - return -} - -// 切磋请求处理 -func (this *modelQiecuo) queryQiecuo(uid string) (result *pb.DBPracticeQiecuoRecord, err error) { - result = &pb.DBPracticeQiecuoRecord{} - if err = this.Get(uid, result); err != nil && err != mgo.MongodbNil { - this.module.Errorln(err) - } - if err == mgo.MongodbNil { - result = &pb.DBPracticeQiecuoRecord{ - Id: primitive.NewObjectID().Hex(), - Uid: uid, - Targets: make([]*pb.DBPracticeQiecuoInvite, 0), - } - if err = this.Add(uid, result); err != nil { - this.module.Errorln(err) - return - } - } - err = nil - return -} -func (this *modelQiecuo) endQiecuo(uid string) (result *pb.DBPracticeQiecuoRecord, err error) { - result = &pb.DBPracticeQiecuoRecord{} - if err = this.Get(uid, result); err != nil { - this.module.Errorln(err) - return - } - this.Change(uid, map[string]interface{}{ - "status": 0, - "battid": "", - "targets": []*pb.DBPracticeQiecuoInvite{}, - "member": []string{}, - }) - for _, v := range result.Member { - if v != uid { - this.Change(v, map[string]interface{}{ - "status": 0, - "battid": "", - "targets": []*pb.DBPracticeQiecuoInvite{}, - "member": []string{}, - }) - } - } - return -} diff --git a/modules/practice/module.go b/modules/practice/module.go index 803c131af..d11a30227 100644 --- a/modules/practice/module.go +++ b/modules/practice/module.go @@ -42,7 +42,6 @@ type Practice struct { api *apiComp configure *configureComp modelPandata *modelPandata - modelQiecuo *modelQiecuo } // 模块名 @@ -100,7 +99,6 @@ func (this *Practice) OnInstallComp() { this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) this.modelPandata = this.RegisterComp(new(modelPandata)).(*modelPandata) - this.modelQiecuo = this.RegisterComp(new(modelQiecuo)).(*modelQiecuo) } // 添加武馆资源 @@ -255,10 +253,6 @@ func (this *Practice) ChallengeResults(bid, red, bule string, winSide int32) { err error ) - if _, err = this.modelQiecuo.endQiecuo(red); err != nil { - this.Errorln(err) - } - if winSide == 0 { return } diff --git a/modules/pvp/core.go b/modules/pvp/core.go index 9aef45f4c..fe0e4fab7 100644 --- a/modules/pvp/core.go +++ b/modules/pvp/core.go @@ -12,11 +12,11 @@ type BattleItem struct { Id string //战斗id Ptype pb.PvpType //pvp类型 State pb.PvpState //战斗状态 - Red *pb.PvpUserInfo //红方id + Red *pb.BaseUserInfo //红方id RedSession comm.IUserSession //红方连接对象 Redformation *pb.BattleFormation //红方阵型列表 RedOffline bool //红方离线 - Blue *pb.PvpUserInfo //蓝方id + Blue *pb.BaseUserInfo //蓝方id BlueSession comm.IUserSession //蓝方连接对象 Blueformation *pb.BattleFormation //蓝方阵型列表 BlueOffline bool //蓝方离线 diff --git a/modules/pvp/module.go b/modules/pvp/module.go index 053a13718..295151a35 100644 --- a/modules/pvp/module.go +++ b/modules/pvp/module.go @@ -1,12 +1,11 @@ package pvp import ( - "context" + "encoding/json" "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/event" "go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/timewheel" "go_dreamfactory/modules" @@ -32,6 +31,7 @@ type Pvp struct { modules.ModuleBase service base.IRPCXService battle comm.IBattle + gameInvite comm.IGameInvite practice comm.IPractice apicomp *apiComp modelPvpComp *modelPvpComp @@ -63,13 +63,17 @@ func (this *Pvp) Start() (err error) { return } this.battle = module.(comm.IBattle) + if module, err = this.service.GetModule(comm.ModuleGameInvite); err != nil { + return + } + this.gameInvite = module.(comm.IGameInvite) if module, err = this.service.GetModule(comm.ModulePractice); err != nil { return } this.practice = module.(comm.IPractice) // event.RegisterGO(comm.EventUserLogin, this.userlogin) - event.RegisterGO(comm.EventUserOffline, this.useroffline) - this.service.RegisterFunctionName(string(comm.RPC_PVPTrusteeship), this.trusteeship) + // event.RegisterGO(comm.EventUserOffline, this.useroffline) + // this.service.RegisterFunctionName(string(comm.RPC_PVPTrusteeship), this.trusteeship) return } @@ -86,36 +90,38 @@ func (this *Pvp) QueryBattle(id string) (battle *pb.DBPvpBattle, err error) { } // 创建Pvp -func (this *Pvp) CreatePvp(red, blue *pb.PvpUserInfo, ptype pb.PvpType) (battleId string, errdata *pb.ErrorData) { - this.Debug("CreatePvp", log.Field{Key: "ptype", Value: ptype.String()}, log.Field{Key: "red", Value: red.String()}, log.Field{Key: "blue", Value: blue.String()}) +func (this *Pvp) CreateRoom(sessions []comm.IUserSession, rulesStr string) (roomid string, err error) { + this.Debug("CreatePvp", log.Field{Key: "rulesStr", Value: rulesStr}, log.Field{Key: "sessions", Value: sessions}) var ( - battle *BattleItem - err error - ok bool + rules *pb.DBPvpRules = &pb.DBPvpRules{} + battle *BattleItem + red, blue *pb.DBUser ) - battleId = primitive.NewObjectID().Hex() - battle = &BattleItem{ - Id: battleId, - Ptype: ptype, - State: pb.PvpState_ready, - Red: red, - Blue: blue, - readytimer: timewheel.Add(time.Second*60, this.readyTimeOut, battleId), - curroperate: &pb.ComWaitInputSkill{}, - } - - if battle.RedSession, ok = this.GetUserSession(red.Uid); !ok { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_BattleUserOff, - Title: pb.ErrorCode_BattleUserOff.ToString(), - } + if err = json.Unmarshal([]byte(rulesStr), rules); err != nil { + this.Error("解析规则json", log.Field{Key: "err", Value: err.Error()}) return } - if battle.BlueSession, ok = this.GetUserSession(blue.Uid); !ok { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_BattleUserOff, - Title: pb.ErrorCode_BattleUserOff.ToString(), - } + roomid = primitive.NewObjectID().Hex() + battle = &BattleItem{ + Id: roomid, + Ptype: rules.Ptype, + State: pb.PvpState_ready, + RedSession: sessions[0], + BlueSession: sessions[1], + Red: comm.GetUserBaseInfo(red), + Blue: comm.GetUserBaseInfo(blue), + readytimer: timewheel.Add(time.Second*60, this.readyTimeOut, roomid), + curroperate: &pb.ComWaitInputSkill{}, + } + //发起者 red + red, err = this.ModuleUser.GetUser(sessions[0].GetUserId()) + if err != nil { + this.Error("未找到红方信息", log.Field{Key: "uid", Value: sessions[0].GetUserId()}) + return + } + blue, err = this.ModuleUser.GetUser(sessions[1].GetUserId()) + if err != nil { + this.Error("未找到蓝方信息", log.Field{Key: "uid", Value: sessions[1].GetUserId()}) return } this.lock.Lock() @@ -129,10 +135,6 @@ func (this *Pvp) CreatePvp(red, blue *pb.PvpUserInfo, ptype pb.PvpType) (battleI Countdown: 60, }, battle.RedSession, battle.BlueSession); err != nil { this.Errorln(err) - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_RpcFuncExecutionError, - Title: pb.ErrorCode_RpcFuncExecutionError.ToString(), - } } return } @@ -216,7 +218,10 @@ func (this *Pvp) PvpFinishPush(out *pb.BattleFinishPush) { this.lock.RUnlock() switch battle.Ptype { case pb.PvpType_friends: - go this.practice.ChallengeResults(out.Battleid, battle.Red.Uid, battle.Blue.Uid, out.WinSide) + go func() { + this.gameInvite.GameInviteEnd(3, battle.Red.Uid) + this.practice.ChallengeResults(out.Battleid, battle.Red.Uid, battle.Blue.Uid, out.WinSide) + }() break } this.modelPvpComp.delpvp(out.Battleid) @@ -266,7 +271,10 @@ func (this *Pvp) readyTimeOut(task *timewheel.Task, args ...interface{}) { if battle.Blueformation != nil { winside = 2 } - go this.practice.ChallengeResults(battle.Id, battle.Red.Uid, battle.Blue.Uid, winside) + go func() { + this.gameInvite.GameInviteEnd(3, battle.Red.Uid) + this.practice.ChallengeResults(battle.Id, battle.Red.Uid, battle.Blue.Uid, winside) + }() break } @@ -374,88 +382,48 @@ func (this *Pvp) startBattle(battle *BattleItem) { } } -// 用户离线处理 弃用 -func (this *Pvp) userlogin(session comm.IUserSession) { - // var ( - // result []*pb.DBPvpBattle - // userpvp []*pb.DBPvpBattle - // push *pb.PvpListPush - // err error - // ) - // if result, err = this.modelPvpComp.querypvps(); err != nil { - // this.Errorln(err) - // return - // } +// // 用户离线处理 +// func (this *Pvp) useroffline(uid, sessionid string) { +// var ( +// result []*pb.DBPvpBattle +// lockpath string = fmt.Sprintf("%s/%s", this.service.GetType(), this.service.GetId()) +// service map[string][]string = make(map[string][]string) +// err error +// ) +// if result, err = this.modelPvpComp.querypvps(); err != nil { +// this.Errorln(err) +// return +// } +// for _, v := range result { +// if v.Red.Uid == uid || v.Blue.Uid == uid { +// if service[v.ServicePath] == nil { +// service[v.ServicePath] = make([]string, 0) +// } +// service[v.ServicePath] = append(service[v.ServicePath], v.Id) +// } +// } - // userpvp = make([]*pb.DBPvpBattle, 0, len(userpvp)) - // for _, v := range result { - // if v.Red.Uid == session.GetUserId() || v.Blue.Uid == session.GetUserId() { - // userpvp = append(userpvp, v) - // } - // } - // if len(userpvp) <= 0 { - // return - // } - // push = &pb.PvpListPush{} - // for _, v := range result { - // push.List = append(push.List, &pb.DBPvpBattle{ - // Id: v.Id, - // ServicePath: v.ServicePath, - // Ptype: v.Ptype, - // State: v.State, - // Red: v.Red, - // Blue: v.Blue, - // }) - // } +// for k, v := range service { +// if k == lockpath { //在当前服务器上 +// this.trusteeship(context.Background(), &pb.RPC_PVPTrusteeshipReq{Battleid: v, Uid: uid}, nil) +// } else { //在别的服务器上 +// ctx, _ := context.WithTimeout(context.Background(), time.Second*5) +// _, err = this.service.RpcGo( +// ctx, +// k, +// string(comm.RPC_PVPTrusteeship), +// &pb.RPC_PVPTrusteeshipReq{Battleid: v, Uid: uid}, +// nil) +// if err != nil { +// this.Errorln(err) +// return +// } +// } +// } - // session.SendMsg(string(comm.ModulePvp), "list", push) - // session.Push() - // this.Debug("GetPvpInfo", log.Field{Key: "uid", Value: session.GetSessionId()}, log.Field{Key: "list", Value: push.String()}) -} +// } -// 用户离线处理 -func (this *Pvp) useroffline(uid, sessionid string) { - var ( - result []*pb.DBPvpBattle - lockpath string = fmt.Sprintf("%s/%s", this.service.GetType(), this.service.GetId()) - service map[string][]string = make(map[string][]string) - err error - ) - if result, err = this.modelPvpComp.querypvps(); err != nil { - this.Errorln(err) - return - } - for _, v := range result { - if v.Red.Uid == uid || v.Blue.Uid == uid { - if service[v.ServicePath] == nil { - service[v.ServicePath] = make([]string, 0) - } - service[v.ServicePath] = append(service[v.ServicePath], v.Id) - } - } - - for k, v := range service { - if k == lockpath { //在当前服务器上 - this.trusteeship(context.Background(), &pb.RPC_PVPTrusteeshipReq{Battleid: v, Uid: uid}, nil) - } else { //在别的服务器上 - ctx, _ := context.WithTimeout(context.Background(), time.Second*5) - _, err = this.service.RpcGo( - ctx, - k, - string(comm.RPC_PVPTrusteeship), - &pb.RPC_PVPTrusteeshipReq{Battleid: v, Uid: uid}, - nil) - if err != nil { - this.Errorln(err) - return - } - } - } - -} - -// 托管 -func (this *Pvp) trusteeship(ctx context.Context, req *pb.RPC_PVPTrusteeshipReq, resp *pb.RPC_PVPTrusteeshipResp) (err error) { +func (this *Pvp) UserOffline(roomid string, uid string) (err error) { var ( battle *BattleItem ok bool @@ -463,39 +431,83 @@ func (this *Pvp) trusteeship(ctx context.Context, req *pb.RPC_PVPTrusteeshipReq, data []byte errdata *pb.ErrorData ) - for _, bid := range req.Battleid { - this.lock.RLock() - battle, ok = this.battles[bid] - this.lock.RUnlock() - if ok { - if battle.Red.Uid == req.Uid || battle.Blue.Uid == req.Uid { - if req.Uid == battle.Red.Uid { - side = 1 - battle.RedOffline = true - } else { - side = 2 - battle.BlueOffline = true - } + this.lock.RLock() + battle, ok = this.battles[roomid] + this.lock.RUnlock() + if ok { + if battle.Red.Uid == uid || battle.Blue.Uid == uid { + if uid == battle.Red.Uid { + side = 1 + battle.RedOffline = true + } else { + side = 2 + battle.BlueOffline = true + } - if battle.curroperate.Side == side { - if battle.operatetimer != nil { - timewheel.Remove(battle.operatetimer) - } - battle.curroperate.Auto = true - data, _ = proto.Marshal(battle.curroperate) - if errdata = this.battle.InCmdBattle(&pb.BattleInCmdReq{ - Battleid: battle.Id, - Side: battle.curroperate.Side, - In: &pb.BattleCmd{ - Cmdtype: "ComWaitInputSkill", - Value: data, - }, - }); errdata != nil { - return - } + if battle.curroperate.Side == side { + if battle.operatetimer != nil { + timewheel.Remove(battle.operatetimer) + } + battle.curroperate.Auto = true + data, _ = proto.Marshal(battle.curroperate) + if errdata = this.battle.InCmdBattle(&pb.BattleInCmdReq{ + Battleid: battle.Id, + Side: battle.curroperate.Side, + In: &pb.BattleCmd{ + Cmdtype: "ComWaitInputSkill", + Value: data, + }, + }); errdata != nil { + return } } } } return } + +// // 托管 +// func (this *Pvp) trusteeship(ctx context.Context, req *pb.RPC_PVPTrusteeshipReq, resp *pb.RPC_PVPTrusteeshipResp) (err error) { +// var ( +// battle *BattleItem +// ok bool +// side int32 +// data []byte +// errdata *pb.ErrorData +// ) +// for _, bid := range req.Battleid { +// this.lock.RLock() +// battle, ok = this.battles[bid] +// this.lock.RUnlock() +// if ok { +// if battle.Red.Uid == req.Uid || battle.Blue.Uid == req.Uid { +// if req.Uid == battle.Red.Uid { +// side = 1 +// battle.RedOffline = true +// } else { +// side = 2 +// battle.BlueOffline = true +// } + +// if battle.curroperate.Side == side { +// if battle.operatetimer != nil { +// timewheel.Remove(battle.operatetimer) +// } +// battle.curroperate.Auto = true +// data, _ = proto.Marshal(battle.curroperate) +// if errdata = this.battle.InCmdBattle(&pb.BattleInCmdReq{ +// Battleid: battle.Id, +// Side: battle.curroperate.Side, +// In: &pb.BattleCmd{ +// Cmdtype: "ComWaitInputSkill", +// Value: data, +// }, +// }); errdata != nil { +// return +// } +// } +// } +// } +// } +// return +// } diff --git a/pb/gameinvite_db.pb.go b/pb/gameinvite_db.pb.go index 3d38030c0..4ab3b5376 100644 --- a/pb/gameinvite_db.pb.go +++ b/pb/gameinvite_db.pb.go @@ -148,8 +148,9 @@ type GameInviteQiecuoRecord struct { Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //发起人id Status int32 `protobuf:"varint,3,opt,name=status,proto3" json:"status"` //0邀请中 1战斗中 Gtype int32 `protobuf:"varint,4,opt,name=gtype,proto3" json:"gtype"` //当前游戏类型 0 武馆切磋 3 猜颜色 - Battid string `protobuf:"bytes,5,opt,name=battid,proto3" json:"battid"` //战斗id - Invite map[int32]*GameInviteData `protobuf:"bytes,6,rep,name=Invite,proto3" json:"Invite" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //邀请数据 + Roomid string `protobuf:"bytes,5,opt,name=roomid,proto3" json:"roomid"` //房间id + Spath string `protobuf:"bytes,6,opt,name=spath,proto3" json:"spath"` //服务地址 + Invite map[int32]*GameInviteData `protobuf:"bytes,7,rep,name=Invite,proto3" json:"Invite" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //邀请数据 } func (x *GameInviteQiecuoRecord) Reset() { @@ -212,9 +213,16 @@ func (x *GameInviteQiecuoRecord) GetGtype() int32 { return 0 } -func (x *GameInviteQiecuoRecord) GetBattid() string { +func (x *GameInviteQiecuoRecord) GetRoomid() string { if x != nil { - return x.Battid + return x.Roomid + } + return "" +} + +func (x *GameInviteQiecuoRecord) GetSpath() string { + if x != nil { + return x.Spath } return "" } @@ -242,25 +250,26 @@ var file_gameinvite_gameinvite_db_proto_rawDesc = []byte{ 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x89, 0x02, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x9f, 0x02, 0x0a, 0x16, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x67, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, - 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x69, 0x64, - 0x12, 0x3b, 0x0a, 0x06, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x51, 0x69, 0x65, - 0x63, 0x75, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x1a, 0x4a, 0x0a, - 0x0b, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x47, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x05, 0x52, 0x05, 0x67, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x70, 0x61, 0x74, 0x68, 0x12, 0x3b, 0x0a, 0x06, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x65, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x65, 0x1a, 0x4a, 0x0a, 0x0b, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, + 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/gameinvite_msg.pb.go b/pb/gameinvite_msg.pb.go index 1203ea243..7053b255a 100644 --- a/pb/gameinvite_msg.pb.go +++ b/pb/gameinvite_msg.pb.go @@ -417,6 +417,109 @@ func (x *GameInviteQiecuonotifyPush) GetRules() string { return "" } +//游戏邀请离线请求 +type RPC_GameInviteOfflineReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gtype int32 `protobuf:"varint,1,opt,name=gtype,proto3" json:"gtype"` //游戏类型 + Roomid string `protobuf:"bytes,2,opt,name=roomid,proto3" json:"roomid"` + Offuid string `protobuf:"bytes,3,opt,name=offuid,proto3" json:"offuid"` +} + +func (x *RPC_GameInviteOfflineReq) Reset() { + *x = RPC_GameInviteOfflineReq{} + if protoimpl.UnsafeEnabled { + mi := &file_gameinvite_gameinvite_msg_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RPC_GameInviteOfflineReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RPC_GameInviteOfflineReq) ProtoMessage() {} + +func (x *RPC_GameInviteOfflineReq) ProtoReflect() protoreflect.Message { + mi := &file_gameinvite_gameinvite_msg_proto_msgTypes[7] + 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 RPC_GameInviteOfflineReq.ProtoReflect.Descriptor instead. +func (*RPC_GameInviteOfflineReq) Descriptor() ([]byte, []int) { + return file_gameinvite_gameinvite_msg_proto_rawDescGZIP(), []int{7} +} + +func (x *RPC_GameInviteOfflineReq) GetGtype() int32 { + if x != nil { + return x.Gtype + } + return 0 +} + +func (x *RPC_GameInviteOfflineReq) GetRoomid() string { + if x != nil { + return x.Roomid + } + return "" +} + +func (x *RPC_GameInviteOfflineReq) GetOffuid() string { + if x != nil { + return x.Offuid + } + return "" +} + +//游戏邀请离线请求 +type RPC_GameInviteOfflineResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RPC_GameInviteOfflineResp) Reset() { + *x = RPC_GameInviteOfflineResp{} + if protoimpl.UnsafeEnabled { + mi := &file_gameinvite_gameinvite_msg_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RPC_GameInviteOfflineResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RPC_GameInviteOfflineResp) ProtoMessage() {} + +func (x *RPC_GameInviteOfflineResp) ProtoReflect() protoreflect.Message { + mi := &file_gameinvite_gameinvite_msg_proto_msgTypes[8] + 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 RPC_GameInviteOfflineResp.ProtoReflect.Descriptor instead. +func (*RPC_GameInviteOfflineResp) Descriptor() ([]byte, []int) { + return file_gameinvite_gameinvite_msg_proto_rawDescGZIP(), []int{8} +} + var File_gameinvite_gameinvite_msg_proto protoreflect.FileDescriptor var file_gameinvite_gameinvite_msg_proto_rawDesc = []byte{ @@ -455,8 +558,16 @@ var file_gameinvite_gameinvite_msg_proto_rawDesc = []byte{ 0x74, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x6c, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x18, 0x52, 0x50, 0x43, 0x5f, 0x47, 0x61, 0x6d, 0x65, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, + 0x12, 0x14, 0x0a, 0x05, 0x67, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x67, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6f, 0x66, 0x66, 0x75, 0x69, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x50, 0x43, 0x5f, 0x47, 0x61, + 0x6d, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -471,7 +582,7 @@ func file_gameinvite_gameinvite_msg_proto_rawDescGZIP() []byte { return file_gameinvite_gameinvite_msg_proto_rawDescData } -var file_gameinvite_gameinvite_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_gameinvite_gameinvite_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_gameinvite_gameinvite_msg_proto_goTypes = []interface{}{ (*GameInviteQiecuoReq)(nil), // 0: GameInviteQiecuoReq (*GameInviteQiecuoResp)(nil), // 1: GameInviteQiecuoResp @@ -480,10 +591,12 @@ var file_gameinvite_gameinvite_msg_proto_goTypes = []interface{}{ (*GameInviteRefuseReq)(nil), // 4: GameInviteRefuseReq (*GameInviteRefuseResp)(nil), // 5: GameInviteRefuseResp (*GameInviteQiecuonotifyPush)(nil), // 6: GameInviteQiecuonotifyPush - (*BaseUserInfo)(nil), // 7: BaseUserInfo + (*RPC_GameInviteOfflineReq)(nil), // 7: RPC_GameInviteOfflineReq + (*RPC_GameInviteOfflineResp)(nil), // 8: RPC_GameInviteOfflineResp + (*BaseUserInfo)(nil), // 9: BaseUserInfo } var file_gameinvite_gameinvite_msg_proto_depIdxs = []int32{ - 7, // 0: GameInviteQiecuonotifyPush.user:type_name -> BaseUserInfo + 9, // 0: GameInviteQiecuonotifyPush.user:type_name -> BaseUserInfo 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -582,6 +695,30 @@ func file_gameinvite_gameinvite_msg_proto_init() { return nil } } + file_gameinvite_gameinvite_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RPC_GameInviteOfflineReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gameinvite_gameinvite_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RPC_GameInviteOfflineResp); 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{ @@ -589,7 +726,7 @@ func file_gameinvite_gameinvite_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gameinvite_gameinvite_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/island_db.pb.go b/pb/island_db.pb.go index 1e54a62de..c227a7cbb 100644 --- a/pb/island_db.pb.go +++ b/pb/island_db.pb.go @@ -131,6 +131,7 @@ type DBIslandItem struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` Level map[int32]int32 `protobuf:"bytes,2,rep,name=level,proto3" json:"level" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //key 关卡id value 0或者不存在 表示未通关 不等于 0表示通关 不等于 1 表示 选择的剧情id + Pos *DBVector3 `protobuf:"bytes,3,opt,name=pos,proto3" json:"pos"` } func (x *DBIslandItem) Reset() { @@ -179,45 +180,55 @@ func (x *DBIslandItem) GetLevel() map[int32]int32 { return nil } +func (x *DBIslandItem) GetPos() *DBVector3 { + if x != nil { + return x.Pos + } + return nil +} + var File_island_island_db_proto protoreflect.FileDescriptor var file_island_island_db_proto_rawDesc = []byte{ 0x0a, 0x16, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x2f, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x5f, - 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x03, 0x0a, 0x08, 0x44, 0x42, 0x49, - 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x73, - 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x73, - 0x68, 0x6f, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x2e, - 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x69, 0x73, - 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x70, 0x72, 0x6f, - 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x70, 0x72, 0x6f, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x70, - 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x70, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x76, 0x69, 0x70, 0x1a, 0x49, 0x0a, 0x0c, 0x49, 0x73, 0x6c, - 0x61, 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x49, - 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x88, - 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x2e, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, - 0x38, 0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x03, 0x0a, 0x08, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x12, + 0x30, 0x0a, 0x07, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x2e, 0x49, 0x73, 0x6c, 0x61, + 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64, + 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x0a, + 0x0c, 0x66, 0x72, 0x65, 0x65, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x70, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x03, 0x76, 0x69, 0x70, 0x1a, 0x49, 0x0a, 0x0c, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, + 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0x38, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x44, + 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x49, + 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x03, 0x70, + 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x56, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x33, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -239,17 +250,19 @@ var file_island_island_db_proto_goTypes = []interface{}{ nil, // 2: DBIsland.IslandsEntry nil, // 3: DBIsland.NodesEntry nil, // 4: DBIslandItem.LevelEntry + (*DBVector3)(nil), // 5: DBVector3 } var file_island_island_db_proto_depIdxs = []int32{ 2, // 0: DBIsland.islands:type_name -> DBIsland.IslandsEntry 3, // 1: DBIsland.nodes:type_name -> DBIsland.NodesEntry 4, // 2: DBIslandItem.level:type_name -> DBIslandItem.LevelEntry - 1, // 3: DBIsland.IslandsEntry.value:type_name -> DBIslandItem - 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 + 5, // 3: DBIslandItem.pos:type_name -> DBVector3 + 1, // 4: DBIsland.IslandsEntry.value:type_name -> DBIslandItem + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_island_island_db_proto_init() } @@ -257,6 +270,7 @@ func file_island_island_db_proto_init() { if File_island_island_db_proto != nil { return } + file_comm_proto_init() if !protoimpl.UnsafeEnabled { file_island_island_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DBIsland); i { diff --git a/pb/island_msg.pb.go b/pb/island_msg.pb.go index c118aad46..77c29485b 100644 --- a/pb/island_msg.pb.go +++ b/pb/island_msg.pb.go @@ -235,6 +235,7 @@ type IsLandCompleteReq struct { Level int32 `protobuf:"varint,1,opt,name=level,proto3" json:"level"` Story int32 `protobuf:"varint,2,opt,name=story,proto3" json:"story"` Report *BattleReport `protobuf:"bytes,3,opt,name=report,proto3" json:"report"` //战报 打怪事件完成需要提交战报 + Pos *DBVector3 `protobuf:"bytes,4,opt,name=pos,proto3" json:"pos"` } func (x *IsLandCompleteReq) Reset() { @@ -290,6 +291,13 @@ func (x *IsLandCompleteReq) GetReport() *BattleReport { return nil } +func (x *IsLandCompleteReq) GetPos() *DBVector3 { + if x != nil { + return x.Pos + } + return nil +} + //海岛探险 关卡完成 回应 type IsLandCompleteResp struct { state protoimpl.MessageState @@ -759,44 +767,46 @@ var file_island_island_msg_proto_rawDesc = []byte{ 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x66, 0x0a, 0x11, 0x49, 0x73, 0x4c, - 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, - 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x22, 0x61, 0x0a, 0x12, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, - 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, - 0x6f, 0x72, 0x79, 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, 0x19, 0x0a, 0x17, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x52, 0x65, - 0x66, 0x72, 0x65, 0x73, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x22, - 0x36, 0x0a, 0x18, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x48, - 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x68, - 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x68, - 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x22, 0x22, 0x0a, 0x0c, 0x49, 0x73, 0x4c, 0x61, 0x6e, - 0x64, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x63, 0x69, 0x64, 0x73, 0x22, 0x30, 0x0a, 0x0d, 0x49, - 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x05, - 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x24, 0x0a, - 0x10, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, - 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, - 0x6e, 0x69, 0x64, 0x22, 0x35, 0x0a, 0x11, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x12, 0x0a, 0x10, 0x49, 0x73, - 0x4c, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x22, 0x53, - 0x0a, 0x11, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x52, 0x04, 0x69, 0x6e, - 0x66, 0x6f, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x84, 0x01, 0x0a, 0x11, 0x49, 0x73, + 0x4c, 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x06, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x12, 0x1c, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0a, 0x2e, 0x44, 0x42, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x52, 0x03, 0x70, 0x6f, 0x73, + 0x22, 0x61, 0x0a, 0x12, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x6f, + 0x72, 0x79, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x61, 0x72, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x22, 0x36, + 0x0a, 0x18, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x48, 0x65, + 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x65, + 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x68, 0x65, + 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x22, 0x22, 0x0a, 0x0c, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, + 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x63, 0x69, 0x64, 0x73, 0x22, 0x30, 0x0a, 0x0d, 0x49, 0x73, + 0x4c, 0x61, 0x6e, 0x64, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x61, + 0x77, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x24, 0x0a, 0x10, + 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, + 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, + 0x69, 0x64, 0x22, 0x35, 0x0a, 0x11, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x55, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x12, 0x0a, 0x10, 0x49, 0x73, 0x4c, + 0x61, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x22, 0x53, 0x0a, + 0x11, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x09, 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x52, 0x04, 0x69, 0x6e, 0x66, + 0x6f, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -832,7 +842,8 @@ var file_island_island_msg_proto_goTypes = []interface{}{ (*BattleFormation)(nil), // 16: BattleFormation (*BattleInfo)(nil), // 17: BattleInfo (*BattleReport)(nil), // 18: BattleReport - (*UserAtno)(nil), // 19: UserAtno + (*DBVector3)(nil), // 19: DBVector3 + (*UserAtno)(nil), // 20: UserAtno } var file_island_island_msg_proto_depIdxs = []int32{ 14, // 0: IsLandInfoResp.info:type_name -> DBIsland @@ -840,15 +851,16 @@ var file_island_island_msg_proto_depIdxs = []int32{ 16, // 2: IsLandBattleReq.battle:type_name -> BattleFormation 17, // 3: IsLandBattleResp.info:type_name -> BattleInfo 18, // 4: IsLandCompleteReq.report:type_name -> BattleReport - 19, // 5: IsLandCompleteResp.award:type_name -> UserAtno - 19, // 6: IsLandBuyResp.award:type_name -> UserAtno - 14, // 7: IsLandReceiveResp.info:type_name -> DBIsland - 19, // 8: IsLandReceiveResp.award:type_name -> UserAtno - 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 + 19, // 5: IsLandCompleteReq.pos:type_name -> DBVector3 + 20, // 6: IsLandCompleteResp.award:type_name -> UserAtno + 20, // 7: IsLandBuyResp.award:type_name -> UserAtno + 14, // 8: IsLandReceiveResp.info:type_name -> DBIsland + 20, // 9: IsLandReceiveResp.award:type_name -> UserAtno + 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 } func init() { file_island_island_msg_proto_init() } diff --git a/pb/pvp_db.pb.go b/pb/pvp_db.pb.go index 8b7a61d87..601e3f0a6 100644 --- a/pb/pvp_db.pb.go +++ b/pb/pvp_db.pb.go @@ -119,19 +119,17 @@ func (PvpState) EnumDescriptor() ([]byte, []int) { return file_pvp_pvp_db_proto_rawDescGZIP(), []int{1} } -type PvpUserInfo struct { +//游戏规则 +type DBPvpRules struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` - Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar"` - Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv"` + Ptype PvpType `protobuf:"varint,1,opt,name=ptype,proto3,enum=PvpType" json:"ptype"` } -func (x *PvpUserInfo) Reset() { - *x = PvpUserInfo{} +func (x *DBPvpRules) Reset() { + *x = DBPvpRules{} if protoimpl.UnsafeEnabled { mi := &file_pvp_pvp_db_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -139,13 +137,13 @@ func (x *PvpUserInfo) Reset() { } } -func (x *PvpUserInfo) String() string { +func (x *DBPvpRules) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PvpUserInfo) ProtoMessage() {} +func (*DBPvpRules) ProtoMessage() {} -func (x *PvpUserInfo) ProtoReflect() protoreflect.Message { +func (x *DBPvpRules) ProtoReflect() protoreflect.Message { mi := &file_pvp_pvp_db_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -157,37 +155,16 @@ func (x *PvpUserInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PvpUserInfo.ProtoReflect.Descriptor instead. -func (*PvpUserInfo) Descriptor() ([]byte, []int) { +// Deprecated: Use DBPvpRules.ProtoReflect.Descriptor instead. +func (*DBPvpRules) Descriptor() ([]byte, []int) { return file_pvp_pvp_db_proto_rawDescGZIP(), []int{0} } -func (x *PvpUserInfo) GetUid() string { +func (x *DBPvpRules) GetPtype() PvpType { if x != nil { - return x.Uid + return x.Ptype } - return "" -} - -func (x *PvpUserInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PvpUserInfo) GetAvatar() string { - if x != nil { - return x.Avatar - } - return "" -} - -func (x *PvpUserInfo) GetLv() int32 { - if x != nil { - return x.Lv - } - return 0 + return PvpType_friends } type DBPvpBattle struct { @@ -195,12 +172,12 @@ type DBPvpBattle struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //战斗id - ServicePath string `protobuf:"bytes,2,opt,name=servicePath,proto3" json:"servicePath"` //战斗区服地址 - Ptype PvpType `protobuf:"varint,3,opt,name=ptype,proto3,enum=PvpType" json:"ptype"` //pvp类型 - State PvpState `protobuf:"varint,4,opt,name=state,proto3,enum=PvpState" json:"state"` //战斗状态 - Red *PvpUserInfo `protobuf:"bytes,5,opt,name=red,proto3" json:"red"` //红方id - Blue *PvpUserInfo `protobuf:"bytes,6,opt,name=blue,proto3" json:"blue"` //红方id + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //战斗id + ServicePath string `protobuf:"bytes,2,opt,name=servicePath,proto3" json:"servicePath"` //战斗区服地址 + Ptype PvpType `protobuf:"varint,3,opt,name=ptype,proto3,enum=PvpType" json:"ptype"` //pvp类型 + State PvpState `protobuf:"varint,4,opt,name=state,proto3,enum=PvpState" json:"state"` //战斗状态 + Red *BaseUserInfo `protobuf:"bytes,5,opt,name=red,proto3" json:"red"` //红方id + Blue *BaseUserInfo `protobuf:"bytes,6,opt,name=blue,proto3" json:"blue"` //红方id } func (x *DBPvpBattle) Reset() { @@ -263,14 +240,14 @@ func (x *DBPvpBattle) GetState() PvpState { return PvpState_void } -func (x *DBPvpBattle) GetRed() *PvpUserInfo { +func (x *DBPvpBattle) GetRed() *BaseUserInfo { if x != nil { return x.Red } return nil } -func (x *DBPvpBattle) GetBlue() *PvpUserInfo { +func (x *DBPvpBattle) GetBlue() *BaseUserInfo { if x != nil { return x.Blue } @@ -281,32 +258,29 @@ var File_pvp_pvp_db_proto protoreflect.FileDescriptor var file_pvp_pvp_db_proto_rawDesc = []byte{ 0x0a, 0x10, 0x70, 0x76, 0x70, 0x2f, 0x70, 0x76, 0x70, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x5b, 0x0a, 0x0b, 0x50, 0x76, 0x70, 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, 0x61, 0x76, 0x61, 0x74, 0x61, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, - 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, - 0xc2, 0x01, 0x0a, 0x0b, 0x44, 0x42, 0x50, 0x76, 0x70, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, - 0x68, 0x12, 0x1e, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x08, 0x2e, 0x50, 0x76, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x09, 0x2e, 0x50, 0x76, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x72, - 0x65, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, - 0x62, 0x6c, 0x75, 0x65, 0x2a, 0x16, 0x0a, 0x07, 0x50, 0x76, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x0b, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x10, 0x00, 0x2a, 0x43, 0x0a, 0x08, - 0x50, 0x76, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x76, 0x6f, 0x69, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x10, 0x01, 0x12, 0x0a, 0x0a, - 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x10, - 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2c, + 0x0a, 0x0a, 0x44, 0x42, 0x50, 0x76, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x05, + 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x08, 0x2e, 0x50, 0x76, + 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc4, 0x01, 0x0a, + 0x0b, 0x44, 0x42, 0x50, 0x76, 0x70, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1e, + 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x08, 0x2e, + 0x50, 0x76, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, + 0x50, 0x76, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x1f, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, + 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x64, + 0x12, 0x21, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x62, + 0x6c, 0x75, 0x65, 0x2a, 0x16, 0x0a, 0x07, 0x50, 0x76, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, + 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x10, 0x00, 0x2a, 0x43, 0x0a, 0x08, 0x50, + 0x76, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x76, 0x6f, 0x69, 0x64, 0x10, + 0x00, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x10, 0x04, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -324,21 +298,23 @@ func file_pvp_pvp_db_proto_rawDescGZIP() []byte { var file_pvp_pvp_db_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_pvp_pvp_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_pvp_pvp_db_proto_goTypes = []interface{}{ - (PvpType)(0), // 0: PvpType - (PvpState)(0), // 1: PvpState - (*PvpUserInfo)(nil), // 2: PvpUserInfo - (*DBPvpBattle)(nil), // 3: DBPvpBattle + (PvpType)(0), // 0: PvpType + (PvpState)(0), // 1: PvpState + (*DBPvpRules)(nil), // 2: DBPvpRules + (*DBPvpBattle)(nil), // 3: DBPvpBattle + (*BaseUserInfo)(nil), // 4: BaseUserInfo } var file_pvp_pvp_db_proto_depIdxs = []int32{ - 0, // 0: DBPvpBattle.ptype:type_name -> PvpType - 1, // 1: DBPvpBattle.state:type_name -> PvpState - 2, // 2: DBPvpBattle.red:type_name -> PvpUserInfo - 2, // 3: DBPvpBattle.blue:type_name -> PvpUserInfo - 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 + 0, // 0: DBPvpRules.ptype:type_name -> PvpType + 0, // 1: DBPvpBattle.ptype:type_name -> PvpType + 1, // 2: DBPvpBattle.state:type_name -> PvpState + 4, // 3: DBPvpBattle.red:type_name -> BaseUserInfo + 4, // 4: DBPvpBattle.blue:type_name -> BaseUserInfo + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_pvp_pvp_db_proto_init() } @@ -346,9 +322,10 @@ func file_pvp_pvp_db_proto_init() { if File_pvp_pvp_db_proto != nil { return } + file_comm_proto_init() if !protoimpl.UnsafeEnabled { file_pvp_pvp_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpUserInfo); i { + switch v := v.(*DBPvpRules); i { case 0: return &v.state case 1: diff --git a/pb/pvp_msg.pb.go b/pb/pvp_msg.pb.go index 83235ff6b..823b365e1 100644 --- a/pb/pvp_msg.pb.go +++ b/pb/pvp_msg.pb.go @@ -225,11 +225,11 @@ type PvpReadyPush struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ServicePath string `protobuf:"bytes,1,opt,name=servicePath,proto3" json:"servicePath"` //战斗区服地址 - Battleid string `protobuf:"bytes,2,opt,name=battleid,proto3" json:"battleid"` //战斗id - Red *PvpUserInfo `protobuf:"bytes,3,opt,name=red,proto3" json:"red"` //红方用户信息 - Blue *PvpUserInfo `protobuf:"bytes,4,opt,name=blue,proto3" json:"blue"` //蓝方用户信息 - Countdown int32 `protobuf:"varint,5,opt,name=countdown,proto3" json:"countdown"` //布阵倒计时 + ServicePath string `protobuf:"bytes,1,opt,name=servicePath,proto3" json:"servicePath"` //战斗区服地址 + Battleid string `protobuf:"bytes,2,opt,name=battleid,proto3" json:"battleid"` //战斗id + Red *BaseUserInfo `protobuf:"bytes,3,opt,name=red,proto3" json:"red"` //红方用户信息 + Blue *BaseUserInfo `protobuf:"bytes,4,opt,name=blue,proto3" json:"blue"` //蓝方用户信息 + Countdown int32 `protobuf:"varint,5,opt,name=countdown,proto3" json:"countdown"` //布阵倒计时 } func (x *PvpReadyPush) Reset() { @@ -278,14 +278,14 @@ func (x *PvpReadyPush) GetBattleid() string { return "" } -func (x *PvpReadyPush) GetRed() *PvpUserInfo { +func (x *PvpReadyPush) GetRed() *BaseUserInfo { if x != nil { return x.Red } return nil } -func (x *PvpReadyPush) GetBlue() *PvpUserInfo { +func (x *PvpReadyPush) GetBlue() *BaseUserInfo { if x != nil { return x.Blue } @@ -1093,95 +1093,96 @@ var file_pvp_pvp_msg_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x70, 0x76, 0x70, 0x2f, 0x70, 0x76, 0x70, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x0c, 0x0a, 0x0a, 0x50, 0x76, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x2f, 0x0a, - 0x0b, 0x50, 0x76, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, - 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x50, - 0x76, 0x70, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x28, - 0x0a, 0x0a, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x74, 0x6f, 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, 0x22, 0x6f, 0x0a, 0x0b, 0x50, 0x76, 0x70, 0x49, - 0x6e, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x50, 0x76, - 0x70, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, - 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x30, 0x0a, 0x12, 0x50, 0x76, 0x70, 0x4c, - 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 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, 0x22, 0x49, 0x0a, 0x13, 0x50, 0x76, - 0x70, 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 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, 0x16, 0x0a, - 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, - 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x4b, 0x0a, 0x19, 0x50, 0x76, 0x70, 0x4c, 0x6f, 0x61, 0x64, - 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x50, 0x75, - 0x73, 0x68, 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, 0x12, - 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, - 0x64, 0x65, 0x22, 0x4d, 0x0a, 0x0d, 0x50, 0x76, 0x70, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, - 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, - 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, - 0x64, 0x22, 0x30, 0x0a, 0x12, 0x50, 0x76, 0x70, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 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, 0x22, 0x2d, 0x0a, 0x13, 0x50, 0x76, 0x70, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, - 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, - 0x63, 0x63, 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x76, 0x70, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 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, 0x2e, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x2a, 0x0a, 0x10, 0x50, 0x76, 0x70, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x4f, 0x0a, - 0x0c, 0x50, 0x76, 0x70, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x49, - 0x0a, 0x0d, 0x50, 0x76, 0x70, 0x4f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x50, 0x75, 0x73, 0x68, 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, 0x1c, 0x0a, 0x03, 0x63, - 0x6d, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x47, 0x0a, 0x0b, 0x50, 0x76, 0x70, - 0x49, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0c, 0x0a, 0x0a, 0x50, + 0x76, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x2f, 0x0a, 0x0b, 0x50, 0x76, 0x70, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x50, 0x76, 0x70, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0a, 0x50, 0x76, + 0x70, 0x49, 0x6e, 0x74, 0x6f, 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, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, - 0x6d, 0x64, 0x22, 0x68, 0x0a, 0x0c, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, - 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x2b, 0x0a, 0x0d, - 0x50, 0x76, 0x70, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1a, 0x0a, + 0x6c, 0x65, 0x69, 0x64, 0x22, 0x6f, 0x0a, 0x0b, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, + 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xae, 0x01, 0x0a, 0x0c, 0x50, 0x76, 0x70, 0x52, 0x65, 0x61, + 0x64, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x30, 0x0a, 0x12, 0x50, 0x76, 0x70, 0x4c, 0x6f, 0x61, + 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 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, 0x22, 0x49, 0x0a, 0x13, 0x50, 0x76, 0x70, 0x4c, + 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 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, 0x16, 0x0a, 0x06, 0x69, + 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, + 0x75, 0x63, 0x63, 0x22, 0x4b, 0x0a, 0x19, 0x50, 0x76, 0x70, 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, + 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x50, 0x75, 0x73, 0x68, + 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, 0x12, 0x0a, 0x04, + 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, + 0x22, 0x4d, 0x0a, 0x0d, 0x50, 0x76, 0x70, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x75, 0x73, + 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x22, + 0x30, 0x0a, 0x12, 0x50, 0x76, 0x70, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 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, 0x22, 0x2d, 0x0a, 0x13, 0x50, 0x76, 0x70, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, + 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, + 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x76, 0x70, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 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, + 0x2e, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x2a, 0x0a, 0x10, 0x50, 0x76, 0x70, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x4f, 0x0a, 0x0c, 0x50, + 0x76, 0x70, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x49, 0x0a, 0x0d, + 0x50, 0x76, 0x70, 0x4f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x50, 0x75, 0x73, 0x68, 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, 0x22, 0x45, 0x0a, 0x15, 0x52, 0x50, 0x43, - 0x5f, 0x50, 0x56, 0x50, 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, 0x03, 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, 0x18, 0x0a, 0x16, 0x52, 0x50, 0x43, 0x5f, 0x50, 0x56, 0x50, 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, + 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, + 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x47, 0x0a, 0x0b, 0x50, 0x76, 0x70, 0x49, 0x6e, + 0x43, 0x6d, 0x64, 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, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, + 0x22, 0x68, 0x0a, 0x0c, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, + 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, + 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x2b, 0x0a, 0x0d, 0x50, 0x76, + 0x70, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x50, 0x75, 0x73, 0x68, 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, 0x22, 0x45, 0x0a, 0x15, 0x52, 0x50, 0x43, 0x5f, 0x50, + 0x56, 0x50, 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, 0x03, + 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, 0x18, + 0x0a, 0x16, 0x52, 0x50, 0x43, 0x5f, 0x50, 0x56, 0x50, 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 ( @@ -1221,7 +1222,7 @@ var file_pvp_pvp_msg_proto_goTypes = []interface{}{ (*DBPvpBattle)(nil), // 20: DBPvpBattle (ErrorCode)(0), // 21: ErrorCode (*BattleStateInfo)(nil), // 22: BattleStateInfo - (*PvpUserInfo)(nil), // 23: PvpUserInfo + (*BaseUserInfo)(nil), // 23: BaseUserInfo (*BattleFormation)(nil), // 24: BattleFormation (*BattleInfo)(nil), // 25: BattleInfo (*BattleCmd)(nil), // 26: BattleCmd @@ -1230,8 +1231,8 @@ var file_pvp_pvp_msg_proto_depIdxs = []int32{ 20, // 0: PvpListResp.list:type_name -> DBPvpBattle 21, // 1: PvpIntoResp.code:type_name -> ErrorCode 22, // 2: PvpIntoResp.info:type_name -> BattleStateInfo - 23, // 3: PvpReadyPush.red:type_name -> PvpUserInfo - 23, // 4: PvpReadyPush.blue:type_name -> PvpUserInfo + 23, // 3: PvpReadyPush.red:type_name -> BaseUserInfo + 23, // 4: PvpReadyPush.blue:type_name -> BaseUserInfo 24, // 5: PvpFormationReq.formation:type_name -> BattleFormation 21, // 6: PvpStartPush.code:type_name -> ErrorCode 25, // 7: PvpStartPush.info:type_name -> BattleInfo @@ -1254,6 +1255,7 @@ func file_pvp_pvp_msg_proto_init() { file_pvp_pvp_db_proto_init() file_battle_battle_msg_proto_init() file_errorcode_proto_init() + file_comm_proto_init() if !protoimpl.UnsafeEnabled { file_pvp_pvp_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PvpListReq); i {