This commit is contained in:
liwei1dao 2023-10-26 09:25:30 +08:00
commit 0034cea756
9 changed files with 574 additions and 194 deletions

View File

@ -18,41 +18,30 @@ func (this *apiComp) MatchCheck(session comm.IUserSession, req *pb.EntertainMatc
}
func (this *apiComp) Match(session comm.IUserSession, req *pb.EntertainMatchReq) (errdata *pb.ErrorData) {
var (
//bMatch bool
s2 comm.IUserSession
p1 *pb.PlayerData // 玩家1
p2 *pb.PlayerData // 玩家2
roomid string
user *pb.DBUser
err error
)
// 暂时只做机器人
if robots, err := this.module.ModuleTools.RandRobotConfig(1); err == nil {
if len(robots) > 0 {
p2 = &pb.PlayerData{
Uid: "999", // AI uid 暂定
Name: robots[0].Name,
Score: 0,
Ps: 0,
Cardid: "27000001", // 机器人临时数据
}
}
}
if u, err := this.module.ModuleUser.GetUser(session.GetUserId()); err == nil {
p1 = &pb.PlayerData{
Uid: session.GetUserId(), // AI uid 暂定
Name: u.Name,
Score: 0,
Ps: 0,
Cardid: "27000001", // 机器人临时数据
}
}
user, err = this.module.ModuleUser.GetUser(session.GetUserId())
if err != nil {
}
this.module.match.MatchReq(&pb.DBXXLMatch{
Userinfo: &pb.BaseUserInfo{
Uid: user.Uid,
Sid: user.Sid,
Name: user.Name,
Gender: 0,
Skin: user.CurSkin,
Aframe: "",
Title: user.Curtitle,
Lv: user.Lv,
},
Cardid: req.Idcard,
})
roomid = this.module.gameMgr.CreateRoom(session, s2, p1, p2)
session.SendMsg(string(this.module.GetType()), "match", &pb.EntertainMatchResp{
Maych: true,
Player: p2,
Roomid: roomid,
Maych: true,
})
return
}

View File

@ -0,0 +1,27 @@
package entertainment
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//参数校验
func (this *apiComp) ReconnectCheck(session comm.IUserSession, req *pb.EntertainReconnectReq) (errdata *pb.ErrorData) {
if req.Roomid == "" {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
}
}
return
}
func (this *apiComp) Reconnect(session comm.IUserSession, req *pb.EntertainReconnectReq) (errdata *pb.ErrorData) {
//重连消息
if errdata = this.module.gameMgr.RoomDistribute(req.Roomid, session, "reconnect", req); errdata == nil {
return
}
return
}

View File

@ -28,14 +28,14 @@ func (this *gameMgrComp) Init(service core.IService, module core.IModule, comp c
return
}
func (this *gameMgrComp) CreateRoom(s1 comm.IUserSession, s2 comm.IUserSession, p1 *pb.PlayerData, p2 *pb.PlayerData) (roomid string) {
room := new(Room) //初始化房间
room = room.InitRoom(this.module, s1, s2, p1, p2)
func (this *gameMgrComp) CreateRoom(p1 *pb.PlayerData, p2 *pb.PlayerData) (room *Room) {
room = new(Room) //初始化房间
room = room.InitRoom(this.module, p1, p2)
this.lock.Lock()
this.rooms[room.Id] = room
this.lock.Unlock()
return room.Id
return room
}
func (this *gameMgrComp) CloseRoom(id string) {

View File

@ -36,7 +36,6 @@ func (this *matchComp) Start() (err error) {
func (this *matchComp) MatchReq(v *pb.DBXXLMatch) (err error) {
data, _ := anypb.New(v)
this.module.service.Destroy()
err = this.module.service.RpcCall(
context.Background(),
comm.Service_Mainte,
@ -46,7 +45,7 @@ func (this *matchComp) MatchReq(v *pb.DBXXLMatch) (err error) {
Uid: v.Userinfo.Uid,
Data: data,
Matchnum: 2, // 匹配数量2
Timeout: 10,
Timeout: 5,
},
&pb.JoinMatchPoolResp{})
if err != nil {
@ -101,7 +100,9 @@ func (this *matchComp) MatchNotic(players map[string]interface{}) (err error) {
}
}
}
//roomid := this.module.gameMgr.CreateRoom(p1, p2)
go func() {
this.module.gameMgr.CreateRoom(p1, p2)
}()
return
}

View File

@ -2,7 +2,6 @@ package entertainment
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
@ -15,7 +14,7 @@ func NewModule() core.IModule {
type Entertainment struct {
modules.ModuleBase
service base.IRPCXService
service comm.IService
api *apiComp
configure *configureComp
model *modelComp
@ -34,7 +33,7 @@ func (this *Entertainment) Init(service core.IService, module core.IModule, opti
if err = this.ModuleBase.Init(service, module, options); err != nil {
return
}
this.service = service.(base.IRPCXService)
this.service = service.(comm.IService)
return
}

View File

@ -1,6 +1,7 @@
package entertainment
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/timewheel"
"go_dreamfactory/modules"
@ -79,22 +80,36 @@ func (this *Room) operateTimeOut(task *timewheel.Task, args ...interface{}) {
// 变更权限
this.curPower = this.NexPower
if this.round > this.MaxRound { // 游戏结束
this.GameOver()
if this.player1.Score == this.player2.Score {
this.MaxRound += 1 // 增加一回合
} else {
this.GameOver()
}
return
}
}
func (this *Room) InitRoom(module *Entertainment, s1 comm.IUserSession, s2 comm.IUserSession, p1 *pb.PlayerData, p2 *pb.PlayerData) *Room {
func (this *Room) InitRoom(module *Entertainment, p1 *pb.PlayerData, p2 *pb.PlayerData) *Room {
var room *Room
this.module = module
this.chessboard = new(MapData)
this.chessboard.InitMap(module) // 初始化棋盘
if s1, ok := this.module.GetUserSession(p1.Uid); !ok {
this.module.PutUserSession(s1)
} else {
this.szSession = append(this.szSession, s1.Clone())
}
this.szSession = append(this.szSession, s1.Clone())
if p2.Uid != "999" { // 是否是机器人
this.szSession = append(this.szSession, s2.Clone())
if s2, ok := this.module.GetUserSession(p2.Uid); !ok {
this.module.PutUserSession(s2)
} else {
this.szSession = append(this.szSession, s2.Clone())
}
}
this.MaxRound = module.ModuleTools.GetGlobalConf().ConsumeRounds
return &Room{
room = &Room{
ModuleBase: modules.ModuleBase{},
Id: primitive.NewObjectID().Hex(),
szSession: this.szSession,
@ -105,6 +120,16 @@ func (this *Room) InitRoom(module *Entertainment, s1 comm.IUserSession, s2 comm.
round: 1,
MaxRound: this.MaxRound,
}
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "enterroom", &pb.EntertainEnterRoomPush{
Rooid: room.Id,
Servepath: fmt.Sprintf("%s/%s", this.module.service.GetType(), this.module.service.GetId()),
User1: room.player1,
User2: room.player2,
}, this.szSession...); err != nil {
this.Errorln(err)
}
return room
}
// AI 操作了
@ -117,7 +142,6 @@ func (this *Room) AiOperator() {
oid2 int32
)
this.module.Debugf("AI 操作\n")
this.player2.Ps--
if this.player2.Ps <= 0 { // 权限给下一个人
this.NexPower = this.player1.Uid
@ -125,14 +149,18 @@ func (this *Room) AiOperator() {
this.player1.Ps = MaxPs
// 交换元素
curScore, szMap, oid1, oid2, bAddPs = this.chessboard.AiSwapGirde()
szMap, oid1, oid2, bAddPs = this.chessboard.AiSwapGirde()
if this.NexPower != this.curPower {
this.round++
}
if len(szMap) > 0 {
this.player2.Energy += szMap[len(szMap)-1].CurEnergy
this.player2.Score += szMap[len(szMap)-1].CurSocre
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
}
if bAddPs {
@ -171,7 +199,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
switch stype {
case "operator": // 操作消息
var (
curScore int32
curScore int32 // 该次操作的得分
AIOperator bool
oid1 int32 // 唯一id
oid2 int32
@ -206,16 +234,18 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
}
if this.player1.Energy >= conf.Skillload {
this.player1.Energy = 0 // 清零
if score, m := this.chessboard.SkillUp(conf.Skilleffect, conf.Skillvalue); score > 0 {
curScore += score
if m := this.chessboard.SkillUp(conf.Skilleffect, conf.Skillvalue); len(m) > 0 {
szMap = append(szMap, m...)
} else {
szMap = append(szMap, &pb.MapData{
Data: this.chessboard.GetPalatData(),
})
}
this.player1.Score += curScore
for _, v := range szMap {
curScore += v.CurSocre
this.player1.Score += v.CurSocre
v.CurSocre = this.player1.Score
}
} else {
errdata = &pb.ErrorData{
@ -236,16 +266,18 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
}
if this.player2.Energy >= conf.Skillload {
this.player2.Energy = 0 // 清零
if score, m := this.chessboard.SkillUp(conf.Skilleffect, conf.Skillvalue); score > 0 {
curScore += score
if m := this.chessboard.SkillUp(conf.Skilleffect, conf.Skillvalue); len(m) > 0 {
szMap = append(szMap, m...)
} else {
szMap = append(szMap, &pb.MapData{
Data: this.chessboard.GetPalatData(),
})
}
this.player2.Score += curScore
for _, v := range szMap {
curScore += v.CurSocre
this.player2.Score += v.CurSocre
v.CurSocre = this.player2.Score
}
} else {
errdata = &pb.ErrorData{
@ -283,8 +315,8 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
return
}
if score, m, b := this.chessboard.CheckMap(color); score > 0 {
curScore += score
if m, b := this.chessboard.CheckMap(color, true); len(m) > 0 {
// curScore += score
szMap = append(szMap, m...)
bAddPs = b
} else { // 不能消除
@ -317,15 +349,25 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
}
this.player1.Ps = MaxPs
}
if len(szMap) > 0 {
for _, v := range szMap { //
curScore += v.CurSocre
if color == 1 {
this.player1.Energy += szMap[len(szMap)-1].CurEnergy
this.player1.Score += szMap[len(szMap)-1].CurSocre
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.Energy += szMap[len(szMap)-1].CurEnergy
this.player2.Score += szMap[len(szMap)-1].CurSocre
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
@ -391,6 +433,10 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
this.rd2 = true
}
if this.rd1 && this.rd2 { // 两个玩家都准备好了 那么就开始游戏
this.NexPower = this.player1.Uid
this.curPower = this.player1.Uid
this.player1.Ps = MaxPs
this.player2.Ps = MaxPs
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "startgame", &pb.EntertainStartGamePush{
User1: this.player1,
User2: this.player2,
@ -401,9 +447,25 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
}, this.szSession...); err != nil {
this.Errorln(err)
}
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut)
}
}
case "reconnect": // 重连
session.SendMsg(string(this.module.GetType()), "reconnect", &pb.EntertainReconnectResp{
Roomid: this.Id,
Mpadata: &pb.MapData{
Data: this.chessboard.GetPalatData(),
CurSocre: 0,
CurEnergy: 0,
},
Power: this.NexPower,
Curpower: this.curPower,
Score: 0,
Round: this.round,
User1: this.player1,
User2: this.player2,
})
}
return
@ -414,6 +476,10 @@ func (this *Room) GameOver() (errdata *pb.ErrorData) {
if this.operatetimer != nil {
timewheel.Remove(this.operatetimer)
}
var winner string
if this.player1.Score > this.player2.Score {
winner = this.player1.Uid
}
this.module.SendMsgSyncToSession(string(this.module.GetType()), "gameover", &pb.EntertainGameOverPush{
User1: this.player1,
User2: this.player2,
@ -422,6 +488,7 @@ func (this *Room) GameOver() (errdata *pb.ErrorData) {
},
Power: "", // 清理权限
Round: this.round,
Win: winner,
}, this.szSession...)
return
}

View File

@ -42,7 +42,7 @@ func GetRandType() int32 {
func (this *MapData) CreateGride(index int32) *pb.GirdeData {
t := GetRandType()
fmt.Printf("create=====index: %d, color:%d \n", index, t)
//fmt.Printf("create=====index: %d, color:%d \n", index, t)
this.oid++
return &pb.GirdeData{
Oid: this.oid,
@ -440,34 +440,34 @@ func (this *MapData) Check3X(color int32) (bEliminate bool, score int32, count i
// 校验地图可消除的 判断各组上面2个和右边两个是否三个相等
// xc 判断用来是否加体力
func (this *MapData) CheckMap(color int32) (score int32, szMap []*pb.MapData, xc bool) {
func (this *MapData) CheckMap(color int32, bSkill bool) (szMap []*pb.MapData, xc bool) {
var curScore int32
var energy int32
for {
curScore = 0
energy = 0
if bRet, s, c := this.Check5X(color); bRet {
//fmt.Printf("=====检测消除5x===========\n")
curScore += s
energy += c
xc = true // 只要有 4x 5x 就标记ture
}
if bRet, s, c := this.Check4X(color); bRet {
//fmt.Printf("=====检测消除4x===========\n")
curScore += s
energy += c
xc = true
}
if bRet, s, c := this.Check3X(color); bRet {
//fmt.Printf("=====检测消除3x===========\n")
curScore += s
energy += c
}
score += curScore // 总分
if this.DropGirde() {
if !bSkill {
energy = 0
}
szMap = append(szMap, &pb.MapData{
Data: this.GetPalatData(),
CurSocre: score,
CurSocre: curScore,
CurEnergy: energy,
})
}
@ -523,7 +523,7 @@ func (this *MapData) GetPalatData() (data []*pb.GirdeData) {
}
// ai操作
func (this *MapData) AiSwapGirde() (score int32, szMap []*pb.MapData, oid1 int32, oid2 int32, bAddPs bool) {
func (this *MapData) AiSwapGirde() (szMap []*pb.MapData, oid1 int32, oid2 int32, bAddPs bool) {
for pos := 0; pos < Total; pos++ {
y := pos % Height
@ -531,13 +531,13 @@ func (this *MapData) AiSwapGirde() (score int32, szMap []*pb.MapData, oid1 int32
if b := this.SwapGirde(int32(pos), int32(pos+1)); b {
oid1 = this.Plat[pos+1].Oid
oid2 = this.Plat[pos].Oid
if s, m, b := this.CheckMap(2); s == 0 {
if m, b := this.CheckMap(2, true); len(m) == 0 {
this.SwapGirde(int32(pos+1), int32(pos))
this.operElem = []int32{}
oid1 = 0
oid2 = 0
} else {
score += s
szMap = append(szMap, m...)
bAddPs = b
break
@ -548,34 +548,34 @@ func (this *MapData) AiSwapGirde() (score int32, szMap []*pb.MapData, oid1 int32
if b := this.SwapGirde(int32(pos), int32(pos+Width)); b {
oid1 = this.Plat[pos+Width].Oid
oid2 = this.Plat[pos].Oid
if s, m, b := this.CheckMap(2); s == 0 {
if m, b := this.CheckMap(2, true); len(m) == 0 {
this.SwapGirde(int32(pos+Width), int32(pos))
this.operElem = []int32{}
oid1 = 0
oid2 = 0
} else {
szMap = append(szMap, m...)
score += s
bAddPs = b
break
}
}
}
}
return
}
// 释放技能 技能id 和参数
func (this *MapData) SkillUp(skillid int32, value int32) (score int32, szMap []*pb.MapData) {
func (this *MapData) SkillUp(skillid int32, value int32) (szMap []*pb.MapData) {
if skillid == 1 { // 随机消除盘面上X个方块
ids := utils.RandomNumbers(0, Total-1, int(value))
for _, id := range ids {
this.Plat[id] = &pb.GirdeData{}
}
if this.DropGirde() {
score, szMap, _ = this.CheckMap(1)
szMap, _ = this.CheckMap(1, false)
}
}
return
}

View File

@ -86,24 +86,24 @@ func Test_Main(t *testing.T) {
m.InitMap(nil)
m.SetMap()
var szMap []*pb.MapData
//var szMap []*pb.MapData
// if bSwap, m := m.AiSwapGirde(); bSwap {
// szMap = append(szMap, m...)
// }
m.SkillUp(1, 7)
m.SwapGirde(1, 8)
m.CheckMap(1)
//m.CheckMap(1)
m.DropGirde()
if score, m, _ := m.CheckMap(1); score > 0 {
// if m, _ := m.CheckMap(1, true); score > 0 {
szMap = append(szMap, m...)
}
// szMap = append(szMap, m...)
// }
m.SwapGirde(1, 11)
m.DropGirde()
m.CheckMap(1)
//m.CheckMap(1)
time.Sleep(time.Second * 2000)

View File

@ -74,9 +74,7 @@ type EntertainMatchResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Maych bool `protobuf:"varint,1,opt,name=maych,proto3" json:"maych"` // 匹配成功
Player *PlayerData `protobuf:"bytes,2,opt,name=player,proto3" json:"player"` // 玩家信息
Roomid string `protobuf:"bytes,3,opt,name=roomid,proto3" json:"roomid"` // 房间id
Maych bool `protobuf:"varint,1,opt,name=maych,proto3" json:"maych"` // 匹配成功
}
func (x *EntertainMatchResp) Reset() {
@ -118,20 +116,6 @@ func (x *EntertainMatchResp) GetMaych() bool {
return false
}
func (x *EntertainMatchResp) GetPlayer() *PlayerData {
if x != nil {
return x.Player
}
return nil
}
func (x *EntertainMatchResp) GetRoomid() string {
if x != nil {
return x.Roomid
}
return ""
}
// 进入场景发送准备
type EntertainReadyReq struct {
state protoimpl.MessageState
@ -239,6 +223,7 @@ 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() {
@ -315,6 +300,13 @@ 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
@ -566,6 +558,7 @@ type EntertainGameOverPush struct {
Mpadata *MapData `protobuf:"bytes,3,opt,name=mpadata,proto3" json:"mpadata"` // 地图数据
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"` // 谁赢了
}
func (x *EntertainGameOverPush) Reset() {
@ -635,82 +628,340 @@ func (x *EntertainGameOverPush) GetRound() int32 {
return 0
}
func (x *EntertainGameOverPush) GetWin() string {
if x != nil {
return x.Win
}
return ""
}
type EntertainEnterRoomPush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Rooid string `protobuf:"bytes,1,opt,name=rooid,proto3" json:"rooid"`
Servepath string `protobuf:"bytes,2,opt,name=servepath,proto3" json:"servepath"`
User1 *PlayerData `protobuf:"bytes,3,opt,name=user1,proto3" json:"user1"`
User2 *PlayerData `protobuf:"bytes,4,opt,name=user2,proto3" json:"user2"`
}
func (x *EntertainEnterRoomPush) Reset() {
*x = EntertainEnterRoomPush{}
if protoimpl.UnsafeEnabled {
mi := &file_entertain_entertain_msg_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EntertainEnterRoomPush) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EntertainEnterRoomPush) ProtoMessage() {}
func (x *EntertainEnterRoomPush) ProtoReflect() protoreflect.Message {
mi := &file_entertain_entertain_msg_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EntertainEnterRoomPush.ProtoReflect.Descriptor instead.
func (*EntertainEnterRoomPush) Descriptor() ([]byte, []int) {
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{9}
}
func (x *EntertainEnterRoomPush) GetRooid() string {
if x != nil {
return x.Rooid
}
return ""
}
func (x *EntertainEnterRoomPush) GetServepath() string {
if x != nil {
return x.Servepath
}
return ""
}
func (x *EntertainEnterRoomPush) GetUser1() *PlayerData {
if x != nil {
return x.User1
}
return nil
}
func (x *EntertainEnterRoomPush) GetUser2() *PlayerData {
if x != nil {
return x.User2
}
return nil
}
// 断线重连
type EntertainReconnectReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"`
}
func (x *EntertainReconnectReq) Reset() {
*x = EntertainReconnectReq{}
if protoimpl.UnsafeEnabled {
mi := &file_entertain_entertain_msg_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EntertainReconnectReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EntertainReconnectReq) ProtoMessage() {}
func (x *EntertainReconnectReq) ProtoReflect() protoreflect.Message {
mi := &file_entertain_entertain_msg_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EntertainReconnectReq.ProtoReflect.Descriptor instead.
func (*EntertainReconnectReq) Descriptor() ([]byte, []int) {
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{10}
}
func (x *EntertainReconnectReq) GetRoomid() string {
if x != nil {
return x.Roomid
}
return ""
}
type EntertainReconnectResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"`
Mpadata *MapData `protobuf:"bytes,2,opt,name=mpadata,proto3" json:"mpadata"` // 地图数据
Power string `protobuf:"bytes,3,opt,name=power,proto3" json:"power"` //下一个谁操作
Curpower string `protobuf:"bytes,4,opt,name=curpower,proto3" json:"curpower"` //当前谁操作
Score int32 `protobuf:"varint,5,opt,name=score,proto3" json:"score"` // 获得积分
Round int32 `protobuf:"varint,6,opt,name=round,proto3" json:"round"` // 轮数
User1 *PlayerData `protobuf:"bytes,7,opt,name=user1,proto3" json:"user1"` // 玩家数据也需要同步
User2 *PlayerData `protobuf:"bytes,8,opt,name=user2,proto3" json:"user2"`
}
func (x *EntertainReconnectResp) Reset() {
*x = EntertainReconnectResp{}
if protoimpl.UnsafeEnabled {
mi := &file_entertain_entertain_msg_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EntertainReconnectResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EntertainReconnectResp) ProtoMessage() {}
func (x *EntertainReconnectResp) ProtoReflect() protoreflect.Message {
mi := &file_entertain_entertain_msg_proto_msgTypes[11]
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 EntertainReconnectResp.ProtoReflect.Descriptor instead.
func (*EntertainReconnectResp) Descriptor() ([]byte, []int) {
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{11}
}
func (x *EntertainReconnectResp) GetRoomid() string {
if x != nil {
return x.Roomid
}
return ""
}
func (x *EntertainReconnectResp) GetMpadata() *MapData {
if x != nil {
return x.Mpadata
}
return nil
}
func (x *EntertainReconnectResp) GetPower() string {
if x != nil {
return x.Power
}
return ""
}
func (x *EntertainReconnectResp) GetCurpower() string {
if x != nil {
return x.Curpower
}
return ""
}
func (x *EntertainReconnectResp) GetScore() int32 {
if x != nil {
return x.Score
}
return 0
}
func (x *EntertainReconnectResp) GetRound() int32 {
if x != nil {
return x.Round
}
return 0
}
func (x *EntertainReconnectResp) GetUser1() *PlayerData {
if x != nil {
return x.User1
}
return nil
}
func (x *EntertainReconnectResp) GetUser2() *PlayerData {
if x != nil {
return x.User2
}
return nil
}
var File_entertain_entertain_msg_proto protoreflect.FileDescriptor
var file_entertain_entertain_msg_proto_rawDesc = []byte{
0x0a, 0x1d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x2f, 0x65, 0x6e, 0x74, 0x65,
0x72, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x1c, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x2f, 0x65, 0x6e, 0x74, 0x65, 0x72,
0x74, 0x61, 0x69, 0x6e, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a,
0x11, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52,
0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x69, 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, 0x67, 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, 0x12, 0x23, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44,
0x61, 0x74, 0x61, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x72,
0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f,
0x6d, 0x69, 0x64, 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, 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,
0x74, 0x61, 0x69, 0x6e, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63,
0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x11, 0x45, 0x6e, 0x74,
0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16,
0x0a, 0x06, 0x69, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
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,
0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b,
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,
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, 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, 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, 0xad, 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, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x32, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
@ -725,7 +976,7 @@ 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, 9)
var file_entertain_entertain_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_entertain_entertain_msg_proto_goTypes = []interface{}{
(*EntertainMatchReq)(nil), // 0: EntertainMatchReq
(*EntertainMatchResp)(nil), // 1: EntertainMatchResp
@ -736,25 +987,34 @@ var file_entertain_entertain_msg_proto_goTypes = []interface{}{
(*EntertainOperatorResp)(nil), // 6: EntertainOperatorResp
(*EntertainOperatorRstPush)(nil), // 7: EntertainOperatorRstPush
(*EntertainGameOverPush)(nil), // 8: EntertainGameOverPush
(*PlayerData)(nil), // 9: PlayerData
(*MapData)(nil), // 10: MapData
(*EntertainEnterRoomPush)(nil), // 9: EntertainEnterRoomPush
(*EntertainReconnectReq)(nil), // 10: EntertainReconnectReq
(*EntertainReconnectResp)(nil), // 11: EntertainReconnectResp
(*PlayerData)(nil), // 12: PlayerData
(*MapData)(nil), // 13: MapData
(*UserAtno)(nil), // 14: UserAtno
}
var file_entertain_entertain_msg_proto_depIdxs = []int32{
9, // 0: EntertainMatchResp.player:type_name -> PlayerData
9, // 1: EntertainStartGamePush.user1:type_name -> PlayerData
9, // 2: EntertainStartGamePush.user2:type_name -> PlayerData
10, // 3: EntertainStartGamePush.mpadata:type_name -> MapData
10, // 4: EntertainOperatorRstPush.mpadata:type_name -> MapData
9, // 5: EntertainOperatorRstPush.user1:type_name -> PlayerData
9, // 6: EntertainOperatorRstPush.user2:type_name -> PlayerData
9, // 7: EntertainGameOverPush.user1:type_name -> PlayerData
9, // 8: EntertainGameOverPush.user2:type_name -> PlayerData
10, // 9: EntertainGameOverPush.mpadata:type_name -> MapData
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
10, // [10:10] is the sub-list for extension extendee
0, // [0:10] is the sub-list for field type_name
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
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
15, // [15:15] is the sub-list for extension extendee
0, // [0:15] is the sub-list for field type_name
}
func init() { file_entertain_entertain_msg_proto_init() }
@ -763,6 +1023,7 @@ func file_entertain_entertain_msg_proto_init() {
return
}
file_entertain_entertain_db_proto_init()
file_comm_proto_init()
if !protoimpl.UnsafeEnabled {
file_entertain_entertain_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EntertainMatchReq); i {
@ -872,6 +1133,42 @@ func file_entertain_entertain_msg_proto_init() {
return nil
}
}
file_entertain_entertain_msg_proto_msgTypes[9].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[10].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[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EntertainReconnectResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -879,7 +1176,7 @@ func file_entertain_entertain_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_entertain_entertain_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumMessages: 12,
NumExtensions: 0,
NumServices: 0,
},