diff --git a/modules/catchbugs/api_loadcomplete.go b/modules/catchbugs/api_ready.go similarity index 67% rename from modules/catchbugs/api_loadcomplete.go rename to modules/catchbugs/api_ready.go index 5dc569134..d060f2629 100644 --- a/modules/catchbugs/api_loadcomplete.go +++ b/modules/catchbugs/api_ready.go @@ -6,7 +6,7 @@ import ( ) //接受切磋 -func (this *apiComp) LoadCompleteCheck(session comm.IUserSession, req *pb.CanineRabbitLoadCompleteReq) (errdata *pb.ErrorData) { +func (this *apiComp) ReadyCheck(session comm.IUserSession, req *pb.CatchbugsReadyReq) (errdata *pb.ErrorData) { if req.Roomid == "" { errdata = &pb.ErrorData{ Code: pb.ErrorCode_ReqParameterError, @@ -16,13 +16,13 @@ func (this *apiComp) LoadCompleteCheck(session comm.IUserSession, req *pb.Canine return } -func (this *apiComp) LoadComplete(session comm.IUserSession, req *pb.CanineRabbitLoadCompleteReq) (errdata *pb.ErrorData) { +func (this *apiComp) Ready(session comm.IUserSession, req *pb.CatchbugsReadyReq) (errdata *pb.ErrorData) { var ( room *Room err error ) - if errdata = this.LoadCompleteCheck(session, req); errdata != nil { + if errdata = this.ReadyCheck(session, req); errdata != nil { return } @@ -35,7 +35,7 @@ func (this *apiComp) LoadComplete(session comm.IUserSession, req *pb.CanineRabbi return } - if err = room.PlayerLoadEnd(session.GetUserId()); errdata != nil { + if err = room.PlayerReadyEnd(session.GetUserId()); errdata != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, Title: pb.ErrorCode_DBError.String(), diff --git a/modules/catchbugs/configure.go b/modules/catchbugs/configure.go index 54ae546db..9880bcd53 100644 --- a/modules/catchbugs/configure.go +++ b/modules/catchbugs/configure.go @@ -1,6 +1,7 @@ package catchbugs import ( + "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/modules" cfg "go_dreamfactory/sys/configure/structs" @@ -9,6 +10,7 @@ import ( const ( game_catchbugreward = "game_catchbugreward.json" game_catchbuglllustrated = "game_catchbuglllustrated.json" + game_catchbugskill = "game_catchbugskill.json" ) type configureComp struct { @@ -22,6 +24,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp err = this.LoadMultiConfigure(map[string]interface{}{ game_catchbugreward: cfg.NewGameCatchbugReward, game_catchbuglllustrated: cfg.NewGameCatchbugLllustrated, + game_catchbugskill: cfg.NewGameCatchbugSkill, }) return } @@ -49,3 +52,20 @@ func (this *configureComp) getGameCatchbugLllustratedDatas() (confs []*cfg.GameC confs = v.(*cfg.GameCatchbugLllustrated).GetDataList() return } + +// 获取奖励列表 +func (this *configureComp) getGameCatchbugSkillData(id int32) (conf *cfg.GameCatchbugSkillData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(game_catchbugskill); err != nil { + return + } + if conf, ok = v.(*cfg.GameCatchbugSkill).GetDataMap()[id]; !ok { + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_catchbugskill, id) + this.module.Errorf("err:%v", err) + return + } + return +} diff --git a/modules/catchbugs/module.go b/modules/catchbugs/module.go index c34dbf2d1..b9cedfe9e 100644 --- a/modules/catchbugs/module.go +++ b/modules/catchbugs/module.go @@ -64,17 +64,16 @@ func (this *CatchBugs) OnInstallComp() { func (this *CatchBugs) CreateRoom(sessions []comm.IUserSession, rulesStr string) (roomid string, err error) { var ( - rules *pb.DBCatchBugsRules = &pb.DBCatchBugsRules{} - confs []*cfg.GameCatchbugLllustratedData - cardsSlice []int32 - cardsTemp []*pb.DBCatchBugsCard - cards []*pb.DBCatchBugsCard - weights []int32 - red *pb.DBUser - blue *pb.DBUser - redinfo *pb.DBCatchBugs - blueinfo *pb.DBCatchBugs - room *Room + rules *pb.DBCatchBugsRules = &pb.DBCatchBugsRules{} + confs []*cfg.GameCatchbugLllustratedData + cardsTemp []*pb.DBCatchBugsCard + cards []*pb.DBCatchBugsCard + weights []int32 + red *pb.DBUser + blue *pb.DBUser + redinfo *pb.DBCatchBugs + blueinfo *pb.DBCatchBugs + room *Room ) if err = json.Unmarshal([]byte(rulesStr), rules); err != nil { this.Error("解析规则json", log.Field{Key: "err", Value: err.Error()}) @@ -101,22 +100,18 @@ func (this *CatchBugs) CreateRoom(sessions []comm.IUserSession, rulesStr string) weights = append(weights, v.Weights) } results := comm.GetRandWs(weights, 24) - for _, v := range results { - cardsSlice = append(cardsSlice, confs[v].Id) - } - - for i, v := range cardsSlice[:12] { + for i, v := range results { cardsTemp = append(cardsTemp, &pb.DBCatchBugsCard{ Id: int32(1000 + i*2), - Cid: v, + Cid: confs[v].Id, }, &pb.DBCatchBugsCard{ Id: int32(1001 + i*2), - Cid: v, + Cid: confs[v].Id, }) } - indexs := comm.RandShuffle(len(cardsTemp)) - cards = make([]*pb.DBCatchBugsCard, len(cardsTemp)) + indexs := comm.RandShuffle(24) + cards = make([]*pb.DBCatchBugsCard, 24) for i, v := range indexs { cards[i] = cardsTemp[v] cards[i].Index = int32(i) @@ -143,7 +138,7 @@ func (this *CatchBugs) CreateRoom(sessions []comm.IUserSession, rulesStr string) Info: comm.GetUserBaseInfo(blue), Integral: blueinfo.Integral, }, - Backup: cardsSlice[12:], + Backup: cardsTemp[24:], Card: cards, }, sessions); err != nil { this.Error("创建房间错误", log.Field{Key: "err", Value: err.Error()}) diff --git a/modules/catchbugs/room.go b/modules/catchbugs/room.go index 202f63777..c073c1479 100644 --- a/modules/catchbugs/room.go +++ b/modules/catchbugs/room.go @@ -5,6 +5,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" + cfg "go_dreamfactory/sys/configure/structs" "time" "google.golang.org/protobuf/proto" @@ -13,19 +14,23 @@ import ( type Room struct { module *CatchBugs data *pb.DBCatchBugsRoom + conf *cfg.GameCatchbugSkillData sessions []comm.IUserSession starttime time.Time round int32 + isReplenish bool handleplayer string - currindex int32 } func (this *Room) GameStart() (err error) { this.starttime = configure.Now() + if this.conf, err = this.module.configure.getGameCatchbugSkillData(this.data.Rules.Skill); err != nil { + this.module.Errorln(err) + return + } if err = this.Broadcast("gameready", &pb.CatchbugsGameReadyPush{ ServicePath: fmt.Sprintf("%s/%s", this.module.service.GetType(), this.module.service.GetId()), Room: this.data, - Countdown: 60, }); err != nil { this.module.Errorln(err) } @@ -33,7 +38,7 @@ func (this *Room) GameStart() (err error) { return } -func (this *Room) PlayerLoadEnd(uid string) (err error) { +func (this *Room) PlayerReadyEnd(uid string) (err error) { if uid == this.data.Red.Info.Uid { this.data.Red.Ready = true } else { @@ -47,12 +52,15 @@ func (this *Room) PlayerLoadEnd(uid string) (err error) { } if this.data.Red.Ready && this.data.Blue.Ready { //两个人都准备了 + this.data.Red.Ready = false + this.data.Blue.Ready = false if err = this.Broadcast("roundstart", &pb.CatchbugsRoundStartPush{ Round: this.round, Handleplayer: this.handleplayer, }); err != nil { this.module.Errorln(err) } + } return } @@ -89,7 +97,7 @@ func (this *Room) PlayerHandle(uid string, handle *pb.CatchbugsHandleReq) (err e } } } - if err = this.Broadcast("gameover", &pb.CatchbugsOpenCardPush{ + if err = this.Broadcast("opencard", &pb.CatchbugsOpenCardPush{ Roomid: this.data.Rid, Index: handle.Index, Issucc: issucc, @@ -105,23 +113,135 @@ func (this *Room) PlayerHandleEnd(uid string, handle *pb.CatchbugsHandleEndReq) err = fmt.Errorf("It's not your operation!") return } - this.round++ + + var ( + card []*pb.DBCatchBugsCard + ) if this.data.Red.Info.Uid == uid { this.handleplayer = this.data.Blue.Info.Uid } else { this.handleplayer = this.data.Red.Info.Uid } + state := this.checkGameOver() + if state == 2 || this.round == 3 { + this.ReplenishCard() + card = this.data.Card + if err = this.Broadcast("tableschange", &pb.CatchbugsTablesChangePush{ + Changetype: 1, + Card: card, + }); err != nil { + this.module.Errorln(err) + } + } else { + this.round++ + } + if this.round%this.conf.Round == 0 { //触发技能 + switch this.data.Rules.Skill { + case 1: + this.data.Card = Skill1Effect(this.data.Card) + card = this.data.Card + if err = this.Broadcast("tableschange", &pb.CatchbugsTablesChangePush{ + Changetype: 0, + Card: card, + }); err != nil { + this.module.Errorln(err) + } + break + case 2: + this.data.Card = Skill2Effect(this.data.Card) + card = this.data.Card + if err = this.Broadcast("tableschange", &pb.CatchbugsTablesChangePush{ + Changetype: 0, + Card: card, + }); err != nil { + this.module.Errorln(err) + } + break + case 4: + this.data.Card = Skill4Effect(this.data.Card) + card = this.data.Card + if err = this.Broadcast("tableschange", &pb.CatchbugsTablesChangePush{ + Changetype: 0, + Card: card, + }); err != nil { + this.module.Errorln(err) + } + break + } + } + if state == 3 { + winuid := "" + if len(this.data.Red.Cards) > len(this.data.Blue.Cards) { + winuid = this.data.Red.Info.Uid + this.data.Red.Score = int32(len(this.data.Red.Cards) * 4) + this.data.Blue.Score = int32(len(this.data.Blue.Cards)) - if err = this.Broadcast("roundstart", &pb.CatchbugsRoundStartPush{ - Round: this.round, - Handleplayer: this.handleplayer, - }); err != nil { - this.module.Errorln(err) + } else if len(this.data.Red.Cards) < len(this.data.Blue.Cards) { + winuid = this.data.Blue.Info.Uid + this.data.Blue.Score = int32(len(this.data.Blue.Cards) * 4) + this.data.Red.Score = int32(len(this.data.Red.Cards)) + } else { + this.data.Red.Score = int32(len(this.data.Red.Cards) * 2) + this.data.Blue.Score = int32(len(this.data.Blue.Cards) * 2) + } + this.data.Red.Integral += this.data.Red.Score + this.data.Blue.Integral += this.data.Blue.Score + this.module.model.Change(this.data.Red.Info.Uid, map[string]interface{}{ + "integral": this.data.Red.Integral, + }) + this.module.model.Change(this.data.Blue.Info.Uid, map[string]interface{}{ + "integral": this.data.Blue.Integral, + }) + if err = this.Broadcast("gameover", &pb.CatchbugsGameOverPush{ + Winuid: winuid, + Redintegral: this.data.Red.Integral, + Blueintegral: this.data.Blue.Integral, + }); err != nil { + + this.module.Errorln(err) + } + } + + return +} + +//检测游戏是否结束 +func (this *Room) checkGameOver() (state int32) { + for _, v := range this.data.Card { + if !v.Isopen { + state = 1 + return + } + } + if this.round < 3 && !this.isReplenish { //需要补拍 + state = 2 + } else { + state = 3 + return } return } +//补牌操作 +func (this *Room) ReplenishCard() { + var index = 0 + this.round = 4 + for _, v := range this.data.Card { + if v.Isopen { + v.Cid = this.data.Backup[index].Cid + v.Id = this.data.Backup[index].Id + index++ + } + } + this.isReplenish = true + if this.data.Rules.Headstart == 0 { + this.handleplayer = this.data.Blue.Info.Uid + } else { + this.handleplayer = this.data.Red.Info.Uid + } +} + 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) @@ -130,13 +250,14 @@ func (this *Room) Broadcast(stype string, msg proto.Message) (err error) { } //技能效果1 随机2x2的区域 旋转 -func Skill1Effect(cards []*pb.DBCatchBugsCard) (ramdonCard []*pb.DBCatchBugsCard) { +func Skill1Effect(cards []*pb.DBCatchBugsCard) (cardsTemp []*pb.DBCatchBugsCard) { var ( cardsSlice []int32 ramdon int32 //随机点 x int32 y int32 offsetX, offsetY int32 + ramdonCard []*pb.DBCatchBugsCard ) for _, v := range cards { if !v.Isopen { @@ -144,8 +265,8 @@ func Skill1Effect(cards []*pb.DBCatchBugsCard) (ramdonCard []*pb.DBCatchBugsCard } } ramdon = cardsSlice[comm.RandShuffle(len(cardsSlice))[0]] - x = ramdon % 4 - y = ramdon / 4 + x = ramdon % 6 + y = ramdon / 6 offsetX = 1 if x == 3 { offsetX = -1 @@ -154,17 +275,93 @@ func Skill1Effect(cards []*pb.DBCatchBugsCard) (ramdonCard []*pb.DBCatchBugsCard if y == 6 { offsetY = -1 } - ramdonCard = append(ramdonCard, cards[y*6+x]) - ramdonCard = append(ramdonCard, cards[y*6+x+offsetX]) - ramdonCard = append(ramdonCard, cards[(y+offsetY)*6+x+offsetX]) - ramdonCard = append(ramdonCard, cards[(y+offsetY)*6+x]) + ramdonCard = append(ramdonCard, cards[y*4+x]) + ramdonCard = append(ramdonCard, cards[y*4+x+offsetX]) + ramdonCard = append(ramdonCard, cards[(y+offsetY)*4+x+offsetX]) + ramdonCard = append(ramdonCard, cards[(y+offsetY)*4+x]) index0 := ramdonCard[0].Index for i, v := range ramdonCard { - if i < len(ramdonCard) { + if i < len(ramdonCard)-1 { v.Index = ramdonCard[i+1].Index } else { v.Index = index0 } } + cardsTemp = cards + return cardsTemp +} + +//技能效果1 随机2x2的区域 旋转 +func Skill2Effect(cards []*pb.DBCatchBugsCard) (cardsTemp []*pb.DBCatchBugsCard) { + + cardsTemp = make([]*pb.DBCatchBugsCard, len(cards)) + + cardsTemp[0] = cards[12] + cardsTemp[1] = cards[13] + cardsTemp[2] = cards[14] + cardsTemp[6] = cards[18] + cardsTemp[7] = cards[19] + cardsTemp[8] = cards[20] + + cardsTemp[3] = cards[0] + cardsTemp[4] = cards[1] + cardsTemp[5] = cards[2] + cardsTemp[9] = cards[6] + cardsTemp[10] = cards[7] + cardsTemp[11] = cards[8] + + cardsTemp[15] = cards[3] + cardsTemp[16] = cards[4] + cardsTemp[17] = cards[5] + cardsTemp[21] = cards[9] + cardsTemp[22] = cards[10] + cardsTemp[23] = cards[11] + + cardsTemp[12] = cards[15] + cardsTemp[13] = cards[16] + cardsTemp[14] = cards[17] + cardsTemp[18] = cards[21] + cardsTemp[19] = cards[22] + cardsTemp[20] = cards[23] + + for i, v := range cardsTemp { + v.Index = int32(i) + } + return +} + +//技能效果1 随机2x2的区域 旋转 +func Skill4Effect(cards []*pb.DBCatchBugsCard) (cardsTemp []*pb.DBCatchBugsCard) { + var ( + ramdonSclie []int32 = make([]int32, 0) + number int32 + cardsSlice []int32 + ramdoncards []*pb.DBCatchBugsCard + ) + ramdonSclie = append(ramdonSclie, 2) + if len(cards) > 6 { + ramdonSclie = append(ramdonSclie, 4, 6) + } else if len(cards) > 4 { + ramdonSclie = append(ramdonSclie, 4) + } + + number = ramdonSclie[comm.RandShuffle(len(ramdonSclie))[0]] + for _, v := range cards { + if !v.Isopen { + cardsSlice = append(cardsSlice, v.Index) + } + } + for _, v := range comm.RandShuffle(len(cardsSlice))[0:number] { + ramdoncards = append(ramdoncards, cards[cardsSlice[v]]) + } + index0 := ramdoncards[0].Index + for i, v := range ramdoncards { + if i < len(ramdoncards)-1 { + v.Index = ramdoncards[i+1].Index + } else { + v.Index = index0 + } + } + cardsTemp = cards return } diff --git a/modules/catchbugs/rooms.go b/modules/catchbugs/rooms.go index 05caa7d14..6cc2b355c 100644 --- a/modules/catchbugs/rooms.go +++ b/modules/catchbugs/rooms.go @@ -42,6 +42,7 @@ func (this *roomsComp) newRoom(data *pb.DBCatchBugsRoom, session []comm.IUserSes module: this.module, data: data, sessions: session, + round: 1, } this.lock.Lock() this.rooms[data.Rid] = room diff --git a/pb/catchbugs_db.pb.go b/pb/catchbugs_db.pb.go index 2bb921b63..59beff761 100644 --- a/pb/catchbugs_db.pb.go +++ b/pb/catchbugs_db.pb.go @@ -334,8 +334,8 @@ type DBCatchBugsRoom struct { Rules *DBCatchBugsRules `protobuf:"bytes,2,opt,name=rules,proto3" json:"rules"` Red *DBCatchBugsPlayer `protobuf:"bytes,3,opt,name=red,proto3" json:"red"` Blue *DBCatchBugsPlayer `protobuf:"bytes,4,opt,name=blue,proto3" json:"blue"` - Backup []int32 `protobuf:"varint,5,rep,packed,name=backup,proto3" json:"backup"` //预备卡牌 - Card []*DBCatchBugsCard `protobuf:"bytes,6,rep,name=card,proto3" json:"card"` //桌面卡牌 + Backup []*DBCatchBugsCard `protobuf:"bytes,5,rep,name=backup,proto3" json:"backup"` //预备卡牌 + Card []*DBCatchBugsCard `protobuf:"bytes,6,rep,name=card,proto3" json:"card"` //桌面卡牌 } func (x *DBCatchBugsRoom) Reset() { @@ -398,7 +398,7 @@ func (x *DBCatchBugsRoom) GetBlue() *DBCatchBugsPlayer { return nil } -func (x *DBCatchBugsRoom) GetBackup() []int32 { +func (x *DBCatchBugsRoom) GetBackup() []*DBCatchBugsCard { if x != nil { return x.Backup } @@ -460,7 +460,7 @@ var file_catchbugs_catchbugs_db_proto_rawDesc = []byte{ 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x6f, 0x70, 0x65, 0x6e, - 0x22, 0xd8, 0x01, 0x0a, 0x0f, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, 0x73, + 0x22, 0xea, 0x01, 0x0a, 0x0f, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, 0x73, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, @@ -469,12 +469,13 @@ var file_catchbugs_catchbugs_db_proto_rawDesc = []byte{ 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, 0x73, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, - 0x73, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x62, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x24, 0x0a, 0x04, 0x63, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, - 0x73, 0x43, 0x61, 0x72, 0x64, 0x52, 0x04, 0x63, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, + 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, 0x73, 0x43, 0x61, 0x72, 0x64, 0x52, + 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x24, 0x0a, 0x04, 0x63, 0x61, 0x72, 0x64, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, + 0x75, 0x67, 0x73, 0x43, 0x61, 0x72, 0x64, 0x52, 0x04, 0x63, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -507,12 +508,13 @@ var file_catchbugs_catchbugs_db_proto_depIdxs = []int32{ 1, // 3: DBCatchBugsRoom.rules:type_name -> DBCatchBugsRules 2, // 4: DBCatchBugsRoom.red:type_name -> DBCatchBugsPlayer 2, // 5: DBCatchBugsRoom.blue:type_name -> DBCatchBugsPlayer - 3, // 6: DBCatchBugsRoom.card:type_name -> DBCatchBugsCard - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 3, // 6: DBCatchBugsRoom.backup:type_name -> DBCatchBugsCard + 3, // 7: DBCatchBugsRoom.card:type_name -> DBCatchBugsCard + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_catchbugs_catchbugs_db_proto_init() } diff --git a/pb/catchbugs_msg.pb.go b/pb/catchbugs_msg.pb.go index c4f9f5470..c6bdecba8 100644 --- a/pb/catchbugs_msg.pb.go +++ b/pb/catchbugs_msg.pb.go @@ -311,7 +311,6 @@ type CatchbugsGameReadyPush struct { ServicePath string `protobuf:"bytes,1,opt,name=servicePath,proto3" json:"servicePath"` //游戏区服地址 Room *DBCatchBugsRoom `protobuf:"bytes,2,opt,name=room,proto3" json:"room"` //房间 - Countdown int32 `protobuf:"varint,3,opt,name=countdown,proto3" json:"countdown"` //布阵倒计时 } func (x *CatchbugsGameReadyPush) Reset() { @@ -360,15 +359,8 @@ func (x *CatchbugsGameReadyPush) GetRoom() *DBCatchBugsRoom { return nil } -func (x *CatchbugsGameReadyPush) GetCountdown() int32 { - if x != nil { - return x.Countdown - } - return 0 -} - //加载完毕请求 -type CatchbugsLoadCompleteReq struct { +type CatchbugsReadyReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -376,8 +368,8 @@ type CatchbugsLoadCompleteReq struct { Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"` //房间id } -func (x *CatchbugsLoadCompleteReq) Reset() { - *x = CatchbugsLoadCompleteReq{} +func (x *CatchbugsReadyReq) Reset() { + *x = CatchbugsReadyReq{} if protoimpl.UnsafeEnabled { mi := &file_catchbugs_catchbugs_msg_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -385,13 +377,13 @@ func (x *CatchbugsLoadCompleteReq) Reset() { } } -func (x *CatchbugsLoadCompleteReq) String() string { +func (x *CatchbugsReadyReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CatchbugsLoadCompleteReq) ProtoMessage() {} +func (*CatchbugsReadyReq) ProtoMessage() {} -func (x *CatchbugsLoadCompleteReq) ProtoReflect() protoreflect.Message { +func (x *CatchbugsReadyReq) ProtoReflect() protoreflect.Message { mi := &file_catchbugs_catchbugs_msg_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -403,12 +395,12 @@ func (x *CatchbugsLoadCompleteReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CatchbugsLoadCompleteReq.ProtoReflect.Descriptor instead. -func (*CatchbugsLoadCompleteReq) Descriptor() ([]byte, []int) { +// Deprecated: Use CatchbugsReadyReq.ProtoReflect.Descriptor instead. +func (*CatchbugsReadyReq) Descriptor() ([]byte, []int) { return file_catchbugs_catchbugs_msg_proto_rawDescGZIP(), []int{7} } -func (x *CatchbugsLoadCompleteReq) GetRoomid() string { +func (x *CatchbugsReadyReq) GetRoomid() string { if x != nil { return x.Roomid } @@ -416,7 +408,7 @@ func (x *CatchbugsLoadCompleteReq) GetRoomid() string { } //加载完毕请求 -type CatchbugsLoadCompleteResp struct { +type CatchbugsReadyResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -425,8 +417,8 @@ type CatchbugsLoadCompleteResp struct { Issucc bool `protobuf:"varint,2,opt,name=issucc,proto3" json:"issucc"` } -func (x *CatchbugsLoadCompleteResp) Reset() { - *x = CatchbugsLoadCompleteResp{} +func (x *CatchbugsReadyResp) Reset() { + *x = CatchbugsReadyResp{} if protoimpl.UnsafeEnabled { mi := &file_catchbugs_catchbugs_msg_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -434,13 +426,13 @@ func (x *CatchbugsLoadCompleteResp) Reset() { } } -func (x *CatchbugsLoadCompleteResp) String() string { +func (x *CatchbugsReadyResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CatchbugsLoadCompleteResp) ProtoMessage() {} +func (*CatchbugsReadyResp) ProtoMessage() {} -func (x *CatchbugsLoadCompleteResp) ProtoReflect() protoreflect.Message { +func (x *CatchbugsReadyResp) ProtoReflect() protoreflect.Message { mi := &file_catchbugs_catchbugs_msg_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -452,19 +444,19 @@ func (x *CatchbugsLoadCompleteResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CatchbugsLoadCompleteResp.ProtoReflect.Descriptor instead. -func (*CatchbugsLoadCompleteResp) Descriptor() ([]byte, []int) { +// Deprecated: Use CatchbugsReadyResp.ProtoReflect.Descriptor instead. +func (*CatchbugsReadyResp) Descriptor() ([]byte, []int) { return file_catchbugs_catchbugs_msg_proto_rawDescGZIP(), []int{8} } -func (x *CatchbugsLoadCompleteResp) GetRoomid() string { +func (x *CatchbugsReadyResp) GetRoomid() string { if x != nil { return x.Roomid } return "" } -func (x *CatchbugsLoadCompleteResp) GetIssucc() bool { +func (x *CatchbugsReadyResp) GetIssucc() bool { if x != nil { return x.Issucc } @@ -477,9 +469,8 @@ type CatchbugsRoundStartPush struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round"` //回合数 - Cards []*DBCatchBugsCard `protobuf:"bytes,5,rep,name=cards,proto3" json:"cards"` //桌子上的卡牌 技能生效才会有值 - Handleplayer string `protobuf:"bytes,2,opt,name=handleplayer,proto3" json:"handleplayer"` //操作玩家 + Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round"` //回合数 + Handleplayer string `protobuf:"bytes,2,opt,name=handleplayer,proto3" json:"handleplayer"` //操作玩家 } func (x *CatchbugsRoundStartPush) Reset() { @@ -521,13 +512,6 @@ func (x *CatchbugsRoundStartPush) GetRound() int32 { return 0 } -func (x *CatchbugsRoundStartPush) GetCards() []*DBCatchBugsCard { - if x != nil { - return x.Cards - } - return nil -} - func (x *CatchbugsRoundStartPush) GetHandleplayer() string { if x != nil { return x.Handleplayer @@ -788,6 +772,62 @@ func (*CatchbugsHandleEndResp) Descriptor() ([]byte, []int) { return file_catchbugs_catchbugs_msg_proto_rawDescGZIP(), []int{14} } +//桌面变化推送 +type CatchbugsTablesChangePush struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Changetype int32 `protobuf:"varint,1,opt,name=changetype,proto3" json:"changetype"` //0 技能变化 1补卡 + Card []*DBCatchBugsCard `protobuf:"bytes,2,rep,name=card,proto3" json:"card"` //桌面卡牌 +} + +func (x *CatchbugsTablesChangePush) Reset() { + *x = CatchbugsTablesChangePush{} + if protoimpl.UnsafeEnabled { + mi := &file_catchbugs_catchbugs_msg_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CatchbugsTablesChangePush) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CatchbugsTablesChangePush) ProtoMessage() {} + +func (x *CatchbugsTablesChangePush) ProtoReflect() protoreflect.Message { + mi := &file_catchbugs_catchbugs_msg_proto_msgTypes[15] + 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 CatchbugsTablesChangePush.ProtoReflect.Descriptor instead. +func (*CatchbugsTablesChangePush) Descriptor() ([]byte, []int) { + return file_catchbugs_catchbugs_msg_proto_rawDescGZIP(), []int{15} +} + +func (x *CatchbugsTablesChangePush) GetChangetype() int32 { + if x != nil { + return x.Changetype + } + return 0 +} + +func (x *CatchbugsTablesChangePush) GetCard() []*DBCatchBugsCard { + if x != nil { + return x.Card + } + return nil +} + //游戏结束推送 type CatchbugsGameOverPush struct { state protoimpl.MessageState @@ -802,7 +842,7 @@ type CatchbugsGameOverPush struct { func (x *CatchbugsGameOverPush) Reset() { *x = CatchbugsGameOverPush{} if protoimpl.UnsafeEnabled { - mi := &file_catchbugs_catchbugs_msg_proto_msgTypes[15] + mi := &file_catchbugs_catchbugs_msg_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -815,7 +855,7 @@ func (x *CatchbugsGameOverPush) String() string { func (*CatchbugsGameOverPush) ProtoMessage() {} func (x *CatchbugsGameOverPush) ProtoReflect() protoreflect.Message { - mi := &file_catchbugs_catchbugs_msg_proto_msgTypes[15] + mi := &file_catchbugs_catchbugs_msg_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -828,7 +868,7 @@ func (x *CatchbugsGameOverPush) ProtoReflect() protoreflect.Message { // Deprecated: Use CatchbugsGameOverPush.ProtoReflect.Descriptor instead. func (*CatchbugsGameOverPush) Descriptor() ([]byte, []int) { - return file_catchbugs_catchbugs_msg_proto_rawDescGZIP(), []int{15} + return file_catchbugs_catchbugs_msg_proto_rawDescGZIP(), []int{16} } func (x *CatchbugsGameOverPush) GetWinuid() string { @@ -890,58 +930,59 @@ var file_catchbugs_catchbugs_msg_proto_rawDesc = []byte{ 0x1a, 0x38, 0x0a, 0x0a, 0x42, 0x6f, 0x6f, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7e, 0x0a, 0x16, 0x43, 0x61, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x60, 0x0a, 0x16, 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 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, 0x24, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, - 0x67, 0x73, 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, 0x32, 0x0a, 0x18, 0x43, 0x61, - 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 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, 0x4b, - 0x0a, 0x19, 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 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, 0x7b, 0x0a, 0x17, 0x43, - 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x05, - 0x63, 0x61, 0x72, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, - 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, 0x73, 0x43, 0x61, 0x72, 0x64, 0x52, 0x05, 0x63, - 0x61, 0x72, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x70, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x22, 0x42, 0x0a, 0x12, 0x43, 0x61, 0x74, 0x63, - 0x68, 0x62, 0x75, 0x67, 0x73, 0x48, 0x61, 0x6e, 0x64, 0x6c, 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, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x15, 0x0a, 0x13, - 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x81, 0x01, 0x0a, 0x15, 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, - 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x61, 0x72, 0x64, 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, 0x22, 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x70, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x2f, 0x0a, 0x15, 0x43, 0x61, 0x74, 0x63, 0x68, - 0x62, 0x75, 0x67, 0x73, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x6e, 0x64, 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, 0x18, 0x0a, 0x16, 0x43, 0x61, 0x74, 0x63, - 0x68, 0x62, 0x75, 0x67, 0x73, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x75, 0x0a, 0x15, 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 0x47, - 0x61, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x77, - 0x69, 0x6e, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x69, 0x6e, - 0x75, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x6c, 0x75, 0x65, 0x69, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x6c, 0x75, - 0x65, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x73, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x2b, 0x0a, 0x11, + 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 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, 0x44, 0x0a, 0x12, 0x43, 0x61, 0x74, + 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 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, + 0x53, 0x0a, 0x17, 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 0x52, 0x6f, 0x75, 0x6e, + 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x12, 0x22, 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x70, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x22, 0x42, 0x0a, 0x12, 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, + 0x73, 0x48, 0x61, 0x6e, 0x64, 0x6c, 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, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x61, 0x74, 0x63, + 0x68, 0x62, 0x75, 0x67, 0x73, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, + 0x81, 0x01, 0x0a, 0x15, 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 0x4f, 0x70, 0x65, + 0x6e, 0x43, 0x61, 0x72, 0x64, 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, 0x22, 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x70, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x69, + 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, + 0x75, 0x63, 0x63, 0x22, 0x2f, 0x0a, 0x15, 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, + 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x6e, 0x64, 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, 0x18, 0x0a, 0x16, 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, + 0x73, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x61, + 0x0a, 0x19, 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x74, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x63, + 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, 0x43, 0x61, + 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, 0x73, 0x43, 0x61, 0x72, 0x64, 0x52, 0x04, 0x63, 0x61, 0x72, + 0x64, 0x22, 0x75, 0x0a, 0x15, 0x43, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 0x47, 0x61, + 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x69, + 0x6e, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x75, + 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x6c, 0x75, 0x65, 0x69, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x6c, 0x75, 0x65, + 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -956,7 +997,7 @@ func file_catchbugs_catchbugs_msg_proto_rawDescGZIP() []byte { return file_catchbugs_catchbugs_msg_proto_rawDescData } -var file_catchbugs_catchbugs_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_catchbugs_catchbugs_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_catchbugs_catchbugs_msg_proto_goTypes = []interface{}{ (*CatchbugsInfoReq)(nil), // 0: CatchbugsInfoReq (*CatchbugsInfoResp)(nil), // 1: CatchbugsInfoResp @@ -965,29 +1006,30 @@ var file_catchbugs_catchbugs_msg_proto_goTypes = []interface{}{ (*CatchbugsSingleOverReq)(nil), // 4: CatchbugsSingleOverReq (*CatchbugsSingleOverResp)(nil), // 5: CatchbugsSingleOverResp (*CatchbugsGameReadyPush)(nil), // 6: CatchbugsGameReadyPush - (*CatchbugsLoadCompleteReq)(nil), // 7: CatchbugsLoadCompleteReq - (*CatchbugsLoadCompleteResp)(nil), // 8: CatchbugsLoadCompleteResp + (*CatchbugsReadyReq)(nil), // 7: CatchbugsReadyReq + (*CatchbugsReadyResp)(nil), // 8: CatchbugsReadyResp (*CatchbugsRoundStartPush)(nil), // 9: CatchbugsRoundStartPush (*CatchbugsHandleReq)(nil), // 10: CatchbugsHandleReq (*CatchbugsHandleResp)(nil), // 11: CatchbugsHandleResp (*CatchbugsOpenCardPush)(nil), // 12: CatchbugsOpenCardPush (*CatchbugsHandleEndReq)(nil), // 13: CatchbugsHandleEndReq (*CatchbugsHandleEndResp)(nil), // 14: CatchbugsHandleEndResp - (*CatchbugsGameOverPush)(nil), // 15: CatchbugsGameOverPush - nil, // 16: CatchbugsAwardResp.AwardmapEntry - nil, // 17: CatchbugsSingleOverResp.BooksEntry - (*DBCatchBugs)(nil), // 18: DBCatchBugs - (*UserAtno)(nil), // 19: UserAtno - (*DBCatchBugsRoom)(nil), // 20: DBCatchBugsRoom - (*DBCatchBugsCard)(nil), // 21: DBCatchBugsCard + (*CatchbugsTablesChangePush)(nil), // 15: CatchbugsTablesChangePush + (*CatchbugsGameOverPush)(nil), // 16: CatchbugsGameOverPush + nil, // 17: CatchbugsAwardResp.AwardmapEntry + nil, // 18: CatchbugsSingleOverResp.BooksEntry + (*DBCatchBugs)(nil), // 19: DBCatchBugs + (*UserAtno)(nil), // 20: UserAtno + (*DBCatchBugsRoom)(nil), // 21: DBCatchBugsRoom + (*DBCatchBugsCard)(nil), // 22: DBCatchBugsCard } var file_catchbugs_catchbugs_msg_proto_depIdxs = []int32{ - 18, // 0: CatchbugsInfoResp.info:type_name -> DBCatchBugs - 16, // 1: CatchbugsAwardResp.awardmap:type_name -> CatchbugsAwardResp.AwardmapEntry - 19, // 2: CatchbugsAwardResp.award:type_name -> UserAtno - 17, // 3: CatchbugsSingleOverResp.books:type_name -> CatchbugsSingleOverResp.BooksEntry - 20, // 4: CatchbugsGameReadyPush.room:type_name -> DBCatchBugsRoom - 21, // 5: CatchbugsRoundStartPush.cards:type_name -> DBCatchBugsCard + 19, // 0: CatchbugsInfoResp.info:type_name -> DBCatchBugs + 17, // 1: CatchbugsAwardResp.awardmap:type_name -> CatchbugsAwardResp.AwardmapEntry + 20, // 2: CatchbugsAwardResp.award:type_name -> UserAtno + 18, // 3: CatchbugsSingleOverResp.books:type_name -> CatchbugsSingleOverResp.BooksEntry + 21, // 4: CatchbugsGameReadyPush.room:type_name -> DBCatchBugsRoom + 22, // 5: CatchbugsTablesChangePush.card:type_name -> DBCatchBugsCard 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 @@ -1088,7 +1130,7 @@ func file_catchbugs_catchbugs_msg_proto_init() { } } file_catchbugs_catchbugs_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CatchbugsLoadCompleteReq); i { + switch v := v.(*CatchbugsReadyReq); i { case 0: return &v.state case 1: @@ -1100,7 +1142,7 @@ func file_catchbugs_catchbugs_msg_proto_init() { } } file_catchbugs_catchbugs_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CatchbugsLoadCompleteResp); i { + switch v := v.(*CatchbugsReadyResp); i { case 0: return &v.state case 1: @@ -1184,6 +1226,18 @@ func file_catchbugs_catchbugs_msg_proto_init() { } } file_catchbugs_catchbugs_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CatchbugsTablesChangePush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_catchbugs_catchbugs_msg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CatchbugsGameOverPush); i { case 0: return &v.state @@ -1202,7 +1256,7 @@ func file_catchbugs_catchbugs_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_catchbugs_catchbugs_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 18, + NumMessages: 19, NumExtensions: 0, NumServices: 0, },