From 689b2babbe0b62a8a36c4e9d70f51618927e8190 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 26 Oct 2023 09:29:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/entertainment/api_cancelmatch.go | 31 ++ modules/entertainment/configure.go | 17 +- modules/entertainment/room.go | 114 +++--- modules/entertainment/xxlPlat.go | 9 + pb/entertain_msg.pb.go | 451 ++++++++++++++--------- 5 files changed, 398 insertions(+), 224 deletions(-) create mode 100644 modules/entertainment/api_cancelmatch.go diff --git a/modules/entertainment/api_cancelmatch.go b/modules/entertainment/api_cancelmatch.go new file mode 100644 index 000000000..3e765c642 --- /dev/null +++ b/modules/entertainment/api_cancelmatch.go @@ -0,0 +1,31 @@ +package entertainment + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +//参数校验 +func (this *apiComp) CancelMatchCheck(session comm.IUserSession, req *pb.EntertainCancelMatchReq) (errdata *pb.ErrorData) { + + return +} + +func (this *apiComp) CancelMatch(session comm.IUserSession, req *pb.EntertainCancelMatchReq) (errdata *pb.ErrorData) { + var ( + err error + ) + + if err = this.module.match.CancelMatch(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + session.SendMsg(string(this.module.GetType()), "cancelmatch", &pb.EntertainCancelMatchResp{ + Maych: true, + }) + return +} diff --git a/modules/entertainment/configure.go b/modules/entertainment/configure.go index 52cdec2ae..84ddde6a2 100644 --- a/modules/entertainment/configure.go +++ b/modules/entertainment/configure.go @@ -32,9 +32,8 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp this.module = module.(*Entertainment) err = this.LoadMultiConfigure(map[string]interface{}{ game_consumehero: cfg.NewGameConsumeHero, - // game_integral: cfg.NewGameInitial, + game_integral: cfg.NewGameIntegral, }) - configure.RegisterConfigure(game_block, cfg.NewGameBlock, this.LoadGameBlock) return @@ -99,12 +98,20 @@ func (this *configureComp) GetGameConsumeintegral(key int32) (conf *cfg.GameInte ) if v, err = this.GetConfigure(game_integral); err == nil { if configure, ok := v.(*cfg.GameIntegral); ok { - if conf = configure.Get(key); conf != nil { - return + + for pos, v := range configure.GetDataList() { + if v.Key >= key { + if pos == 0 { + conf = configure.GetDataList()[1] + return + } + conf = v + return + } } } } - err = comm.NewNotFoundConfErr(moduleName, game_consumehero, key) + err = comm.NewNotFoundConfErr(moduleName, game_integral, key) return } diff --git a/modules/entertainment/room.go b/modules/entertainment/room.go index cc9919cea..2d75de452 100644 --- a/modules/entertainment/room.go +++ b/modules/entertainment/room.go @@ -49,15 +49,14 @@ func (this *Room) operateTimeOut(task *timewheel.Task, args ...interface{}) { if this.player2.Ps <= 0 { this.curPower = this.player1.Uid this.player1.Ps = MaxPs // 恢复体力 + + this.round++ + if this.operatetimer != nil { + timewheel.Remove(this.operatetimer) + } // 回合+1 + this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut) // 开启新的定时器 } } - if this.curPower != this.NexPower { // 变更权限的适合 - this.round++ - if this.operatetimer != nil { - timewheel.Remove(this.operatetimer) - } // 回合+1 - this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut) // 开启新的定时器 - } var szMap []*pb.MapData szMap = append(szMap, &pb.MapData{ @@ -143,21 +142,11 @@ func (this *Room) AiOperator() { ) this.player2.Ps-- - if this.player2.Ps <= 0 { // 权限给下一个人 - this.NexPower = this.player1.Uid - } - this.player1.Ps = MaxPs - // 交换元素 szMap, oid1, oid2, bAddPs = this.chessboard.AiSwapGirde() - if this.NexPower != this.curPower { - this.round++ - } for _, v := range szMap { // - //if v.CurEnergy > 0 { this.player2.Energy += v.CurEnergy v.CurEnergy = this.player2.Energy - //} curScore += v.CurSocre this.player2.Score += v.CurSocre v.CurSocre = this.player2.Score @@ -169,7 +158,12 @@ func (this *Room) AiOperator() { this.player2.Ps = MaxPs } } - this.player2.Score += curScore + if this.player2.Ps <= 0 { // 权限给下一个人 + this.NexPower = this.player1.Uid + this.player1.Ps = MaxPs + this.round++ + } + // 广播消息 if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{ Mpadata: szMap, @@ -185,8 +179,13 @@ func (this *Room) AiOperator() { }, this.szSession...); err != nil { this.Errorln(err) } + if this.round > this.MaxRound { // 游戏结束 - this.GameOver() + if this.player1.Score == this.player2.Score { + this.MaxRound += 1 // 增加一回合 + } else { + this.GameOver() + } return } this.curPower = this.NexPower @@ -208,7 +207,6 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr ) var szMap []*pb.MapData req := msg.(*pb.EntertainOperatorReq) - if session.GetUserId() != this.curPower { // 校验是不是你的权限 errdata = &pb.ErrorData{ Code: pb.ErrorCode_EntertainNoPower, @@ -337,7 +335,15 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr this.player1.Ps = MaxPs } } - this.player2.Ps = MaxPs + + if this.player1.Ps <= 0 { + this.NexPower = this.player2.Uid + if len(this.szSession) == 1 { // 校验2号玩家是不是AI + AIOperator = true + } + this.player2.Ps = MaxPs + } + } else { // this.curPower == this.player2.Uid this.player2.Score += curScore this.player2.Ps-- @@ -347,41 +353,28 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr this.player2.Ps = MaxPs } } - this.player1.Ps = MaxPs + if this.player2.Ps <= 0 { + this.NexPower = this.player1.Uid + this.player1.Ps = MaxPs + this.round++ + if this.operatetimer != nil { + timewheel.Remove(this.operatetimer) + this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut) // 开启新的定时器 + } + } } for _, v := range szMap { // curScore += v.CurSocre if color == 1 { this.player1.Score += v.CurSocre v.CurSocre = this.player1.Score - //if v.CurEnergy > 0 { this.player1.Energy += v.CurEnergy v.CurEnergy = this.player1.Energy - //} } else { this.player2.Score += v.CurSocre v.CurSocre = this.player2.Score - //if v.CurEnergy > 0 { this.player2.Energy += v.CurEnergy v.CurEnergy = this.player2.Energy - //} - } - } - - if this.player1.Ps <= 0 { // 权限给下一个人 - this.NexPower = this.player2.Uid - if len(this.szSession) == 1 { // 校验2号玩家是不是AI - AIOperator = true - } - } - if this.player2.Ps <= 0 { // 权限给下一个人 - this.NexPower = this.player1.Uid - } - if this.NexPower != this.curPower { - this.round++ - if this.operatetimer != nil { - timewheel.Remove(this.operatetimer) - this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut) // 开启新的定时器 } } @@ -400,8 +393,12 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr }, this.szSession...); err != nil { this.Errorln(err) } - if this.round > this.MaxRound && this.NexPower == this.player1.Uid { // 游戏结束 - this.GameOver() + if this.round > this.MaxRound { // 游戏结束 + if this.player1.Score == this.player2.Score { + this.MaxRound += 1 // 增加一回合 + } else { + this.GameOver() + } return } // 变更权限 @@ -414,7 +411,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr this.NexPower = this.player1.Uid this.curPower = this.player1.Uid this.player1.Ps = MaxPs - this.player2.Ps = MaxPs + this.player2.Ps = 0 if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "startgame", &pb.EntertainStartGamePush{ User1: this.player1, User2: this.player2, @@ -436,7 +433,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr this.NexPower = this.player1.Uid this.curPower = this.player1.Uid this.player1.Ps = MaxPs - this.player2.Ps = MaxPs + this.player2.Ps = 0 if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "startgame", &pb.EntertainStartGamePush{ User1: this.player1, User2: this.player2, @@ -473,12 +470,24 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr // 游戏结束 func (this *Room) GameOver() (errdata *pb.ErrorData) { + var ( + atno []*pb.UserAtno + winindex int32 + ) if this.operatetimer != nil { timewheel.Remove(this.operatetimer) } var winner string - if this.player1.Score > this.player2.Score { - winner = this.player1.Uid + winner = this.player1.Uid + + if this.player1.Score < this.player2.Score { + winner = this.player2.Uid + winindex = 1 + } + if conf, err := this.module.configure.GetGameConsumeintegral(this.player1.Score); err != nil { + if errdata, atno = this.module.DispenseAtno(this.szSession[winindex], conf.Rewards, true); errdata != nil { + return + } } this.module.SendMsgSyncToSession(string(this.module.GetType()), "gameover", &pb.EntertainGameOverPush{ User1: this.player1, @@ -486,9 +495,10 @@ func (this *Room) GameOver() (errdata *pb.ErrorData) { Mpadata: &pb.MapData{ Data: this.chessboard.Plat, }, - Power: "", // 清理权限 - Round: this.round, - Win: winner, + Power: "", // 清理权限 + Round: this.round, + Win: winner, + Reward: atno, }, this.szSession...) return } diff --git a/modules/entertainment/xxlPlat.go b/modules/entertainment/xxlPlat.go index 9700f46d0..bf75b7f3c 100644 --- a/modules/entertainment/xxlPlat.go +++ b/modules/entertainment/xxlPlat.go @@ -579,3 +579,12 @@ func (this *MapData) SkillUp(skillid int32, value int32) (szMap []*pb.MapData) { } return } + +// 随机生成 不可消除的 地图 +// func (this *MapData) CheckInitPlat() { +// this.Plat = make([]*pb.GirdeData, Width*Height) +// for i := 0; i < Width*Height; i++ { +// this.Plat[i] = this.CreateGride(int32(i)) + +// } +// } diff --git a/pb/entertain_msg.pb.go b/pb/entertain_msg.pb.go index ca364097d..01f4b41d8 100644 --- a/pb/entertain_msg.pb.go +++ b/pb/entertain_msg.pb.go @@ -116,6 +116,93 @@ func (x *EntertainMatchResp) GetMaych() bool { return false } +// 取消匹配 +type EntertainCancelMatchReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EntertainCancelMatchReq) Reset() { + *x = EntertainCancelMatchReq{} + if protoimpl.UnsafeEnabled { + mi := &file_entertain_entertain_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EntertainCancelMatchReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntertainCancelMatchReq) ProtoMessage() {} + +func (x *EntertainCancelMatchReq) ProtoReflect() protoreflect.Message { + mi := &file_entertain_entertain_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 EntertainCancelMatchReq.ProtoReflect.Descriptor instead. +func (*EntertainCancelMatchReq) Descriptor() ([]byte, []int) { + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{2} +} + +// 匹配结果 +type EntertainCancelMatchResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Maych bool `protobuf:"varint,1,opt,name=maych,proto3" json:"maych"` // 匹配成功 +} + +func (x *EntertainCancelMatchResp) Reset() { + *x = EntertainCancelMatchResp{} + if protoimpl.UnsafeEnabled { + mi := &file_entertain_entertain_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EntertainCancelMatchResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntertainCancelMatchResp) ProtoMessage() {} + +func (x *EntertainCancelMatchResp) ProtoReflect() protoreflect.Message { + mi := &file_entertain_entertain_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 EntertainCancelMatchResp.ProtoReflect.Descriptor instead. +func (*EntertainCancelMatchResp) Descriptor() ([]byte, []int) { + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{3} +} + +func (x *EntertainCancelMatchResp) GetMaych() bool { + if x != nil { + return x.Maych + } + return false +} + // 进入场景发送准备 type EntertainReadyReq struct { state protoimpl.MessageState @@ -128,7 +215,7 @@ type EntertainReadyReq struct { func (x *EntertainReadyReq) Reset() { *x = EntertainReadyReq{} if protoimpl.UnsafeEnabled { - mi := &file_entertain_entertain_msg_proto_msgTypes[2] + mi := &file_entertain_entertain_msg_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -141,7 +228,7 @@ func (x *EntertainReadyReq) String() string { func (*EntertainReadyReq) ProtoMessage() {} func (x *EntertainReadyReq) ProtoReflect() protoreflect.Message { - mi := &file_entertain_entertain_msg_proto_msgTypes[2] + mi := &file_entertain_entertain_msg_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -154,7 +241,7 @@ func (x *EntertainReadyReq) ProtoReflect() protoreflect.Message { // Deprecated: Use EntertainReadyReq.ProtoReflect.Descriptor instead. func (*EntertainReadyReq) Descriptor() ([]byte, []int) { - return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{2} + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{4} } func (x *EntertainReadyReq) GetRoomid() string { @@ -175,7 +262,7 @@ type EntertainReadyResp struct { func (x *EntertainReadyResp) Reset() { *x = EntertainReadyResp{} if protoimpl.UnsafeEnabled { - mi := &file_entertain_entertain_msg_proto_msgTypes[3] + mi := &file_entertain_entertain_msg_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -188,7 +275,7 @@ func (x *EntertainReadyResp) String() string { func (*EntertainReadyResp) ProtoMessage() {} func (x *EntertainReadyResp) ProtoReflect() protoreflect.Message { - mi := &file_entertain_entertain_msg_proto_msgTypes[3] + mi := &file_entertain_entertain_msg_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -201,7 +288,7 @@ func (x *EntertainReadyResp) ProtoReflect() protoreflect.Message { // Deprecated: Use EntertainReadyResp.ProtoReflect.Descriptor instead. func (*EntertainReadyResp) Descriptor() ([]byte, []int) { - return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{3} + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{5} } func (x *EntertainReadyResp) GetReady() bool { @@ -223,13 +310,12 @@ type EntertainStartGamePush struct { Power string `protobuf:"bytes,4,opt,name=power,proto3" json:"power"` // 操作权 Round int32 `protobuf:"varint,5,opt,name=round,proto3" json:"round"` // 回合数 Roomid string `protobuf:"bytes,6,opt,name=roomid,proto3" json:"roomid"` // 房间id - Reward []*UserAtno `protobuf:"bytes,7,rep,name=reward,proto3" json:"reward"` // 获胜的玩家获得的奖励 } func (x *EntertainStartGamePush) Reset() { *x = EntertainStartGamePush{} if protoimpl.UnsafeEnabled { - mi := &file_entertain_entertain_msg_proto_msgTypes[4] + mi := &file_entertain_entertain_msg_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -242,7 +328,7 @@ func (x *EntertainStartGamePush) String() string { func (*EntertainStartGamePush) ProtoMessage() {} func (x *EntertainStartGamePush) ProtoReflect() protoreflect.Message { - mi := &file_entertain_entertain_msg_proto_msgTypes[4] + mi := &file_entertain_entertain_msg_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -255,7 +341,7 @@ func (x *EntertainStartGamePush) ProtoReflect() protoreflect.Message { // Deprecated: Use EntertainStartGamePush.ProtoReflect.Descriptor instead. func (*EntertainStartGamePush) Descriptor() ([]byte, []int) { - return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{4} + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{6} } func (x *EntertainStartGamePush) GetUser1() *PlayerData { @@ -300,13 +386,6 @@ func (x *EntertainStartGamePush) GetRoomid() string { return "" } -func (x *EntertainStartGamePush) GetReward() []*UserAtno { - if x != nil { - return x.Reward - } - return nil -} - // 操作 type EntertainOperatorReq struct { state protoimpl.MessageState @@ -322,7 +401,7 @@ type EntertainOperatorReq struct { func (x *EntertainOperatorReq) Reset() { *x = EntertainOperatorReq{} if protoimpl.UnsafeEnabled { - mi := &file_entertain_entertain_msg_proto_msgTypes[5] + mi := &file_entertain_entertain_msg_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -335,7 +414,7 @@ func (x *EntertainOperatorReq) String() string { func (*EntertainOperatorReq) ProtoMessage() {} func (x *EntertainOperatorReq) ProtoReflect() protoreflect.Message { - mi := &file_entertain_entertain_msg_proto_msgTypes[5] + mi := &file_entertain_entertain_msg_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -348,7 +427,7 @@ func (x *EntertainOperatorReq) ProtoReflect() protoreflect.Message { // Deprecated: Use EntertainOperatorReq.ProtoReflect.Descriptor instead. func (*EntertainOperatorReq) Descriptor() ([]byte, []int) { - return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{5} + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{7} } func (x *EntertainOperatorReq) GetRoomid() string { @@ -391,7 +470,7 @@ type EntertainOperatorResp struct { func (x *EntertainOperatorResp) Reset() { *x = EntertainOperatorResp{} if protoimpl.UnsafeEnabled { - mi := &file_entertain_entertain_msg_proto_msgTypes[6] + mi := &file_entertain_entertain_msg_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -404,7 +483,7 @@ func (x *EntertainOperatorResp) String() string { func (*EntertainOperatorResp) ProtoMessage() {} func (x *EntertainOperatorResp) ProtoReflect() protoreflect.Message { - mi := &file_entertain_entertain_msg_proto_msgTypes[6] + mi := &file_entertain_entertain_msg_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -417,7 +496,7 @@ func (x *EntertainOperatorResp) ProtoReflect() protoreflect.Message { // Deprecated: Use EntertainOperatorResp.ProtoReflect.Descriptor instead. func (*EntertainOperatorResp) Descriptor() ([]byte, []int) { - return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{6} + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{8} } func (x *EntertainOperatorResp) GetSuccess() bool { @@ -448,7 +527,7 @@ type EntertainOperatorRstPush struct { func (x *EntertainOperatorRstPush) Reset() { *x = EntertainOperatorRstPush{} if protoimpl.UnsafeEnabled { - mi := &file_entertain_entertain_msg_proto_msgTypes[7] + mi := &file_entertain_entertain_msg_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -461,7 +540,7 @@ func (x *EntertainOperatorRstPush) String() string { func (*EntertainOperatorRstPush) ProtoMessage() {} func (x *EntertainOperatorRstPush) ProtoReflect() protoreflect.Message { - mi := &file_entertain_entertain_msg_proto_msgTypes[7] + mi := &file_entertain_entertain_msg_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -474,7 +553,7 @@ func (x *EntertainOperatorRstPush) ProtoReflect() protoreflect.Message { // Deprecated: Use EntertainOperatorRstPush.ProtoReflect.Descriptor instead. func (*EntertainOperatorRstPush) Descriptor() ([]byte, []int) { - return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{7} + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{9} } func (x *EntertainOperatorRstPush) GetMpadata() []*MapData { @@ -559,12 +638,13 @@ type EntertainGameOverPush struct { Power string `protobuf:"bytes,4,opt,name=power,proto3" json:"power"` // 操作权 Round int32 `protobuf:"varint,5,opt,name=round,proto3" json:"round"` // 回合数 Win string `protobuf:"bytes,6,opt,name=win,proto3" json:"win"` // 谁赢了 + Reward []*UserAtno `protobuf:"bytes,7,rep,name=reward,proto3" json:"reward"` // 获胜的玩家获得的奖励 } func (x *EntertainGameOverPush) Reset() { *x = EntertainGameOverPush{} if protoimpl.UnsafeEnabled { - mi := &file_entertain_entertain_msg_proto_msgTypes[8] + mi := &file_entertain_entertain_msg_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -577,7 +657,7 @@ func (x *EntertainGameOverPush) String() string { func (*EntertainGameOverPush) ProtoMessage() {} func (x *EntertainGameOverPush) ProtoReflect() protoreflect.Message { - mi := &file_entertain_entertain_msg_proto_msgTypes[8] + mi := &file_entertain_entertain_msg_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -590,7 +670,7 @@ func (x *EntertainGameOverPush) ProtoReflect() protoreflect.Message { // Deprecated: Use EntertainGameOverPush.ProtoReflect.Descriptor instead. func (*EntertainGameOverPush) Descriptor() ([]byte, []int) { - return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{8} + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{10} } func (x *EntertainGameOverPush) GetUser1() *PlayerData { @@ -635,6 +715,13 @@ func (x *EntertainGameOverPush) GetWin() string { return "" } +func (x *EntertainGameOverPush) GetReward() []*UserAtno { + if x != nil { + return x.Reward + } + return nil +} + type EntertainEnterRoomPush struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -649,7 +736,7 @@ type EntertainEnterRoomPush struct { func (x *EntertainEnterRoomPush) Reset() { *x = EntertainEnterRoomPush{} if protoimpl.UnsafeEnabled { - mi := &file_entertain_entertain_msg_proto_msgTypes[9] + mi := &file_entertain_entertain_msg_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -662,7 +749,7 @@ func (x *EntertainEnterRoomPush) String() string { func (*EntertainEnterRoomPush) ProtoMessage() {} func (x *EntertainEnterRoomPush) ProtoReflect() protoreflect.Message { - mi := &file_entertain_entertain_msg_proto_msgTypes[9] + mi := &file_entertain_entertain_msg_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -675,7 +762,7 @@ func (x *EntertainEnterRoomPush) ProtoReflect() protoreflect.Message { // Deprecated: Use EntertainEnterRoomPush.ProtoReflect.Descriptor instead. func (*EntertainEnterRoomPush) Descriptor() ([]byte, []int) { - return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{9} + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{11} } func (x *EntertainEnterRoomPush) GetRooid() string { @@ -718,7 +805,7 @@ type EntertainReconnectReq struct { func (x *EntertainReconnectReq) Reset() { *x = EntertainReconnectReq{} if protoimpl.UnsafeEnabled { - mi := &file_entertain_entertain_msg_proto_msgTypes[10] + mi := &file_entertain_entertain_msg_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -731,7 +818,7 @@ func (x *EntertainReconnectReq) String() string { func (*EntertainReconnectReq) ProtoMessage() {} func (x *EntertainReconnectReq) ProtoReflect() protoreflect.Message { - mi := &file_entertain_entertain_msg_proto_msgTypes[10] + mi := &file_entertain_entertain_msg_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -744,7 +831,7 @@ func (x *EntertainReconnectReq) ProtoReflect() protoreflect.Message { // Deprecated: Use EntertainReconnectReq.ProtoReflect.Descriptor instead. func (*EntertainReconnectReq) Descriptor() ([]byte, []int) { - return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{10} + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{12} } func (x *EntertainReconnectReq) GetRoomid() string { @@ -772,7 +859,7 @@ type EntertainReconnectResp struct { func (x *EntertainReconnectResp) Reset() { *x = EntertainReconnectResp{} if protoimpl.UnsafeEnabled { - mi := &file_entertain_entertain_msg_proto_msgTypes[11] + mi := &file_entertain_entertain_msg_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -785,7 +872,7 @@ func (x *EntertainReconnectResp) String() string { func (*EntertainReconnectResp) ProtoMessage() {} func (x *EntertainReconnectResp) ProtoReflect() protoreflect.Message { - mi := &file_entertain_entertain_msg_proto_msgTypes[11] + mi := &file_entertain_entertain_msg_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -798,7 +885,7 @@ func (x *EntertainReconnectResp) ProtoReflect() protoreflect.Message { // Deprecated: Use EntertainReconnectResp.ProtoReflect.Descriptor instead. func (*EntertainReconnectResp) Descriptor() ([]byte, []int) { - return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{11} + return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{13} } func (x *EntertainReconnectResp) GetRoomid() string { @@ -870,98 +957,102 @@ var file_entertain_entertain_msg_proto_rawDesc = []byte{ 0x69, 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, 0x2a, 0x0a, 0x12, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x79, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x61, 0x79, - 0x63, 0x68, 0x22, 0x2b, 0x0a, 0x11, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 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, - 0x2a, 0x0a, 0x12, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x61, 0x64, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0xe9, 0x01, 0x0a, 0x16, - 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x47, 0x61, - 0x6d, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, - 0x72, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x12, 0x22, 0x0a, 0x07, - 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, - 0x4d, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, - 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, - 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x76, 0x0a, 0x14, 0x45, 0x6e, 0x74, 0x65, 0x72, - 0x74, 0x61, 0x69, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x75, 0x72, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x75, - 0x72, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x64, 0x22, - 0x31, 0x0a, 0x15, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x22, 0xaa, 0x02, 0x0a, 0x18, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x73, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, - 0x22, 0x0a, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x08, 0x2e, 0x4d, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, - 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, - 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, - 0x73, 0x65, 0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x75, 0x72, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x75, - 0x72, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x64, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x64, 0x22, - 0xbf, 0x01, 0x0a, 0x15, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x47, 0x61, 0x6d, - 0x65, 0x4f, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, - 0x72, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, - 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x12, - 0x22, 0x0a, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x08, 0x2e, 0x4d, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x77, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x77, 0x69, - 0x6e, 0x22, 0x92, 0x01, 0x0a, 0x16, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x45, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x75, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, - 0x72, 0x6f, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6f, - 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x70, 0x61, 0x74, 0x68, - 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, - 0x65, 0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, 0x04, 0x20, 0x01, + 0x63, 0x68, 0x22, 0x19, 0x0a, 0x17, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x22, 0x30, 0x0a, + 0x18, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x79, + 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x61, 0x79, 0x63, 0x68, 0x22, + 0x2b, 0x0a, 0x11, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 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, 0x2a, 0x0a, 0x12, + 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0xc6, 0x01, 0x0a, 0x16, 0x45, 0x6e, 0x74, + 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x50, + 0x75, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x22, 0x2f, 0x0a, 0x15, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, - 0x61, 0x69, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x12, + 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x12, 0x22, 0x0a, 0x07, 0x6d, 0x70, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x4d, 0x61, 0x70, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, + 0x77, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, + 0x6d, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, + 0x64, 0x22, 0x76, 0x0a, 0x14, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x75, 0x72, 0x69, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x15, 0x45, 0x6e, 0x74, + 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xaa, 0x02, 0x0a, + 0x18, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x73, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x22, 0x0a, 0x07, 0x6d, 0x70, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x4d, 0x61, 0x70, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, + 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x75, + 0x73, 0x65, 0x72, 0x31, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x12, 0x21, + 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, + 0x32, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x69, 0x64, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x75, 0x72, 0x69, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x64, 0x22, 0xe2, 0x01, 0x0a, 0x15, 0x45, 0x6e, + 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x50, + 0x75, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x12, 0x22, 0x0a, 0x07, 0x6d, 0x70, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x4d, 0x61, 0x70, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, + 0x77, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x77, 0x69, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x77, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x06, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x92, + 0x01, 0x0a, 0x16, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x75, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6f, 0x69, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x70, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, + 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, + 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, + 0x65, 0x72, 0x32, 0x22, 0x2f, 0x0a, 0x15, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, + 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 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, 0xf8, 0x01, 0x0a, 0x16, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 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, 0x22, 0xf8, 0x01, 0x0a, 0x16, 0x45, 0x6e, 0x74, 0x65, - 0x72, 0x74, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 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, 0x22, 0x0a, 0x07, 0x6d, 0x70, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x4d, 0x61, - 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, - 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x70, 0x6f, 0x77, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x70, 0x6f, 0x77, 0x65, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x05, - 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x12, - 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, - 0x72, 0x32, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x4d, 0x61, 0x70, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x07, 0x6d, 0x70, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x70, + 0x6f, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, + 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, + 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, + 0x72, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, + 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x42, + 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -976,40 +1067,42 @@ func file_entertain_entertain_msg_proto_rawDescGZIP() []byte { return file_entertain_entertain_msg_proto_rawDescData } -var file_entertain_entertain_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_entertain_entertain_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_entertain_entertain_msg_proto_goTypes = []interface{}{ (*EntertainMatchReq)(nil), // 0: EntertainMatchReq (*EntertainMatchResp)(nil), // 1: EntertainMatchResp - (*EntertainReadyReq)(nil), // 2: EntertainReadyReq - (*EntertainReadyResp)(nil), // 3: EntertainReadyResp - (*EntertainStartGamePush)(nil), // 4: EntertainStartGamePush - (*EntertainOperatorReq)(nil), // 5: EntertainOperatorReq - (*EntertainOperatorResp)(nil), // 6: EntertainOperatorResp - (*EntertainOperatorRstPush)(nil), // 7: EntertainOperatorRstPush - (*EntertainGameOverPush)(nil), // 8: EntertainGameOverPush - (*EntertainEnterRoomPush)(nil), // 9: EntertainEnterRoomPush - (*EntertainReconnectReq)(nil), // 10: EntertainReconnectReq - (*EntertainReconnectResp)(nil), // 11: EntertainReconnectResp - (*PlayerData)(nil), // 12: PlayerData - (*MapData)(nil), // 13: MapData - (*UserAtno)(nil), // 14: UserAtno + (*EntertainCancelMatchReq)(nil), // 2: EntertainCancelMatchReq + (*EntertainCancelMatchResp)(nil), // 3: EntertainCancelMatchResp + (*EntertainReadyReq)(nil), // 4: EntertainReadyReq + (*EntertainReadyResp)(nil), // 5: EntertainReadyResp + (*EntertainStartGamePush)(nil), // 6: EntertainStartGamePush + (*EntertainOperatorReq)(nil), // 7: EntertainOperatorReq + (*EntertainOperatorResp)(nil), // 8: EntertainOperatorResp + (*EntertainOperatorRstPush)(nil), // 9: EntertainOperatorRstPush + (*EntertainGameOverPush)(nil), // 10: EntertainGameOverPush + (*EntertainEnterRoomPush)(nil), // 11: EntertainEnterRoomPush + (*EntertainReconnectReq)(nil), // 12: EntertainReconnectReq + (*EntertainReconnectResp)(nil), // 13: EntertainReconnectResp + (*PlayerData)(nil), // 14: PlayerData + (*MapData)(nil), // 15: MapData + (*UserAtno)(nil), // 16: UserAtno } var file_entertain_entertain_msg_proto_depIdxs = []int32{ - 12, // 0: EntertainStartGamePush.user1:type_name -> PlayerData - 12, // 1: EntertainStartGamePush.user2:type_name -> PlayerData - 13, // 2: EntertainStartGamePush.mpadata:type_name -> MapData - 14, // 3: EntertainStartGamePush.reward:type_name -> UserAtno - 13, // 4: EntertainOperatorRstPush.mpadata:type_name -> MapData - 12, // 5: EntertainOperatorRstPush.user1:type_name -> PlayerData - 12, // 6: EntertainOperatorRstPush.user2:type_name -> PlayerData - 12, // 7: EntertainGameOverPush.user1:type_name -> PlayerData - 12, // 8: EntertainGameOverPush.user2:type_name -> PlayerData - 13, // 9: EntertainGameOverPush.mpadata:type_name -> MapData - 12, // 10: EntertainEnterRoomPush.user1:type_name -> PlayerData - 12, // 11: EntertainEnterRoomPush.user2:type_name -> PlayerData - 13, // 12: EntertainReconnectResp.mpadata:type_name -> MapData - 12, // 13: EntertainReconnectResp.user1:type_name -> PlayerData - 12, // 14: EntertainReconnectResp.user2:type_name -> PlayerData + 14, // 0: EntertainStartGamePush.user1:type_name -> PlayerData + 14, // 1: EntertainStartGamePush.user2:type_name -> PlayerData + 15, // 2: EntertainStartGamePush.mpadata:type_name -> MapData + 15, // 3: EntertainOperatorRstPush.mpadata:type_name -> MapData + 14, // 4: EntertainOperatorRstPush.user1:type_name -> PlayerData + 14, // 5: EntertainOperatorRstPush.user2:type_name -> PlayerData + 14, // 6: EntertainGameOverPush.user1:type_name -> PlayerData + 14, // 7: EntertainGameOverPush.user2:type_name -> PlayerData + 15, // 8: EntertainGameOverPush.mpadata:type_name -> MapData + 16, // 9: EntertainGameOverPush.reward:type_name -> UserAtno + 14, // 10: EntertainEnterRoomPush.user1:type_name -> PlayerData + 14, // 11: EntertainEnterRoomPush.user2:type_name -> PlayerData + 15, // 12: EntertainReconnectResp.mpadata:type_name -> MapData + 14, // 13: EntertainReconnectResp.user1:type_name -> PlayerData + 14, // 14: EntertainReconnectResp.user2:type_name -> PlayerData 15, // [15:15] is the sub-list for method output_type 15, // [15:15] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name @@ -1050,7 +1143,7 @@ func file_entertain_entertain_msg_proto_init() { } } file_entertain_entertain_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntertainReadyReq); i { + switch v := v.(*EntertainCancelMatchReq); i { case 0: return &v.state case 1: @@ -1062,7 +1155,7 @@ func file_entertain_entertain_msg_proto_init() { } } file_entertain_entertain_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntertainReadyResp); i { + switch v := v.(*EntertainCancelMatchResp); i { case 0: return &v.state case 1: @@ -1074,7 +1167,7 @@ func file_entertain_entertain_msg_proto_init() { } } file_entertain_entertain_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntertainStartGamePush); i { + switch v := v.(*EntertainReadyReq); i { case 0: return &v.state case 1: @@ -1086,7 +1179,7 @@ func file_entertain_entertain_msg_proto_init() { } } file_entertain_entertain_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntertainOperatorReq); i { + switch v := v.(*EntertainReadyResp); i { case 0: return &v.state case 1: @@ -1098,7 +1191,7 @@ func file_entertain_entertain_msg_proto_init() { } } file_entertain_entertain_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntertainOperatorResp); i { + switch v := v.(*EntertainStartGamePush); i { case 0: return &v.state case 1: @@ -1110,7 +1203,7 @@ func file_entertain_entertain_msg_proto_init() { } } file_entertain_entertain_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntertainOperatorRstPush); i { + switch v := v.(*EntertainOperatorReq); i { case 0: return &v.state case 1: @@ -1122,7 +1215,7 @@ func file_entertain_entertain_msg_proto_init() { } } file_entertain_entertain_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntertainGameOverPush); i { + switch v := v.(*EntertainOperatorResp); i { case 0: return &v.state case 1: @@ -1134,7 +1227,7 @@ func file_entertain_entertain_msg_proto_init() { } } file_entertain_entertain_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntertainEnterRoomPush); i { + switch v := v.(*EntertainOperatorRstPush); i { case 0: return &v.state case 1: @@ -1146,7 +1239,7 @@ func file_entertain_entertain_msg_proto_init() { } } file_entertain_entertain_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntertainReconnectReq); i { + switch v := v.(*EntertainGameOverPush); i { case 0: return &v.state case 1: @@ -1158,6 +1251,30 @@ func file_entertain_entertain_msg_proto_init() { } } file_entertain_entertain_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntertainEnterRoomPush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entertain_entertain_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntertainReconnectReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_entertain_entertain_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EntertainReconnectResp); i { case 0: return &v.state @@ -1176,7 +1293,7 @@ func file_entertain_entertain_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_entertain_entertain_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 0, }, From 58898f4d3f076dbdd940880f6b410db4db07ed41 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 26 Oct 2023 09:58:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?xxl=E5=8F=91=E5=A5=96=E6=A0=A1=E9=AA=8C=20?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=98=AFAI=E8=83=9C=E5=88=A9=20=E4=B8=8D?= =?UTF-8?q?=E5=8F=91=E5=B0=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/entertainment/room.go | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/modules/entertainment/room.go b/modules/entertainment/room.go index 2d75de452..3e18b2c92 100644 --- a/modules/entertainment/room.go +++ b/modules/entertainment/room.go @@ -6,6 +6,7 @@ import ( "go_dreamfactory/lego/sys/timewheel" "go_dreamfactory/modules" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" "time" "go.mongodb.org/mongo-driver/bson/primitive" @@ -473,22 +474,42 @@ func (this *Room) GameOver() (errdata *pb.ErrorData) { var ( atno []*pb.UserAtno winindex int32 + bReward bool + res []*cfg.Gameatn ) if this.operatetimer != nil { timewheel.Remove(this.operatetimer) } var winner string winner = this.player1.Uid - + bReward = true if this.player1.Score < this.player2.Score { winner = this.player2.Uid winindex = 1 - } - if conf, err := this.module.configure.GetGameConsumeintegral(this.player1.Score); err != nil { - if errdata, atno = this.module.DispenseAtno(this.szSession[winindex], conf.Rewards, true); errdata != nil { - return + if len(this.szSession) == 1 { // 赢家是AI 的话不发奖 + bReward = false } } + + if conf, err := this.module.configure.GetGameConsumeintegral(this.player1.Score); err == nil { + res = append(res, conf.Onereward...) + res = append(res, conf.Rewards...) + if bReward { // 发奖 + if errdata, atno = this.module.DispenseAtno(this.szSession[winindex], res, true); errdata != nil { + return + } + } else { // AI 不发将 构建一个atno对象 + for _, v := range res { + atno = append(atno, &pb.UserAtno{ + A: v.A, + T: v.T, + N: v.N, + O: "", + }) + } + } + } + this.module.SendMsgSyncToSession(string(this.module.GetType()), "gameover", &pb.EntertainGameOverPush{ User1: this.player1, User2: this.player2,