From 5efc94222d0c195f11a25c69d617c23b825bf5b6 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 19 Oct 2023 15:02:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=8C=9C=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 11 +- modules/dcolor/api.go | 17 + modules/dcolor/api_accept.go | 138 +++++ modules/dcolor/api_loadcomplete.go | 51 ++ modules/dcolor/api_qiecuo.go | 146 +++++ modules/dcolor/configure.go | 27 + modules/dcolor/model.go | 24 + modules/dcolor/modelqiecuo.go | 73 +++ modules/dcolor/module.go | 32 ++ modules/dcolor/room.go | 50 ++ modules/dcolor/rooms.go | 41 ++ modules/practice/api_accept.go | 4 +- modules/reddot/api_get.go | 2 +- pb/dcolor_db.pb.go | 609 ++++++++++++++++++++ pb/dcolor_msg.pb.go | 889 +++++++++++++++++++++++++++++ 15 files changed, 2107 insertions(+), 7 deletions(-) create mode 100644 modules/dcolor/api.go create mode 100644 modules/dcolor/api_accept.go create mode 100644 modules/dcolor/api_loadcomplete.go create mode 100644 modules/dcolor/api_qiecuo.go create mode 100644 modules/dcolor/configure.go create mode 100644 modules/dcolor/model.go create mode 100644 modules/dcolor/modelqiecuo.go create mode 100644 modules/dcolor/module.go create mode 100644 modules/dcolor/room.go create mode 100644 modules/dcolor/rooms.go create mode 100644 pb/dcolor_db.pb.go create mode 100644 pb/dcolor_msg.pb.go diff --git a/comm/const.go b/comm/const.go index 7d3c7a80f..e6b6f8ed0 100644 --- a/comm/const.go +++ b/comm/const.go @@ -108,11 +108,12 @@ const ( ModuleBattleRecord core.M_Modules = "battlerecord" //战斗记录 ModuleDragon core.M_Modules = "dragon" //坐骑 ModuleCaptureSheep core.M_Modules = "capturesheep" //捕羊大赛 - ModuleTurntable core.M_Modules = "turntable" // - ModuleVenture core.M_Modules = "venture" // + ModuleTurntable core.M_Modules = "turntable" //转盘 + ModuleVenture core.M_Modules = "venture" //7日签到 ModuleAchieve core.M_Modules = "achieve" //全局成就 - ModuleJielong core.M_Modules = "jielong" // - ModuleEntertainment core.M_Modules = "entertainment" // + ModuleJielong core.M_Modules = "jielong" //接龙 + ModuleEntertainment core.M_Modules = "entertainment" //消消乐 + ModuleDcolor core.M_Modules = "dcolor" //猜颜色 ) // 数据表名定义处 @@ -388,6 +389,8 @@ const ( //日常任务 TableAchieve = "achieve" + //猜颜色 + TableDcolorQieChuo = "dcolorqiecuo" ) // RPC服务接口定义处 diff --git a/modules/dcolor/api.go b/modules/dcolor/api.go new file mode 100644 index 000000000..197598db7 --- /dev/null +++ b/modules/dcolor/api.go @@ -0,0 +1,17 @@ +package dcolor + +import ( + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" +) + +type apiComp struct { + modules.MCompGate + module *DColor +} + +func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + _ = this.MCompGate.Init(service, module, comp, options) + this.module = module.(*DColor) + return +} diff --git a/modules/dcolor/api_accept.go b/modules/dcolor/api_accept.go new file mode 100644 index 000000000..d74e78df9 --- /dev/null +++ b/modules/dcolor/api_accept.go @@ -0,0 +1,138 @@ +package dcolor + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/log" + "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" + "time" + + "go.mongodb.org/mongo-driver/bson/primitive" +) + +//接受切磋 + +func (this *apiComp) AcceptCheck(session comm.IUserSession, req *pb.DColorAcceptReq) (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.DColorAcceptReq) (errdata *pb.ErrorData) { + var ( + err error + redRecord *pb.DBDColorQiecuoRecord + blueRecord *pb.DBDColorQiecuoRecord + room *Room + keep bool + ) + + if errdata = this.AcceptCheck(session, req); errdata != nil { + return + } + + //校验切磋请求是否超时 + 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 + } + + 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 room, err = this.module.rooms.newRoom(&pb.DBDColorRoom{ + Rid: primitive.NewObjectID().Hex(), + Red: &pb.DBDColorRoomPlayer{ + Info: comm.GetUserBaseInfo(red), + }, + Blue: &pb.DBDColorRoomPlayer{ + Info: comm.GetUserBaseInfo(blue), + }, + }); err != nil { + return + } + + session.SendMsg(string(this.module.GetType()), "accept", &pb.PracticeAcceptResp{ + IsSucc: true, + }) + go func() { + room.GameStart() + }() + + return +} diff --git a/modules/dcolor/api_loadcomplete.go b/modules/dcolor/api_loadcomplete.go new file mode 100644 index 000000000..07157e20a --- /dev/null +++ b/modules/dcolor/api_loadcomplete.go @@ -0,0 +1,51 @@ +package dcolor + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +//接受切磋 +func (this *apiComp) LoadCompleteCheck(session comm.IUserSession, req *pb.DColorLoadCompleteReq) (errdata *pb.ErrorData) { + if req.Roomid == "" { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + } + } + return +} + +func (this *apiComp) LoadComplete(session comm.IUserSession, req *pb.DColorLoadCompleteReq) (errdata *pb.ErrorData) { + var ( + room *Room + err error + ) + + if errdata = this.LoadCompleteCheck(session, req); errdata != nil { + return + } + + if room, err = this.module.rooms.queryRoom(req.Roomid); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.String(), + Message: err.Error(), + } + return + } + + if err = room.PlayerLoadEnd(session.GetUserId()); errdata != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.String(), + Message: err.Error(), + } + return + } + session.SendMsg(string(this.module.GetType()), "loadcomplete", &pb.DColorLoadCompleteResp{ + Roomid: req.Roomid, + Issucc: true, + }) + return +} diff --git a/modules/dcolor/api_qiecuo.go b/modules/dcolor/api_qiecuo.go new file mode 100644 index 000000000..dd434a4fc --- /dev/null +++ b/modules/dcolor/api_qiecuo.go @@ -0,0 +1,146 @@ +package dcolor + +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.DColorQiecuoReq) (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.DColorQiecuoReq) (errdata *pb.ErrorData) { + if errdata = this.QiecuoCheck(session, req); errdata != nil { + return + } + var ( + err error + result *pb.DBDColorQiecuoRecord + fresult *pb.DBDColorQiecuoRecord + user *pb.DBUser + 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 _, err = this.module.rooms.queryRoom(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.DColorQiecuoResp{Fid: req.Fid, Isbattle: true}); 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.DBDColorQiecuoInvite{ + Uid: req.Fid, + Timestamp: configure.Now().Unix(), + }) + } + result.Difficulty = req.Difficulty + result.Repeat = req.Repeat + this.module.modelQiecuo.Change(session.GetUserId(), map[string]interface{}{ + "difficulty": result.Difficulty, + "repeat": result.Repeat, + "targets": result.Targets, + }) + + if err = session.SendMsg(string(this.module.GetType()), "qiecuo", &pb.DColorQiecuoResp{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/dcolor/configure.go b/modules/dcolor/configure.go new file mode 100644 index 000000000..510e86e51 --- /dev/null +++ b/modules/dcolor/configure.go @@ -0,0 +1,27 @@ +package dcolor + +import ( + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" + cfg "go_dreamfactory/sys/configure/structs" +) + +const ( + gameDispatchLv = "game_dispatch_lv.json" + gameDispatchTask = "game_dispatch_task.json" + new_hero = "game_hero.json" +) + +type configureComp struct { + modules.MCompConfigure +} + +func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompConfigure.Init(service, module, comp, options) + err = this.LoadMultiConfigure(map[string]interface{}{ + gameDispatchLv: cfg.NewGameDispatch_Lv, + gameDispatchTask: cfg.NewGameDispatch_Task, + new_hero: cfg.NewGameHero, + }) + return +} diff --git a/modules/dcolor/model.go b/modules/dcolor/model.go new file mode 100644 index 000000000..1d40dc000 --- /dev/null +++ b/modules/dcolor/model.go @@ -0,0 +1,24 @@ +package dcolor + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" + + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/bsonx" +) + +type modelComp struct { + modules.MCompModel + module *DColor +} + +func (this *modelComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompModel.Init(service, module, comp, options) + this.TableName = comm.TablekfPushGiftbag + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} diff --git a/modules/dcolor/modelqiecuo.go b/modules/dcolor/modelqiecuo.go new file mode 100644 index 000000000..0d61704a6 --- /dev/null +++ b/modules/dcolor/modelqiecuo.go @@ -0,0 +1,73 @@ +package dcolor + +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 modelQiecuoComp struct { + modules.MCompModel + module *DColor +} + +func (this *modelQiecuoComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompModel.Init(service, module, comp, options) + this.TableName = comm.TableDcolorQieChuo + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} + +// 切磋请求处理 +func (this *modelQiecuoComp) queryQiecuo(uid string) (result *pb.DBDColorQiecuoRecord, err error) { + result = &pb.DBDColorQiecuoRecord{} + if err = this.Get(uid, result); err != nil && err != mgo.MongodbNil { + this.module.Errorln(err) + } + if err == mgo.MongodbNil { + result = &pb.DBDColorQiecuoRecord{ + Id: primitive.NewObjectID().Hex(), + Uid: uid, + Targets: make([]*pb.DBDColorQiecuoInvite, 0), + } + if err = this.Add(uid, result); err != nil { + this.module.Errorln(err) + return + } + } + err = nil + return +} + +func (this *modelQiecuoComp) endQiecuo(uid string) (result *pb.DBDColorQiecuoRecord, err error) { + result = &pb.DBDColorQiecuoRecord{} + 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/dcolor/module.go b/modules/dcolor/module.go new file mode 100644 index 000000000..f74ab2ba3 --- /dev/null +++ b/modules/dcolor/module.go @@ -0,0 +1,32 @@ +package dcolor + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" +) + +/* +模块名称:猜颜色 +*/ +type DColor struct { + modules.ModuleBase + service comm.IService + api *apiComp + configure *configureComp + model *modelComp + modelQiecuo *modelQiecuoComp + rooms *roomsComp +} + +// 模块名 +func (this *DColor) GetType() core.M_Modules { + return comm.ModuleDcolor +} + +// 模块初始化接口 注册用户创建角色事件 +func (this *DColor) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { + err = this.ModuleBase.Init(service, module, options) + service = this.service.(comm.IService) + return +} diff --git a/modules/dcolor/room.go b/modules/dcolor/room.go new file mode 100644 index 000000000..a463b4216 --- /dev/null +++ b/modules/dcolor/room.go @@ -0,0 +1,50 @@ +package dcolor + +import ( + "fmt" + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +type Room struct { + module *DColor + data *pb.DBDColorRoom + sessions []comm.IUserSession +} + +func (this *Room) GameStart() (err error) { + if err = this.Broadcast("gameready", &pb.DColorGameReadyPush{ + ServicePath: fmt.Sprintf("%s/%s", this.module.service.GetType(), this.module.service.GetId()), + Room: this.data, + Countdown: 60, + }); err != nil { + this.module.Errorln(err) + } + return +} + +func (this *Room) PlayerLoadEnd(uid string) (err error) { + if uid == this.data.Red.Info.Uid { + this.data.Red.Ready = true + } else { + this.data.Blue.Ready = true + } + + if this.data.Red.Ready && this.data.Blue.Ready { //两个人都准备了 + if err = this.Broadcast("loadcompletenotice", &pb.DColorGameStartPush{ + Side: 1, + }); err != nil { + this.module.Errorln(err) + } + } + 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) + } + return +} diff --git a/modules/dcolor/rooms.go b/modules/dcolor/rooms.go new file mode 100644 index 000000000..87fdb198b --- /dev/null +++ b/modules/dcolor/rooms.go @@ -0,0 +1,41 @@ +package dcolor + +import ( + "fmt" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/core/cbase" + "go_dreamfactory/pb" + "sync" +) + +type roomsComp struct { + cbase.ModuleCompBase + module *DColor + lock sync.RWMutex + rooms map[string]*Room +} + +func (this *roomsComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.ModuleCompBase.Init(service, module, comp, options) + + return +} + +func (this *roomsComp) queryRoom(rid string) (room *Room, err error) { + var ( + ok bool + ) + this.lock.Lock() + room, ok = this.rooms[rid] + this.lock.Unlock() + if !ok { + err = fmt.Errorf("no found room:%s", rid) + return + } + return +} + +func (this *roomsComp) newRoom(data *pb.DBDColorRoom) (room *Room, err error) { + + return +} diff --git a/modules/practice/api_accept.go b/modules/practice/api_accept.go index af82e10c9..271100c78 100644 --- a/modules/practice/api_accept.go +++ b/modules/practice/api_accept.go @@ -133,8 +133,8 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.PracticeAcceptReq &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.Clone(), comm.GetBuriedParam(comm.Rtype183, 1)) + 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/reddot/api_get.go b/modules/reddot/api_get.go index 37c3a5bbc..05254179c 100644 --- a/modules/reddot/api_get.go +++ b/modules/reddot/api_get.go @@ -92,7 +92,7 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda for k, v := range this.module.gourmet.Reddot(session, _rid) { reddot[int32(k)] = v } - case comm.Reddot30100: + case comm.Reddot27101, comm.Reddot30100: for k, v := range this.module.ModuleUser.Reddot(session, _rid) { reddot[int32(k)] = v } diff --git a/pb/dcolor_db.pb.go b/pb/dcolor_db.pb.go new file mode 100644 index 000000000..3bef73728 --- /dev/null +++ b/pb/dcolor_db.pb.go @@ -0,0 +1,609 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: dcolor/dcolor_db.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +//游戏难度 +type DBDColorDifficulty int32 + +const ( + DBDColorDifficulty_Simple DBDColorDifficulty = 0 + DBDColorDifficulty_Difficulty DBDColorDifficulty = 1 + DBDColorDifficulty_Hell DBDColorDifficulty = 2 +) + +// Enum value maps for DBDColorDifficulty. +var ( + DBDColorDifficulty_name = map[int32]string{ + 0: "Simple", + 1: "Difficulty", + 2: "Hell", + } + DBDColorDifficulty_value = map[string]int32{ + "Simple": 0, + "Difficulty": 1, + "Hell": 2, + } +) + +func (x DBDColorDifficulty) Enum() *DBDColorDifficulty { + p := new(DBDColorDifficulty) + *p = x + return p +} + +func (x DBDColorDifficulty) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DBDColorDifficulty) Descriptor() protoreflect.EnumDescriptor { + return file_dcolor_dcolor_db_proto_enumTypes[0].Descriptor() +} + +func (DBDColorDifficulty) Type() protoreflect.EnumType { + return &file_dcolor_dcolor_db_proto_enumTypes[0] +} + +func (x DBDColorDifficulty) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DBDColorDifficulty.Descriptor instead. +func (DBDColorDifficulty) EnumDescriptor() ([]byte, []int) { + return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{0} +} + +type DBDColorColor int32 + +const ( + DBDColorColor_Color_0 DBDColorColor = 0 + DBDColorColor_Color_1 DBDColorColor = 1 + DBDColorColor_Color_2 DBDColorColor = 2 + DBDColorColor_Color_3 DBDColorColor = 3 + DBDColorColor_Color_4 DBDColorColor = 4 + DBDColorColor_Color_5 DBDColorColor = 5 + DBDColorColor_Color_6 DBDColorColor = 6 + DBDColorColor_Color_7 DBDColorColor = 7 +) + +// Enum value maps for DBDColorColor. +var ( + DBDColorColor_name = map[int32]string{ + 0: "Color_0", + 1: "Color_1", + 2: "Color_2", + 3: "Color_3", + 4: "Color_4", + 5: "Color_5", + 6: "Color_6", + 7: "Color_7", + } + DBDColorColor_value = map[string]int32{ + "Color_0": 0, + "Color_1": 1, + "Color_2": 2, + "Color_3": 3, + "Color_4": 4, + "Color_5": 5, + "Color_6": 6, + "Color_7": 7, + } +) + +func (x DBDColorColor) Enum() *DBDColorColor { + p := new(DBDColorColor) + *p = x + return p +} + +func (x DBDColorColor) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DBDColorColor) Descriptor() protoreflect.EnumDescriptor { + return file_dcolor_dcolor_db_proto_enumTypes[1].Descriptor() +} + +func (DBDColorColor) Type() protoreflect.EnumType { + return &file_dcolor_dcolor_db_proto_enumTypes[1] +} + +func (x DBDColorColor) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DBDColorColor.Descriptor instead. +func (DBDColorColor) EnumDescriptor() ([]byte, []int) { + return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{1} +} + +type DBDColorQiecuoInvite struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` + Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp"` +} + +func (x *DBDColorQiecuoInvite) Reset() { + *x = DBDColorQiecuoInvite{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBDColorQiecuoInvite) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBDColorQiecuoInvite) ProtoMessage() {} + +func (x *DBDColorQiecuoInvite) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_db_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBDColorQiecuoInvite.ProtoReflect.Descriptor instead. +func (*DBDColorQiecuoInvite) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{0} +} + +func (x *DBDColorQiecuoInvite) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBDColorQiecuoInvite) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +//切磋请求记录 +type DBDColorQiecuoRecord struct { + state protoimpl.MessageState + 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 + Targets []*DBDColorQiecuoInvite `protobuf:"bytes,3,rep,name=targets,proto3" json:"targets"` + Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status"` //0邀请中 1战斗中 + Battid string `protobuf:"bytes,5,opt,name=battid,proto3" json:"battid"` + Difficulty DBDColorDifficulty `protobuf:"varint,6,opt,name=difficulty,proto3,enum=DBDColorDifficulty" json:"difficulty"` + Repeat bool `protobuf:"varint,7,opt,name=Repeat,proto3" json:"Repeat"` + Member []string `protobuf:"bytes,8,rep,name=member,proto3" json:"member"` //接受方id +} + +func (x *DBDColorQiecuoRecord) Reset() { + *x = DBDColorQiecuoRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBDColorQiecuoRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBDColorQiecuoRecord) ProtoMessage() {} + +func (x *DBDColorQiecuoRecord) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_db_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBDColorQiecuoRecord.ProtoReflect.Descriptor instead. +func (*DBDColorQiecuoRecord) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{1} +} + +func (x *DBDColorQiecuoRecord) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBDColorQiecuoRecord) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBDColorQiecuoRecord) GetTargets() []*DBDColorQiecuoInvite { + if x != nil { + return x.Targets + } + return nil +} + +func (x *DBDColorQiecuoRecord) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *DBDColorQiecuoRecord) GetBattid() string { + if x != nil { + return x.Battid + } + return "" +} + +func (x *DBDColorQiecuoRecord) GetDifficulty() DBDColorDifficulty { + if x != nil { + return x.Difficulty + } + return DBDColorDifficulty_Simple +} + +func (x *DBDColorQiecuoRecord) GetRepeat() bool { + if x != nil { + return x.Repeat + } + return false +} + +func (x *DBDColorQiecuoRecord) GetMember() []string { + if x != nil { + return x.Member + } + return nil +} + +type DBDColorRoomPlayer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *BaseUserInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` //发起者信息 + Isai bool `protobuf:"varint,2,opt,name=isai,proto3" json:"isai"` + Ready bool `protobuf:"varint,3,opt,name=ready,proto3" json:"ready"` + Score int32 `protobuf:"varint,4,opt,name=score,proto3" json:"score"` +} + +func (x *DBDColorRoomPlayer) Reset() { + *x = DBDColorRoomPlayer{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_db_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBDColorRoomPlayer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBDColorRoomPlayer) ProtoMessage() {} + +func (x *DBDColorRoomPlayer) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_db_proto_msgTypes[2] + 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 DBDColorRoomPlayer.ProtoReflect.Descriptor instead. +func (*DBDColorRoomPlayer) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{2} +} + +func (x *DBDColorRoomPlayer) GetInfo() *BaseUserInfo { + if x != nil { + return x.Info + } + return nil +} + +func (x *DBDColorRoomPlayer) GetIsai() bool { + if x != nil { + return x.Isai + } + return false +} + +func (x *DBDColorRoomPlayer) GetReady() bool { + if x != nil { + return x.Ready + } + return false +} + +func (x *DBDColorRoomPlayer) GetScore() int32 { + if x != nil { + return x.Score + } + return 0 +} + +//猜颜色 房间 +type DBDColorRoom struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rid string `protobuf:"bytes,1,opt,name=rid,proto3" json:"rid"` + Results []DBDColorColor `protobuf:"varint,2,rep,packed,name=results,proto3,enum=DBDColorColor" json:"results"` + Red *DBDColorRoomPlayer `protobuf:"bytes,3,opt,name=red,proto3" json:"red"` + Blue *DBDColorRoomPlayer `protobuf:"bytes,4,opt,name=blue,proto3" json:"blue"` +} + +func (x *DBDColorRoom) Reset() { + *x = DBDColorRoom{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_db_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBDColorRoom) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBDColorRoom) ProtoMessage() {} + +func (x *DBDColorRoom) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_db_proto_msgTypes[3] + 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 DBDColorRoom.ProtoReflect.Descriptor instead. +func (*DBDColorRoom) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{3} +} + +func (x *DBDColorRoom) GetRid() string { + if x != nil { + return x.Rid + } + return "" +} + +func (x *DBDColorRoom) GetResults() []DBDColorColor { + if x != nil { + return x.Results + } + return nil +} + +func (x *DBDColorRoom) GetRed() *DBDColorRoomPlayer { + if x != nil { + return x.Red + } + return nil +} + +func (x *DBDColorRoom) GetBlue() *DBDColorRoomPlayer { + if x != nil { + return x.Blue + } + return nil +} + +var File_dcolor_dcolor_db_proto protoreflect.FileDescriptor + +var file_dcolor_dcolor_db_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x64, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x2f, 0x64, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, + 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x14, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xfe, 0x01, 0x0a, + 0x14, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 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, 0x2f, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, + 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 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, 0x33, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, + 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x44, + 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, + 0x79, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x16, 0x0a, + 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x52, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x77, 0x0a, + 0x12, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x61, 0x69, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x61, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, + 0x61, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x44, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x44, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x04, 0x62, 0x6c, + 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x04, 0x62, + 0x6c, 0x75, 0x65, 0x2a, 0x3a, 0x0a, 0x12, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x44, + 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x69, 0x6d, + 0x70, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, + 0x6c, 0x74, 0x79, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x65, 0x6c, 0x6c, 0x10, 0x02, 0x2a, + 0x77, 0x0a, 0x0d, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x30, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x5f, 0x33, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x34, 0x10, + 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x35, 0x10, 0x05, 0x12, 0x0b, + 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x36, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x37, 0x10, 0x07, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_dcolor_dcolor_db_proto_rawDescOnce sync.Once + file_dcolor_dcolor_db_proto_rawDescData = file_dcolor_dcolor_db_proto_rawDesc +) + +func file_dcolor_dcolor_db_proto_rawDescGZIP() []byte { + file_dcolor_dcolor_db_proto_rawDescOnce.Do(func() { + file_dcolor_dcolor_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_dcolor_dcolor_db_proto_rawDescData) + }) + return file_dcolor_dcolor_db_proto_rawDescData +} + +var file_dcolor_dcolor_db_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_dcolor_dcolor_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_dcolor_dcolor_db_proto_goTypes = []interface{}{ + (DBDColorDifficulty)(0), // 0: DBDColorDifficulty + (DBDColorColor)(0), // 1: DBDColorColor + (*DBDColorQiecuoInvite)(nil), // 2: DBDColorQiecuoInvite + (*DBDColorQiecuoRecord)(nil), // 3: DBDColorQiecuoRecord + (*DBDColorRoomPlayer)(nil), // 4: DBDColorRoomPlayer + (*DBDColorRoom)(nil), // 5: DBDColorRoom + (*BaseUserInfo)(nil), // 6: BaseUserInfo +} +var file_dcolor_dcolor_db_proto_depIdxs = []int32{ + 2, // 0: DBDColorQiecuoRecord.targets:type_name -> DBDColorQiecuoInvite + 0, // 1: DBDColorQiecuoRecord.difficulty:type_name -> DBDColorDifficulty + 6, // 2: DBDColorRoomPlayer.info:type_name -> BaseUserInfo + 1, // 3: DBDColorRoom.results:type_name -> DBDColorColor + 4, // 4: DBDColorRoom.red:type_name -> DBDColorRoomPlayer + 4, // 5: DBDColorRoom.blue:type_name -> DBDColorRoomPlayer + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_dcolor_dcolor_db_proto_init() } +func file_dcolor_dcolor_db_proto_init() { + if File_dcolor_dcolor_db_proto != nil { + return + } + file_comm_proto_init() + if !protoimpl.UnsafeEnabled { + file_dcolor_dcolor_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBDColorQiecuoInvite); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBDColorQiecuoRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBDColorRoomPlayer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBDColorRoom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_dcolor_dcolor_db_proto_rawDesc, + NumEnums: 2, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_dcolor_dcolor_db_proto_goTypes, + DependencyIndexes: file_dcolor_dcolor_db_proto_depIdxs, + EnumInfos: file_dcolor_dcolor_db_proto_enumTypes, + MessageInfos: file_dcolor_dcolor_db_proto_msgTypes, + }.Build() + File_dcolor_dcolor_db_proto = out.File + file_dcolor_dcolor_db_proto_rawDesc = nil + file_dcolor_dcolor_db_proto_goTypes = nil + file_dcolor_dcolor_db_proto_depIdxs = nil +} diff --git a/pb/dcolor_msg.pb.go b/pb/dcolor_msg.pb.go new file mode 100644 index 000000000..1db2c371f --- /dev/null +++ b/pb/dcolor_msg.pb.go @@ -0,0 +1,889 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: dcolor/dcolor_msg.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +///游戏切磋请求 +type DColorQiecuoReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Difficulty DBDColorDifficulty `protobuf:"varint,1,opt,name=difficulty,proto3,enum=DBDColorDifficulty" json:"difficulty"` + Repeat bool `protobuf:"varint,2,opt,name=Repeat,proto3" json:"Repeat"` + Fid string `protobuf:"bytes,3,opt,name=fid,proto3" json:"fid"` +} + +func (x *DColorQiecuoReq) Reset() { + *x = DColorQiecuoReq{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DColorQiecuoReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DColorQiecuoReq) ProtoMessage() {} + +func (x *DColorQiecuoReq) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DColorQiecuoReq.ProtoReflect.Descriptor instead. +func (*DColorQiecuoReq) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{0} +} + +func (x *DColorQiecuoReq) GetDifficulty() DBDColorDifficulty { + if x != nil { + return x.Difficulty + } + return DBDColorDifficulty_Simple +} + +func (x *DColorQiecuoReq) GetRepeat() bool { + if x != nil { + return x.Repeat + } + return false +} + +func (x *DColorQiecuoReq) GetFid() string { + if x != nil { + return x.Fid + } + return "" +} + +type DColorQiecuoResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Fid string `protobuf:"bytes,1,opt,name=fid,proto3" json:"fid"` + Isbattle bool `protobuf:"varint,2,opt,name=isbattle,proto3" json:"isbattle"` +} + +func (x *DColorQiecuoResp) Reset() { + *x = DColorQiecuoResp{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DColorQiecuoResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DColorQiecuoResp) ProtoMessage() {} + +func (x *DColorQiecuoResp) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DColorQiecuoResp.ProtoReflect.Descriptor instead. +func (*DColorQiecuoResp) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{1} +} + +func (x *DColorQiecuoResp) GetFid() string { + if x != nil { + return x.Fid + } + return "" +} + +func (x *DColorQiecuoResp) GetIsbattle() bool { + if x != nil { + return x.Isbattle + } + return false +} + +//接受切磋 +type DColorAcceptReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //切磋发起者 +} + +func (x *DColorAcceptReq) Reset() { + *x = DColorAcceptReq{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DColorAcceptReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DColorAcceptReq) ProtoMessage() {} + +func (x *DColorAcceptReq) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[2] + 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 DColorAcceptReq.ProtoReflect.Descriptor instead. +func (*DColorAcceptReq) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{2} +} + +func (x *DColorAcceptReq) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type DColorAcceptResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsSucc bool `protobuf:"varint,1,opt,name=isSucc,proto3" json:"isSucc"` +} + +func (x *DColorAcceptResp) Reset() { + *x = DColorAcceptResp{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DColorAcceptResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DColorAcceptResp) ProtoMessage() {} + +func (x *DColorAcceptResp) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[3] + 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 DColorAcceptResp.ProtoReflect.Descriptor instead. +func (*DColorAcceptResp) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{3} +} + +func (x *DColorAcceptResp) GetIsSucc() bool { + if x != nil { + return x.IsSucc + } + return false +} + +//拒绝切磋 +type DColorRefuseReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //切磋发起者 +} + +func (x *DColorRefuseReq) Reset() { + *x = DColorRefuseReq{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DColorRefuseReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DColorRefuseReq) ProtoMessage() {} + +func (x *DColorRefuseReq) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[4] + 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 DColorRefuseReq.ProtoReflect.Descriptor instead. +func (*DColorRefuseReq) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{4} +} + +func (x *DColorRefuseReq) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type DColorRefuseResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsSucc bool `protobuf:"varint,1,opt,name=isSucc,proto3" json:"isSucc"` +} + +func (x *DColorRefuseResp) Reset() { + *x = DColorRefuseResp{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DColorRefuseResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DColorRefuseResp) ProtoMessage() {} + +func (x *DColorRefuseResp) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[5] + 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 DColorRefuseResp.ProtoReflect.Descriptor instead. +func (*DColorRefuseResp) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{5} +} + +func (x *DColorRefuseResp) GetIsSucc() bool { + if x != nil { + return x.IsSucc + } + return false +} + +//切磋通知 +type DColorQiecuonotifyPush struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *BaseUserInfo `protobuf:"bytes,1,opt,name=user,proto3" json:"user"` //发起者信息 + Difficulty DBDColorDifficulty `protobuf:"varint,2,opt,name=difficulty,proto3,enum=DBDColorDifficulty" json:"difficulty"` + Repeat bool `protobuf:"varint,3,opt,name=Repeat,proto3" json:"Repeat"` + NotifyType int32 `protobuf:"varint,4,opt,name=notifyType,proto3" json:"notifyType"` //1发起通知 2接受通知 3拒绝通知 +} + +func (x *DColorQiecuonotifyPush) Reset() { + *x = DColorQiecuonotifyPush{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DColorQiecuonotifyPush) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DColorQiecuonotifyPush) ProtoMessage() {} + +func (x *DColorQiecuonotifyPush) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[6] + 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 DColorQiecuonotifyPush.ProtoReflect.Descriptor instead. +func (*DColorQiecuonotifyPush) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{6} +} + +func (x *DColorQiecuonotifyPush) GetUser() *BaseUserInfo { + if x != nil { + return x.User + } + return nil +} + +func (x *DColorQiecuonotifyPush) GetDifficulty() DBDColorDifficulty { + if x != nil { + return x.Difficulty + } + return DBDColorDifficulty_Simple +} + +func (x *DColorQiecuonotifyPush) GetRepeat() bool { + if x != nil { + return x.Repeat + } + return false +} + +func (x *DColorQiecuonotifyPush) GetNotifyType() int32 { + if x != nil { + return x.NotifyType + } + return 0 +} + +type DColorGameReadyPush struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServicePath string `protobuf:"bytes,1,opt,name=servicePath,proto3" json:"servicePath"` //游戏区服地址 + Room *DBDColorRoom `protobuf:"bytes,2,opt,name=room,proto3" json:"room"` //房间 + Countdown int32 `protobuf:"varint,3,opt,name=countdown,proto3" json:"countdown"` //布阵倒计时 +} + +func (x *DColorGameReadyPush) Reset() { + *x = DColorGameReadyPush{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DColorGameReadyPush) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DColorGameReadyPush) ProtoMessage() {} + +func (x *DColorGameReadyPush) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_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 DColorGameReadyPush.ProtoReflect.Descriptor instead. +func (*DColorGameReadyPush) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{7} +} + +func (x *DColorGameReadyPush) GetServicePath() string { + if x != nil { + return x.ServicePath + } + return "" +} + +func (x *DColorGameReadyPush) GetRoom() *DBDColorRoom { + if x != nil { + return x.Room + } + return nil +} + +func (x *DColorGameReadyPush) GetCountdown() int32 { + if x != nil { + return x.Countdown + } + return 0 +} + +//加载完毕请求 +type DColorLoadCompleteReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"` //房间id +} + +func (x *DColorLoadCompleteReq) Reset() { + *x = DColorLoadCompleteReq{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DColorLoadCompleteReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DColorLoadCompleteReq) ProtoMessage() {} + +func (x *DColorLoadCompleteReq) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_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 DColorLoadCompleteReq.ProtoReflect.Descriptor instead. +func (*DColorLoadCompleteReq) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{8} +} + +func (x *DColorLoadCompleteReq) GetRoomid() string { + if x != nil { + return x.Roomid + } + return "" +} + +//加载完毕请求 +type DColorLoadCompleteResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"` //房间id + Issucc bool `protobuf:"varint,2,opt,name=issucc,proto3" json:"issucc"` +} + +func (x *DColorLoadCompleteResp) Reset() { + *x = DColorLoadCompleteResp{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DColorLoadCompleteResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DColorLoadCompleteResp) ProtoMessage() {} + +func (x *DColorLoadCompleteResp) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DColorLoadCompleteResp.ProtoReflect.Descriptor instead. +func (*DColorLoadCompleteResp) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{9} +} + +func (x *DColorLoadCompleteResp) GetRoomid() string { + if x != nil { + return x.Roomid + } + return "" +} + +func (x *DColorLoadCompleteResp) GetIssucc() bool { + if x != nil { + return x.Issucc + } + return false +} + +//加载完毕 通知 +type DColorGameStartPush struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"` //战斗id + Side int32 `protobuf:"varint,2,opt,name=side,proto3" json:"side"` //先手房 0 红方先手 1蓝方先手 +} + +func (x *DColorGameStartPush) Reset() { + *x = DColorGameStartPush{} + if protoimpl.UnsafeEnabled { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DColorGameStartPush) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DColorGameStartPush) ProtoMessage() {} + +func (x *DColorGameStartPush) ProtoReflect() protoreflect.Message { + mi := &file_dcolor_dcolor_msg_proto_msgTypes[10] + 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 DColorGameStartPush.ProtoReflect.Descriptor instead. +func (*DColorGameStartPush) Descriptor() ([]byte, []int) { + return file_dcolor_dcolor_msg_proto_rawDescGZIP(), []int{10} +} + +func (x *DColorGameStartPush) GetRoomid() string { + if x != nil { + return x.Roomid + } + return "" +} + +func (x *DColorGameStartPush) GetSide() int32 { + if x != nil { + return x.Side + } + return 0 +} + +var File_dcolor_dcolor_msg_proto protoreflect.FileDescriptor + +var file_dcolor_dcolor_msg_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x64, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x2f, 0x64, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, + 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x64, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x2f, 0x64, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x70, 0x0a, + 0x0f, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x52, 0x65, 0x71, + 0x12, 0x33, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x44, + 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, + 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x66, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x69, 0x64, 0x22, + 0x40, 0x0a, 0x10, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x66, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x22, 0x23, 0x0a, 0x0f, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x70, + 0x74, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x10, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, + 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x75, + 0x63, 0x63, 0x22, 0x23, 0x0a, 0x0f, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x75, + 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x10, 0x44, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, + 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, + 0x75, 0x63, 0x63, 0x22, 0xa8, 0x01, 0x0a, 0x16, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x51, 0x69, + 0x65, 0x63, 0x75, 0x6f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x21, + 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, + 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x75, 0x73, 0x65, + 0x72, 0x12, 0x33, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, + 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x78, + 0x0a, 0x13, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x47, 0x61, 0x6d, 0x65, 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, 0x21, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x2f, 0x0a, 0x15, 0x44, 0x43, 0x6f, 0x6c, + 0x6f, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x44, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, + 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, + 0x75, 0x63, 0x63, 0x22, 0x41, 0x0a, 0x13, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x47, 0x61, 0x6d, + 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, + 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_dcolor_dcolor_msg_proto_rawDescOnce sync.Once + file_dcolor_dcolor_msg_proto_rawDescData = file_dcolor_dcolor_msg_proto_rawDesc +) + +func file_dcolor_dcolor_msg_proto_rawDescGZIP() []byte { + file_dcolor_dcolor_msg_proto_rawDescOnce.Do(func() { + file_dcolor_dcolor_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_dcolor_dcolor_msg_proto_rawDescData) + }) + return file_dcolor_dcolor_msg_proto_rawDescData +} + +var file_dcolor_dcolor_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_dcolor_dcolor_msg_proto_goTypes = []interface{}{ + (*DColorQiecuoReq)(nil), // 0: DColorQiecuoReq + (*DColorQiecuoResp)(nil), // 1: DColorQiecuoResp + (*DColorAcceptReq)(nil), // 2: DColorAcceptReq + (*DColorAcceptResp)(nil), // 3: DColorAcceptResp + (*DColorRefuseReq)(nil), // 4: DColorRefuseReq + (*DColorRefuseResp)(nil), // 5: DColorRefuseResp + (*DColorQiecuonotifyPush)(nil), // 6: DColorQiecuonotifyPush + (*DColorGameReadyPush)(nil), // 7: DColorGameReadyPush + (*DColorLoadCompleteReq)(nil), // 8: DColorLoadCompleteReq + (*DColorLoadCompleteResp)(nil), // 9: DColorLoadCompleteResp + (*DColorGameStartPush)(nil), // 10: DColorGameStartPush + (DBDColorDifficulty)(0), // 11: DBDColorDifficulty + (*BaseUserInfo)(nil), // 12: BaseUserInfo + (*DBDColorRoom)(nil), // 13: DBDColorRoom +} +var file_dcolor_dcolor_msg_proto_depIdxs = []int32{ + 11, // 0: DColorQiecuoReq.difficulty:type_name -> DBDColorDifficulty + 12, // 1: DColorQiecuonotifyPush.user:type_name -> BaseUserInfo + 11, // 2: DColorQiecuonotifyPush.difficulty:type_name -> DBDColorDifficulty + 13, // 3: DColorGameReadyPush.room:type_name -> DBDColorRoom + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_dcolor_dcolor_msg_proto_init() } +func file_dcolor_dcolor_msg_proto_init() { + if File_dcolor_dcolor_msg_proto != nil { + return + } + file_dcolor_dcolor_db_proto_init() + file_comm_proto_init() + if !protoimpl.UnsafeEnabled { + file_dcolor_dcolor_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DColorQiecuoReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DColorQiecuoResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DColorAcceptReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DColorAcceptResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DColorRefuseReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DColorRefuseResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DColorQiecuonotifyPush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DColorGameReadyPush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DColorLoadCompleteReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DColorLoadCompleteResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dcolor_dcolor_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DColorGameStartPush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_dcolor_dcolor_msg_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_dcolor_dcolor_msg_proto_goTypes, + DependencyIndexes: file_dcolor_dcolor_msg_proto_depIdxs, + MessageInfos: file_dcolor_dcolor_msg_proto_msgTypes, + }.Build() + File_dcolor_dcolor_msg_proto = out.File + file_dcolor_dcolor_msg_proto_rawDesc = nil + file_dcolor_dcolor_msg_proto_goTypes = nil + file_dcolor_dcolor_msg_proto_depIdxs = nil +}