上传捕羊大赛代码

This commit is contained in:
liwei1dao 2023-04-20 20:58:24 +08:00
parent 44319e8d2c
commit 6cfb67a14a
12 changed files with 858 additions and 153 deletions

View File

@ -313,9 +313,14 @@ const ( //Rpc
// RPC 通知来了邮件
Rpc_Mail core.Rpc_Key = "Rpc_Mail"
//PVP 离线托管
RPC_PVPTrusteeship core.Rpc_Key = "RPC_PVPTrusteeship"
//捕羊大赛加入匹配请求
RPC_ParkourJoinMatch core.Rpc_Key = "RPC_ParkourJoinMatch"
RPC_ParkourMatchSucc core.Rpc_Key = "RPC_ParkourMatchSucc"
RPC_ParkourJoinMatch core.Rpc_Key = "RPC_ParkourJoinMatch" //加入匹配
RPC_ParkourCancelMatch core.Rpc_Key = "RPC_ParkourCancelMatch" //取消匹配
RPC_ParkourMatchSucc core.Rpc_Key = "RPC_ParkourMatchSucc" //匹配成功
RPC_ParkourTrusteeship core.Rpc_Key = "RPC_ParkourTrusteeship" //捕羊大赛托管
)
// 事件类型定义处

View File

@ -8,7 +8,6 @@ import (
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/event"
"go_dreamfactory/lego/sys/log"
)
/*
@ -64,9 +63,7 @@ func (this *Items) OnInstallComp() {
//Event------------------------------------------------------------------------------------------------------------
func (this *Items) EventUserOffline(uid, sessionid string) {
if err := this.modelItems.BatchDelLists(uid); err != nil {
this.Error("EventUserOffline", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()})
}
this.modelItems.BatchDelLists(uid)
}
//IItems-------------------------------------------------------------------------------------------------------------------------------

View File

@ -10,6 +10,9 @@ import (
//参数校验
func (this *apiComp) InviteCheck(session comm.IUserSession, req *pb.ParkourInviteReq) (code pb.ErrorCode) {
if req.Uid == session.GetUserId() {
code = pb.ErrorCode_ReqParameterError
}
return
}
@ -47,8 +50,6 @@ func (this *apiComp) Invite(session comm.IUserSession, req *pb.ParkourInviteReq)
return
}
info.Member = append(info.Member, &pb.DBRaceMember{Uid: tuser.Uid, Name: tuser.Name, Avatar: tuser.Avatar, Mount: info.Dfmount, Hp: mount.Hp, Isai: true})
if tinfo, err = this.module.parkourComp.queryinfo(req.Uid); err != nil {
code = pb.ErrorCode_DBError
return
@ -77,7 +78,7 @@ func (this *apiComp) Invite(session comm.IUserSession, req *pb.ParkourInviteReq)
}
}
if !ok {
info.Invite = append(info.Invite, &pb.DBRaceInvite{Uid: tuser.Uid, Name: tuser.Name, Avatar: tuser.Avatar})
info.Invite = append(info.Invite, &pb.DBRaceInvite{Uid: tuser.Uid, Name: tuser.Name, Avatar: tuser.Avatar, Expired: configure.Now().Add(time.Second * 10).Unix()})
}
this.module.SendMsgToUser(string(this.module.GetType()), "invitenotice",
&pb.ParkourInviteNoticePush{Team: info, State: 1}, req.Uid)

View File

@ -23,6 +23,7 @@ func (this *apiComp) InviteHandle(session comm.IUserSession, req *pb.ParkourInvi
mount *cfg.GameBuzkashiMountData
users []string
ok bool
index int32
err error
)
if code = this.InviteHandleCheck(session, req); code != pb.ErrorCode_Success {
@ -37,21 +38,24 @@ func (this *apiComp) InviteHandle(session comm.IUserSession, req *pb.ParkourInvi
code = pb.ErrorCode_DBError
return
}
if len(tean.Member) > 3 {
if len(tean.Member) >= 3 {
code = pb.ErrorCode_ParkourMemberFull
return
}
if req.State == 1 {
ok = false
for _, v := range tean.Invite {
if v.Uid == session.GetUserId() && configure.Now().Before(time.Unix(v.Expired, 0)) { //邀请未过期
for i, v := range tean.Invite {
if v.Uid == session.GetUserId() && !configure.Now().Before(time.Unix(v.Expired, 0)) { //邀请未过期
invite = v
index = int32(i)
ok = true
}
}
if !ok {
code = pb.ErrorCode_ParkourInviteOverdue
return
}
tean.Invite = append(tean.Invite[0:index], tean.Invite[index+1:]...)
users = make([]string, len(tean.Member))
for i, v := range tean.Member {
users[i] = v.Uid
@ -62,6 +66,7 @@ func (this *apiComp) InviteHandle(session comm.IUserSession, req *pb.ParkourInvi
}
member = &pb.DBRaceMember{Uid: invite.Uid, Name: invite.Name, Avatar: invite.Avatar, Mount: info.Dfmount, Hp: mount.Hp}
tean.Captainid = tean.Uid
tean.State = pb.RaceTeamState_teaming
tean.Member = append(tean.Member, member)
if err = this.module.parkourComp.Change(session.GetUserId(), map[string]interface{}{
"captainid": tean.Captainid,
@ -70,6 +75,8 @@ func (this *apiComp) InviteHandle(session comm.IUserSession, req *pb.ParkourInvi
return
}
if err = this.module.parkourComp.Change(tean.Captainid, map[string]interface{}{
"state": tean.State,
"invite": tean.Invite,
"captainid": tean.Captainid,
"member": tean.Member,
}); err != nil {

View File

@ -10,17 +10,16 @@ import (
///捕羊大赛对象
type RaceItem struct {
Id string //战斗id
lock sync.Mutex //战斗锁 防止计时器和消息同时操作对象
RedMember []*pb.DBRaceMember //红方成员
RedSession []comm.IUserSession //红方会话
RedScore int32 //红方分值
RedEnergy int32 //红方能量
BuleMember []*pb.DBRaceMember //蓝方成员
BuleSession []comm.IUserSession //蓝方会话
BuleScore int32 //蓝方分值
BuleEnergy int32 //蓝方能量
overtimer *timewheel.Task //准备倒计时定时器
Id string //战斗id
lock sync.Mutex //战斗锁 防止计时器和消息同时操作对象
RedMember []*pb.DBRaceMember //红方成员
RedScore int32 //红方分值
RedEnergy int32 //红方能量
BuleMember []*pb.DBRaceMember //蓝方成员
Session map[string]comm.IUserSession
BuleScore int32 //蓝方分值
BuleEnergy int32 //蓝方能量
overtimer *timewheel.Task //准备倒计时定时器
}
type AILevel int32

View File

@ -3,6 +3,7 @@ package parkour
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/db"
@ -37,3 +38,15 @@ func (this *ModelRaceComp) delrace(id string) (err error) {
}
return
}
//查询用户重置数据
func (this *ModelRaceComp) queryraces() (result []*pb.DBRace, err error) {
result = make([]*pb.DBRace, 0)
if err = this.GetList("", &result); err != nil && err != mgo.MongodbNil {
this.module.Errorf("err:%v", err)
}
if err == mgo.MongodbNil {
err = nil
}
return
}

View File

@ -6,6 +6,7 @@ import (
"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"
@ -54,6 +55,7 @@ func (this *Parkour) Init(service core.IService, module core.IModule, options co
func (this *Parkour) Start() (err error) {
err = this.ModuleBase.Start()
this.service.RegisterFunctionName(string(comm.RPC_ParkourMatchSucc), this.createbattle)
event.RegisterGO(comm.EventUserOffline, this.useroffline)
return
}
@ -85,8 +87,9 @@ func (this *Parkour) AddMounts(session comm.IUserSession, mounts map[string]int3
//匹配
func (this *Parkour) match(team *pb.DBParkour) (err error) {
ctx, _ := context.WithTimeout(context.Background(), time.Second*5)
err = this.service.RpcCall(
context.Background(),
ctx,
comm.Service_Mainte,
string(comm.RPC_ParkourJoinMatch),
&pb.RPCParkourJoinMatchReq{Captainid: team.Captainid, Member: team.Member},
@ -114,10 +117,9 @@ func (this *Parkour) createbattle(ctx context.Context, req *pb.RPCParkourMatchSu
Bulemember: req.Bule,
}
battle = &RaceItem{
Id: race.Id,
RedSession: make([]comm.IUserSession, 0),
BuleSession: make([]comm.IUserSession, 0),
overtimer: timewheel.Add(time.Minute*3, this.overtimer, race.Id),
Id: race.Id,
Session: make(map[string]comm.IUserSession),
overtimer: timewheel.Add(time.Minute*3, this.overtimer, race.Id),
}
for _, v := range req.Red {
@ -126,14 +128,13 @@ func (this *Parkour) createbattle(ctx context.Context, req *pb.RPCParkourMatchSu
session, online := this.GetUserSession(v.Uid)
v.Isoff = !online
if online {
battle.RedSession = append(battle.RedSession, session)
battle.Session[v.Uid] = session
}
} else {
v.Ready = true
}
}
sessions = append(sessions, battle.RedSession...)
battle.RedMember = req.Red
for _, v := range req.Bule {
v.Hp = 6
@ -141,13 +142,16 @@ func (this *Parkour) createbattle(ctx context.Context, req *pb.RPCParkourMatchSu
session, online := this.GetUserSession(v.Uid)
v.Isoff = !online
if online {
battle.BuleSession = append(battle.BuleSession, session)
battle.Session[v.Uid] = session
}
} else {
v.Ready = true
}
}
sessions = append(sessions, battle.BuleSession...)
for _, v := range battle.Session {
sessions = append(sessions, v)
}
battle.BuleMember = req.Bule
if err = this.raceComp.addrace(race); err != nil {
return
@ -190,8 +194,10 @@ func (this *Parkour) startbattle(id string) {
this.Errorln(err)
return
}
sessions = append(sessions, battle.RedSession...)
sessions = append(sessions, battle.BuleSession...)
for _, v := range battle.Session {
sessions = append(sessions, v)
}
if err = this.SendMsgToSession(string(comm.ModulePvp), "racestart", &pb.ParkourRaceStartPush{
Countdown: 3,
}, sessions...); err != nil {
@ -212,8 +218,10 @@ func (this *Parkour) shot(id string, uid string) {
battle, ok = this.battles[id]
this.lock.RUnlock()
if ok {
sessions = append(sessions, battle.RedSession...)
sessions = append(sessions, battle.BuleSession...)
for _, v := range battle.Session {
sessions = append(sessions, v)
}
if err = this.SendMsgToSession(string(this.GetType()), "scorechanage", &pb.ParkourScoreChanagePush{
Red: battle.RedScore,
Blue: battle.BuleScore,
@ -255,8 +263,10 @@ func (this *Parkour) avoid(id string, uid string, dis int32) {
this.Error("躲避障碍物逻辑异常 未找到玩家!", log.Field{Key: "battleid", Value: id}, log.Field{Key: "uid", Value: uid})
return
}
sessions = append(sessions, battle.RedSession...)
sessions = append(sessions, battle.BuleSession...)
for _, v := range battle.Session {
sessions = append(sessions, v)
}
if err = this.SendMsgToSession(string(this.GetType()), "playerhpchanage", &pb.ParkourPlayerHPChanagePush{
Uid: uid,
Hp: member.Hp,
@ -291,13 +301,246 @@ func (this *Parkour) overtimer(task *timewheel.Task, args ...interface{}) {
} else {
side = 2
}
sessions = append(sessions, battle.RedSession...)
sessions = append(sessions, battle.BuleSession...)
for _, v := range battle.Session {
sessions = append(sessions, v)
}
if err = this.SendMsgToSession(string(this.GetType()), "raceover", &pb.ParkourRaceOverPush{
Winside: side,
}, sessions...); err != nil {
this.Errorln(err)
return
}
for _, v := range battle.RedMember {
if !v.Isai {
if err = this.parkourComp.Change(v.Uid, map[string]interface{}{
"captainid": "",
"state": 0,
"invite": []*pb.DBRaceInvite{},
"member": []*pb.DBRaceMember{},
}); err != nil {
this.Errorln(err)
return
}
}
}
for _, v := range battle.BuleMember {
if !v.Isai {
if err = this.parkourComp.Change(v.Uid, map[string]interface{}{
"captainid": "",
"state": 0,
"invite": []*pb.DBRaceInvite{},
"member": []*pb.DBRaceMember{},
}); err != nil {
this.Errorln(err)
return
}
}
}
}
}
//用户离线处理
func (this *Parkour) useroffline(uid, sessionid string) {
var (
info *pb.DBParkour
team *pb.DBParkour
member *pb.DBRaceMember
users []string
index int32
err error
)
if info, err = this.parkourComp.queryinfo(uid); err != nil {
this.Error("用户离线!", log.Field{Key: "err", Value: err.Error()})
return
}
if info.State == pb.RaceTeamState_teaming {
if info.Captainid == uid {
info.Invite = info.Invite[:0]
info.Member = info.Member[:0]
if err = this.parkourComp.Change(uid, map[string]interface{}{
"captainid": "",
"state": 0,
"Invite": info.Invite,
"member": info.Member,
}); err != nil {
this.Error("用户离线! 处理数据", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()})
return
}
users = make([]string, 0)
for _, v := range info.Member {
if v.Uid != uid && !v.Isai {
users = append(users, v.Uid)
if err = this.parkourComp.Change(v.Uid, map[string]interface{}{
"captainid": "",
"state": 0,
}); err != nil {
this.Error("用户离线! 解散队伍处理", log.Field{Key: "uid", Value: v.Uid}, log.Field{Key: "err", Value: err.Error()})
return
}
}
}
if len(users) > 0 {
if err = this.SendMsgToUsers(string(comm.ModulePvp), "teamdisbandnotice", &pb.ParkourTeamDisbandNoticePush{}, users...); err != nil {
this.Errorln(err)
}
}
} else {
if team, err = this.parkourComp.queryinfo(info.Captainid); err != nil {
this.Error("用户离线!", log.Field{Key: "Captainid", Value: info.Captainid}, log.Field{Key: "err", Value: err.Error()})
return
}
users = make([]string, 0)
for i, v := range team.Member {
if v.Uid == uid {
index = int32(i)
member = v
continue
}
if v.Uid != uid && !v.Isai {
users = append(users, v.Uid)
}
}
team.Member = append(team.Member[0:index], team.Member[index+1:]...)
if err = this.parkourComp.Change(team.Uid, map[string]interface{}{
"member": team.Member,
}); err != nil {
this.Error("用户离线! 解散队伍处理", log.Field{Key: "uid", Value: team.Uid}, log.Field{Key: "err", Value: err.Error()})
return
}
if len(users) > 0 {
this.SendMsgToUsers(string(this.GetType()), "teamquitnotice",
&pb.ParkourTeamQuitNoticePush{Member: member}, users...)
this.SendMsgToUsers(string(this.GetType()), "teamchanage",
&pb.ParkourTeamChanagePush{Team: team}, users...)
}
}
} else if info.State == pb.RaceTeamState_matching {
if info.Captainid == uid {
err = this.service.RpcCall(
context.Background(),
comm.Service_Mainte,
string(comm.RPC_ParkourCancelMatch),
&pb.RPCParkourCancelMatchReq{Captainid: info.Captainid},
&pb.RPCParkourCancelMatchResp{})
if err != nil {
this.Errorln(err)
return
}
if err = this.parkourComp.Change(uid, map[string]interface{}{
"captainid": "",
"state": 0,
"Invite": info.Invite,
"member": info.Member,
}); err != nil {
this.Error("用户离线! 处理数据", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()})
return
}
users = make([]string, 0)
for _, v := range info.Member {
if v.Uid != uid && !v.Isai {
users = append(users, v.Uid)
if err = this.parkourComp.Change(v.Uid, map[string]interface{}{
"captainid": "",
"state": 0,
}); err != nil {
this.Error("用户离线! 解散队伍处理", log.Field{Key: "uid", Value: v.Uid}, log.Field{Key: "err", Value: err.Error()})
return
}
}
}
if len(users) > 0 {
if err = this.SendMsgToUsers(string(comm.ModulePvp), "teamdisbandnotice", &pb.ParkourTeamDisbandNoticePush{}, users...); err != nil {
this.Errorln(err)
}
}
}
} else if info.State == pb.RaceTeamState_raceing {
var (
lockpath string = fmt.Sprintf("%s/%s", this.service.GetType(), this.service.GetId())
result []*pb.DBRace
)
if result, err = this.raceComp.queryraces(); err != nil {
this.Errorln(err)
return
}
for _, v := range result {
for _, v1 := range v.Redmember {
if !v1.Isai && v1.Uid == uid {
if lockpath == v.ServicePath {
this.trusteeship(context.Background(), &pb.RPC_ParkourTrusteeshipReq{Battleid: v.Id, Uid: uid}, nil)
return
} else {
ctx, _ := context.WithTimeout(context.Background(), time.Second*5)
_, err = this.service.RpcGo(
ctx,
comm.Service_Mainte,
string(comm.RPC_ParkourJoinMatch),
&pb.RPC_ParkourTrusteeshipReq{Battleid: v.Id, Uid: uid},
nil)
if err != nil {
this.Errorln(err)
return
}
return
}
}
}
for _, v1 := range v.Bulemember {
if !v1.Isai && v1.Uid == uid {
if lockpath == v.ServicePath {
this.trusteeship(context.Background(), &pb.RPC_ParkourTrusteeshipReq{Battleid: v.Id, Uid: uid}, nil)
return
} else {
ctx, _ := context.WithTimeout(context.Background(), time.Second*5)
_, err = this.service.RpcGo(
ctx,
comm.Service_Mainte,
string(comm.RPC_ParkourJoinMatch),
&pb.RPC_ParkourTrusteeshipReq{Battleid: v.Id, Uid: uid},
nil)
if err != nil {
this.Errorln(err)
return
}
return
}
}
}
}
}
}
//托管
func (this *Parkour) trusteeship(ctx context.Context, req *pb.RPC_ParkourTrusteeshipReq, resp *pb.RPC_ParkourTrusteeshipResp) (err error) {
var (
battle *RaceItem
ok bool
)
this.lock.RLock()
battle, ok = this.battles[req.Battleid]
this.lock.RUnlock()
if ok {
battle.lock.Lock()
for _, v := range battle.BuleMember {
if v.Uid == v.Uid {
v.Isoff = true
}
}
for _, v := range battle.RedMember {
if v.Uid == v.Uid {
v.Isoff = true
}
}
delete(battle.Session, req.Uid)
battle.lock.Unlock()
}
return
}

View File

@ -1,6 +1,7 @@
package pvp
import (
"context"
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/base"
@ -399,39 +400,86 @@ func (this *Pvp) userlogin(session comm.IUserSession) {
//用户离线处理
func (this *Pvp) useroffline(uid, sessionid string) {
var (
side int32
data []byte
code pb.ErrorCode
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
)
this.lock.RLock()
for _, v := range this.battles {
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 uid == v.Red.Uid {
side = 1
v.RedOffline = true
} else {
side = 2
v.BlueOffline = true
if service[v.ServicePath] == nil {
service[v.ServicePath] = make([]string, 0)
}
service[v.ServicePath] = append(service[v.ServicePath], v.Id)
}
}
if v.curroperate.Side == side {
if v.operatetimer != nil {
timewheel.Remove(v.operatetimer)
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,
comm.Service_Mainte,
string(comm.RPC_ParkourJoinMatch),
&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) {
var (
battle *BattleItem
ok bool
side int32
data []byte
code pb.ErrorCode
)
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
}
v.curroperate.Auto = true
data, _ = proto.Marshal(v.curroperate)
if code = this.battle.InCmdBattle(&pb.BattleInCmdReq{
Battleid: v.Id,
Side: v.curroperate.Side,
In: &pb.BattleCmd{
Cmdtype: "ComWaitInputSkill",
Value: data,
},
}); code != pb.ErrorCode_Success {
return
if battle.curroperate.Side == side {
if battle.operatetimer != nil {
timewheel.Remove(battle.operatetimer)
}
battle.curroperate.Auto = true
data, _ = proto.Marshal(battle.curroperate)
if code = this.battle.InCmdBattle(&pb.BattleInCmdReq{
Battleid: battle.Id,
Side: battle.curroperate.Side,
In: &pb.BattleCmd{
Cmdtype: "ComWaitInputSkill",
Value: data,
},
}); code != pb.ErrorCode_Success {
return
}
}
}
}
}
this.lock.RUnlock()
return
}

View File

@ -49,6 +49,7 @@ func (this *ParkourComp) Start() (err error) {
if db.IsCross() {
this.refreshlist()
this.service.RegisterFunctionName(string(comm.RPC_ParkourJoinMatch), this.join)
this.service.RegisterFunctionName(string(comm.RPC_ParkourCancelMatch), this.cancel)
if _, err = cron.AddFunc("5 * * * * ?", this.timer); err != nil {
this.module.Errorf("cron.AddFunc err:%v", err)
}
@ -186,6 +187,14 @@ func (this *ParkourComp) join(ctx context.Context, req *pb.RPCParkourJoinMatchRe
return
}
//加入匹配中
func (this *ParkourComp) cancel(ctx context.Context, req *pb.RPCParkourCancelMatchReq, resp *pb.RPCParkourCancelMatchResp) (err error) {
this.lock.Lock()
delete(this.teams, req.Captainid)
this.lock.Unlock()
return
}
//定时匹配处理
func (this *ParkourComp) timer() {
if this.total == 0 {

View File

@ -70,22 +70,25 @@ func (RaceType) EnumDescriptor() ([]byte, []int) {
type RaceTeamState int32
const (
RaceTeamState_teaming RaceTeamState = 0 //组队中
RaceTeamState_matching RaceTeamState = 1 //匹配中
RaceTeamState_raceing RaceTeamState = 2 //比赛中
RaceTeamState_resting RaceTeamState = 0 //休息中
RaceTeamState_teaming RaceTeamState = 1 //组队中
RaceTeamState_matching RaceTeamState = 2 //匹配中
RaceTeamState_raceing RaceTeamState = 3 //比赛中
)
// Enum value maps for RaceTeamState.
var (
RaceTeamState_name = map[int32]string{
0: "teaming",
1: "matching",
2: "raceing",
0: "resting",
1: "teaming",
2: "matching",
3: "raceing",
}
RaceTeamState_value = map[string]int32{
"teaming": 0,
"matching": 1,
"raceing": 2,
"resting": 0,
"teaming": 1,
"matching": 2,
"raceing": 3,
}
)
@ -305,15 +308,16 @@ type DBParkour struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` // 队伍id
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //用户id
Mounts map[string]int32 `protobuf:"bytes,3,rep,name=mounts,proto3" json:"mounts" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //坐骑列表
Dfmount string `protobuf:"bytes,4,opt,name=dfmount,proto3" json:"dfmount"` //默认坐骑
State RaceTeamState `protobuf:"varint,5,opt,name=state,proto3,enum=RaceTeamState" json:"state"` //队伍状态
Integral int32 `protobuf:"varint,6,opt,name=integral,proto3" json:"integral"` //积分
Captainid string `protobuf:"bytes,7,opt,name=captainid,proto3" json:"captainid"` //队长id 当前所在队伍
Invite []*DBRaceInvite `protobuf:"bytes,8,rep,name=invite,proto3" json:"invite"` //邀请列表
Member []*DBRaceMember `protobuf:"bytes,9,rep,name=member,proto3" json:"member"` //成员列表
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` // 队伍id
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //用户id
Mounts map[string]int32 `protobuf:"bytes,3,rep,name=mounts,proto3" json:"mounts" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //坐骑列表
Dfmount string `protobuf:"bytes,4,opt,name=dfmount,proto3" json:"dfmount"` //默认坐骑
State RaceTeamState `protobuf:"varint,5,opt,name=state,proto3,enum=RaceTeamState" json:"state"` //队伍状态
Currbattid string `protobuf:"bytes,6,opt,name=currbattid,proto3" json:"currbattid"` //当前战斗id
Integral int32 `protobuf:"varint,7,opt,name=integral,proto3" json:"integral"` //积分
Captainid string `protobuf:"bytes,8,opt,name=captainid,proto3" json:"captainid"` //队长id 当前所在队伍
Invite []*DBRaceInvite `protobuf:"bytes,9,rep,name=invite,proto3" json:"invite"` //邀请列表
Member []*DBRaceMember `protobuf:"bytes,10,rep,name=member,proto3" json:"member"` //成员列表
}
func (x *DBParkour) Reset() {
@ -380,7 +384,14 @@ func (x *DBParkour) GetState() RaceTeamState {
if x != nil {
return x.State
}
return RaceTeamState_teaming
return RaceTeamState_resting
}
func (x *DBParkour) GetCurrbattid() string {
if x != nil {
return x.Currbattid
}
return ""
}
func (x *DBParkour) GetIntegral() int32 {
@ -531,7 +542,7 @@ var file_parkour_parkour_db_proto_rawDesc = []byte{
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, 0x18, 0x0a, 0x07, 0x65,
0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x78,
0x70, 0x69, 0x72, 0x65, 0x64, 0x22, 0xe0, 0x02, 0x0a, 0x09, 0x44, 0x42, 0x50, 0x61, 0x72, 0x6b,
0x70, 0x69, 0x72, 0x65, 0x64, 0x22, 0x80, 0x03, 0x0a, 0x09, 0x44, 0x42, 0x50, 0x61, 0x72, 0x6b,
0x6f, 0x75, 0x72, 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, 0x2e, 0x0a, 0x06, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18,
@ -541,14 +552,16 @@ var file_parkour_parkour_db_proto_rawDesc = []byte{
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x66, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12,
0x24, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e,
0x2e, 0x52, 0x61, 0x63, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05,
0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x07,
0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x62, 0x61, 0x74,
0x74, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x62,
0x61, 0x74, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x08,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12,
0x25, 0x0a, 0x06, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x25, 0x0a, 0x06, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x06,
0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72,
0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d,
0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d,
0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x1a, 0x39, 0x0a,
0x0b, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
@ -570,12 +583,13 @@ var file_parkour_parkour_db_proto_rawDesc = []byte{
0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x0a,
0x62, 0x75, 0x6c, 0x65, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2a, 0x22, 0x0a, 0x08, 0x52, 0x61,
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61,
0x72, 0x79, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x70, 0x72, 0x6f, 0x70, 0x10, 0x01, 0x2a, 0x37,
0x72, 0x79, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x70, 0x72, 0x6f, 0x70, 0x10, 0x01, 0x2a, 0x44,
0x0a, 0x0d, 0x52, 0x61, 0x63, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,
0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x61,
0x63, 0x65, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x0b, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07,
0x74, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x74,
0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x61, 0x63, 0x65, 0x69,
0x6e, 0x67, 0x10, 0x03, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -1546,6 +1546,92 @@ func (*RPCParkourJoinMatchResp) Descriptor() ([]byte, []int) {
return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{31}
}
//取消匹配
type RPCParkourCancelMatchReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Captainid string `protobuf:"bytes,1,opt,name=captainid,proto3" json:"captainid"` //队长id
}
func (x *RPCParkourCancelMatchReq) Reset() {
*x = RPCParkourCancelMatchReq{}
if protoimpl.UnsafeEnabled {
mi := &file_parkour_parkour_msg_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RPCParkourCancelMatchReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RPCParkourCancelMatchReq) ProtoMessage() {}
func (x *RPCParkourCancelMatchReq) ProtoReflect() protoreflect.Message {
mi := &file_parkour_parkour_msg_proto_msgTypes[32]
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 RPCParkourCancelMatchReq.ProtoReflect.Descriptor instead.
func (*RPCParkourCancelMatchReq) Descriptor() ([]byte, []int) {
return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{32}
}
func (x *RPCParkourCancelMatchReq) GetCaptainid() string {
if x != nil {
return x.Captainid
}
return ""
}
type RPCParkourCancelMatchResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *RPCParkourCancelMatchResp) Reset() {
*x = RPCParkourCancelMatchResp{}
if protoimpl.UnsafeEnabled {
mi := &file_parkour_parkour_msg_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RPCParkourCancelMatchResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RPCParkourCancelMatchResp) ProtoMessage() {}
func (x *RPCParkourCancelMatchResp) ProtoReflect() protoreflect.Message {
mi := &file_parkour_parkour_msg_proto_msgTypes[33]
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 RPCParkourCancelMatchResp.ProtoReflect.Descriptor instead.
func (*RPCParkourCancelMatchResp) Descriptor() ([]byte, []int) {
return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{33}
}
///匹配成功通知请求
type RPCParkourMatchSuccReq struct {
state protoimpl.MessageState
@ -1559,7 +1645,7 @@ type RPCParkourMatchSuccReq struct {
func (x *RPCParkourMatchSuccReq) Reset() {
*x = RPCParkourMatchSuccReq{}
if protoimpl.UnsafeEnabled {
mi := &file_parkour_parkour_msg_proto_msgTypes[32]
mi := &file_parkour_parkour_msg_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1572,7 +1658,7 @@ func (x *RPCParkourMatchSuccReq) String() string {
func (*RPCParkourMatchSuccReq) ProtoMessage() {}
func (x *RPCParkourMatchSuccReq) ProtoReflect() protoreflect.Message {
mi := &file_parkour_parkour_msg_proto_msgTypes[32]
mi := &file_parkour_parkour_msg_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1585,7 +1671,7 @@ func (x *RPCParkourMatchSuccReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use RPCParkourMatchSuccReq.ProtoReflect.Descriptor instead.
func (*RPCParkourMatchSuccReq) Descriptor() ([]byte, []int) {
return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{32}
return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{34}
}
func (x *RPCParkourMatchSuccReq) GetRed() []*DBRaceMember {
@ -1612,7 +1698,7 @@ type RPCParkourMatchSuccResp struct {
func (x *RPCParkourMatchSuccResp) Reset() {
*x = RPCParkourMatchSuccResp{}
if protoimpl.UnsafeEnabled {
mi := &file_parkour_parkour_msg_proto_msgTypes[33]
mi := &file_parkour_parkour_msg_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1625,7 +1711,7 @@ func (x *RPCParkourMatchSuccResp) String() string {
func (*RPCParkourMatchSuccResp) ProtoMessage() {}
func (x *RPCParkourMatchSuccResp) ProtoReflect() protoreflect.Message {
mi := &file_parkour_parkour_msg_proto_msgTypes[33]
mi := &file_parkour_parkour_msg_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1638,7 +1724,101 @@ func (x *RPCParkourMatchSuccResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use RPCParkourMatchSuccResp.ProtoReflect.Descriptor instead.
func (*RPCParkourMatchSuccResp) Descriptor() ([]byte, []int) {
return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{33}
return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{35}
}
//托管求情
type RPC_ParkourTrusteeshipReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Battleid string `protobuf:"bytes,1,opt,name=battleid,proto3" json:"battleid"`
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
}
func (x *RPC_ParkourTrusteeshipReq) Reset() {
*x = RPC_ParkourTrusteeshipReq{}
if protoimpl.UnsafeEnabled {
mi := &file_parkour_parkour_msg_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RPC_ParkourTrusteeshipReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RPC_ParkourTrusteeshipReq) ProtoMessage() {}
func (x *RPC_ParkourTrusteeshipReq) ProtoReflect() protoreflect.Message {
mi := &file_parkour_parkour_msg_proto_msgTypes[36]
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_ParkourTrusteeshipReq.ProtoReflect.Descriptor instead.
func (*RPC_ParkourTrusteeshipReq) Descriptor() ([]byte, []int) {
return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{36}
}
func (x *RPC_ParkourTrusteeshipReq) GetBattleid() string {
if x != nil {
return x.Battleid
}
return ""
}
func (x *RPC_ParkourTrusteeshipReq) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
type RPC_ParkourTrusteeshipResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *RPC_ParkourTrusteeshipResp) Reset() {
*x = RPC_ParkourTrusteeshipResp{}
if protoimpl.UnsafeEnabled {
mi := &file_parkour_parkour_msg_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RPC_ParkourTrusteeshipResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RPC_ParkourTrusteeshipResp) ProtoMessage() {}
func (x *RPC_ParkourTrusteeshipResp) ProtoReflect() protoreflect.Message {
mi := &file_parkour_parkour_msg_proto_msgTypes[37]
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_ParkourTrusteeshipResp.ProtoReflect.Descriptor instead.
func (*RPC_ParkourTrusteeshipResp) Descriptor() ([]byte, []int) {
return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{37}
}
var File_parkour_parkour_msg_proto protoreflect.FileDescriptor
@ -1747,14 +1927,26 @@ var file_parkour_parkour_msg_proto_rawDesc = []byte{
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d,
0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x19, 0x0a,
0x17, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x4d,
0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5c, 0x0a, 0x16, 0x52, 0x50, 0x43, 0x50,
0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x63, 0x63, 0x52,
0x65, 0x71, 0x12, 0x1f, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x03,
0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72,
0x52, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72,
0x6b, 0x6f, 0x75, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x63, 0x63, 0x52, 0x65, 0x73,
0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x38, 0x0a, 0x18, 0x52, 0x50, 0x43, 0x50,
0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63,
0x68, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e,
0x69, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72,
0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22,
0x5c, 0x0a, 0x16, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4d, 0x61, 0x74,
0x63, 0x68, 0x53, 0x75, 0x63, 0x63, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x03, 0x72, 0x65, 0x64,
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d,
0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x62, 0x75,
0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63,
0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x22, 0x19, 0x0a,
0x17, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68,
0x53, 0x75, 0x63, 0x63, 0x52, 0x65, 0x73, 0x70, 0x22, 0x49, 0x0a, 0x19, 0x52, 0x50, 0x43, 0x5f,
0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x65, 0x73, 0x68,
0x69, 0x70, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69,
0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x75, 0x69, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x50, 0x43, 0x5f, 0x50, 0x61, 0x72, 0x6b, 0x6f,
0x75, 0x72, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x65, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73,
0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
@ -1771,7 +1963,7 @@ func file_parkour_parkour_msg_proto_rawDescGZIP() []byte {
return file_parkour_parkour_msg_proto_rawDescData
}
var file_parkour_parkour_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 34)
var file_parkour_parkour_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 38)
var file_parkour_parkour_msg_proto_goTypes = []interface{}{
(*ParkourInfoReq)(nil), // 0: ParkourInfoReq
(*ParkourInfoResp)(nil), // 1: ParkourInfoResp
@ -1805,25 +1997,29 @@ var file_parkour_parkour_msg_proto_goTypes = []interface{}{
(*ParkourRaceOverPush)(nil), // 29: ParkourRaceOverPush
(*RPCParkourJoinMatchReq)(nil), // 30: RPCParkourJoinMatchReq
(*RPCParkourJoinMatchResp)(nil), // 31: RPCParkourJoinMatchResp
(*RPCParkourMatchSuccReq)(nil), // 32: RPCParkourMatchSuccReq
(*RPCParkourMatchSuccResp)(nil), // 33: RPCParkourMatchSuccResp
(*DBParkour)(nil), // 34: DBParkour
(*DBRaceMember)(nil), // 35: DBRaceMember
(*DBRace)(nil), // 36: DBRace
(*RPCParkourCancelMatchReq)(nil), // 32: RPCParkourCancelMatchReq
(*RPCParkourCancelMatchResp)(nil), // 33: RPCParkourCancelMatchResp
(*RPCParkourMatchSuccReq)(nil), // 34: RPCParkourMatchSuccReq
(*RPCParkourMatchSuccResp)(nil), // 35: RPCParkourMatchSuccResp
(*RPC_ParkourTrusteeshipReq)(nil), // 36: RPC_ParkourTrusteeshipReq
(*RPC_ParkourTrusteeshipResp)(nil), // 37: RPC_ParkourTrusteeshipResp
(*DBParkour)(nil), // 38: DBParkour
(*DBRaceMember)(nil), // 39: DBRaceMember
(*DBRace)(nil), // 40: DBRace
}
var file_parkour_parkour_msg_proto_depIdxs = []int32{
34, // 0: ParkourInfoResp.info:type_name -> DBParkour
34, // 1: ParkourInfoResp.recommend:type_name -> DBParkour
34, // 2: ParkourInfoChangePush.info:type_name -> DBParkour
34, // 3: ParkourInviteResp.team:type_name -> DBParkour
34, // 4: ParkourInviteNoticePush.team:type_name -> DBParkour
34, // 5: ParkourTeamChanagePush.team:type_name -> DBParkour
35, // 6: ParkourTeamJoinNoticePush.member:type_name -> DBRaceMember
35, // 7: ParkourTeamQuitNoticePush.member:type_name -> DBRaceMember
36, // 8: ParkourRaceMatchSuccPush.race:type_name -> DBRace
35, // 9: RPCParkourJoinMatchReq.member:type_name -> DBRaceMember
35, // 10: RPCParkourMatchSuccReq.red:type_name -> DBRaceMember
35, // 11: RPCParkourMatchSuccReq.bule:type_name -> DBRaceMember
38, // 0: ParkourInfoResp.info:type_name -> DBParkour
38, // 1: ParkourInfoResp.recommend:type_name -> DBParkour
38, // 2: ParkourInfoChangePush.info:type_name -> DBParkour
38, // 3: ParkourInviteResp.team:type_name -> DBParkour
38, // 4: ParkourInviteNoticePush.team:type_name -> DBParkour
38, // 5: ParkourTeamChanagePush.team:type_name -> DBParkour
39, // 6: ParkourTeamJoinNoticePush.member:type_name -> DBRaceMember
39, // 7: ParkourTeamQuitNoticePush.member:type_name -> DBRaceMember
40, // 8: ParkourRaceMatchSuccPush.race:type_name -> DBRace
39, // 9: RPCParkourJoinMatchReq.member:type_name -> DBRaceMember
39, // 10: RPCParkourMatchSuccReq.red:type_name -> DBRaceMember
39, // 11: RPCParkourMatchSuccReq.bule:type_name -> DBRaceMember
12, // [12:12] is the sub-list for method output_type
12, // [12:12] is the sub-list for method input_type
12, // [12:12] is the sub-list for extension type_name
@ -2223,7 +2419,7 @@ func file_parkour_parkour_msg_proto_init() {
}
}
file_parkour_parkour_msg_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPCParkourMatchSuccReq); i {
switch v := v.(*RPCParkourCancelMatchReq); i {
case 0:
return &v.state
case 1:
@ -2235,6 +2431,30 @@ func file_parkour_parkour_msg_proto_init() {
}
}
file_parkour_parkour_msg_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPCParkourCancelMatchResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_parkour_parkour_msg_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPCParkourMatchSuccReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_parkour_parkour_msg_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPCParkourMatchSuccResp); i {
case 0:
return &v.state
@ -2246,6 +2466,30 @@ func file_parkour_parkour_msg_proto_init() {
return nil
}
}
file_parkour_parkour_msg_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPC_ParkourTrusteeshipReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_parkour_parkour_msg_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPC_ParkourTrusteeshipResp); 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{
@ -2253,7 +2497,7 @@ func file_parkour_parkour_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_parkour_parkour_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 34,
NumMessages: 38,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -993,6 +993,99 @@ func (x *PvpFinishPush) GetBattleid() string {
return ""
}
type RPC_PVPTrusteeshipReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Battleid []string `protobuf:"bytes,1,rep,name=battleid,proto3" json:"battleid"`
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
}
func (x *RPC_PVPTrusteeshipReq) Reset() {
*x = RPC_PVPTrusteeshipReq{}
if protoimpl.UnsafeEnabled {
mi := &file_pvp_pvp_msg_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RPC_PVPTrusteeshipReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RPC_PVPTrusteeshipReq) ProtoMessage() {}
func (x *RPC_PVPTrusteeshipReq) ProtoReflect() protoreflect.Message {
mi := &file_pvp_pvp_msg_proto_msgTypes[18]
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_PVPTrusteeshipReq.ProtoReflect.Descriptor instead.
func (*RPC_PVPTrusteeshipReq) Descriptor() ([]byte, []int) {
return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{18}
}
func (x *RPC_PVPTrusteeshipReq) GetBattleid() []string {
if x != nil {
return x.Battleid
}
return nil
}
func (x *RPC_PVPTrusteeshipReq) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
type RPC_PVPTrusteeshipResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *RPC_PVPTrusteeshipResp) Reset() {
*x = RPC_PVPTrusteeshipResp{}
if protoimpl.UnsafeEnabled {
mi := &file_pvp_pvp_msg_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RPC_PVPTrusteeshipResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RPC_PVPTrusteeshipResp) ProtoMessage() {}
func (x *RPC_PVPTrusteeshipResp) ProtoReflect() protoreflect.Message {
mi := &file_pvp_pvp_msg_proto_msgTypes[19]
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_PVPTrusteeshipResp.ProtoReflect.Descriptor instead.
func (*RPC_PVPTrusteeshipResp) Descriptor() ([]byte, []int) {
return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{19}
}
var File_pvp_pvp_msg_proto protoreflect.FileDescriptor
var file_pvp_pvp_msg_proto_rawDesc = []byte{
@ -1081,8 +1174,14 @@ var file_pvp_pvp_msg_proto_rawDesc = []byte{
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, 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, 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 (
@ -1097,7 +1196,7 @@ func file_pvp_pvp_msg_proto_rawDescGZIP() []byte {
return file_pvp_pvp_msg_proto_rawDescData
}
var file_pvp_pvp_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
var file_pvp_pvp_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_pvp_pvp_msg_proto_goTypes = []interface{}{
(*PvpListReq)(nil), // 0: PvpListReq
(*PvpListResp)(nil), // 1: PvpListResp
@ -1117,27 +1216,29 @@ var file_pvp_pvp_msg_proto_goTypes = []interface{}{
(*PvpInCmdReq)(nil), // 15: PvpInCmdReq
(*PvpInCmdResp)(nil), // 16: PvpInCmdResp
(*PvpFinishPush)(nil), // 17: PvpFinishPush
(*DBPvpBattle)(nil), // 18: DBPvpBattle
(ErrorCode)(0), // 19: ErrorCode
(*BattleStateInfo)(nil), // 20: BattleStateInfo
(*PvpUserInfo)(nil), // 21: PvpUserInfo
(*BattleFormation)(nil), // 22: BattleFormation
(*BattleInfo)(nil), // 23: BattleInfo
(*BattleCmd)(nil), // 24: BattleCmd
(*RPC_PVPTrusteeshipReq)(nil), // 18: RPC_PVPTrusteeshipReq
(*RPC_PVPTrusteeshipResp)(nil), // 19: RPC_PVPTrusteeshipResp
(*DBPvpBattle)(nil), // 20: DBPvpBattle
(ErrorCode)(0), // 21: ErrorCode
(*BattleStateInfo)(nil), // 22: BattleStateInfo
(*PvpUserInfo)(nil), // 23: PvpUserInfo
(*BattleFormation)(nil), // 24: BattleFormation
(*BattleInfo)(nil), // 25: BattleInfo
(*BattleCmd)(nil), // 26: BattleCmd
}
var file_pvp_pvp_msg_proto_depIdxs = []int32{
18, // 0: PvpListResp.list:type_name -> DBPvpBattle
19, // 1: PvpIntoResp.code:type_name -> ErrorCode
20, // 2: PvpIntoResp.info:type_name -> BattleStateInfo
21, // 3: PvpReadyPush.red:type_name -> PvpUserInfo
21, // 4: PvpReadyPush.blue:type_name -> PvpUserInfo
22, // 5: PvpFormationReq.formation:type_name -> BattleFormation
19, // 6: PvpStartPush.code:type_name -> ErrorCode
23, // 7: PvpStartPush.info:type_name -> BattleInfo
24, // 8: PvpOutCmdPush.cmd:type_name -> BattleCmd
24, // 9: PvpInCmdReq.cmd:type_name -> BattleCmd
19, // 10: PvpInCmdResp.code:type_name -> ErrorCode
24, // 11: PvpInCmdResp.cmd:type_name -> BattleCmd
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
24, // 5: PvpFormationReq.formation:type_name -> BattleFormation
21, // 6: PvpStartPush.code:type_name -> ErrorCode
25, // 7: PvpStartPush.info:type_name -> BattleInfo
26, // 8: PvpOutCmdPush.cmd:type_name -> BattleCmd
26, // 9: PvpInCmdReq.cmd:type_name -> BattleCmd
21, // 10: PvpInCmdResp.code:type_name -> ErrorCode
26, // 11: PvpInCmdResp.cmd:type_name -> BattleCmd
12, // [12:12] is the sub-list for method output_type
12, // [12:12] is the sub-list for method input_type
12, // [12:12] is the sub-list for extension type_name
@ -1370,6 +1471,30 @@ func file_pvp_pvp_msg_proto_init() {
return nil
}
}
file_pvp_pvp_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPC_PVPTrusteeshipReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pvp_pvp_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPC_PVPTrusteeshipResp); 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{
@ -1377,7 +1502,7 @@ func file_pvp_pvp_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pvp_pvp_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 18,
NumMessages: 20,
NumExtensions: 0,
NumServices: 0,
},