From 958a3b1ba4c2dbe3fa66eee19da998c6daab2c4b Mon Sep 17 00:00:00 2001 From: kxdd Date: Fri, 30 Aug 2024 11:56:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A8=83=E5=A8=83=E6=9C=BA=E7=AD=89=E5=BE=85?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamerule/clawdoll/constants.go | 7 +- gamesrv/clawdoll/player_clawdoll.go | 2 - gamesrv/clawdoll/scene_clawdoll.go | 34 ++- gamesrv/clawdoll/scenepolicy_clawdoll.go | 112 ++++++++- protocol/clawdoll/clawdoll.pb.go | 297 +++++++++++++++++------ protocol/clawdoll/clawdoll.proto | 21 +- 6 files changed, 390 insertions(+), 83 deletions(-) diff --git a/gamerule/clawdoll/constants.go b/gamerule/clawdoll/constants.go index b207785..b1c0813 100644 --- a/gamerule/clawdoll/constants.go +++ b/gamerule/clawdoll/constants.go @@ -33,9 +33,10 @@ const ( // 玩家操作 const ( - ClawDollPlayerOpPayCoin = iota + 1 // 上分 投币 - ClawDollPlayerOpGo // 下抓 - ClawDollPlayerOpMove // 玩家操控动作 // 1-前 2-后 3-左 4-右 + ClawDollPlayerOpPayCoin = iota + 1 // 上分 投币 + ClawDollPlayerOpGo // 下抓 + ClawDollPlayerOpMove // 玩家操控动作 // 1-前 2-后 3-左 4-右 + ClawDollPlayerCancelPayCoin // 取消投币 ) // 1-前 2-后 3-左 4-右 5-投币 diff --git a/gamesrv/clawdoll/player_clawdoll.go b/gamesrv/clawdoll/player_clawdoll.go index 18d6283..34f3441 100644 --- a/gamesrv/clawdoll/player_clawdoll.go +++ b/gamesrv/clawdoll/player_clawdoll.go @@ -1,7 +1,6 @@ package clawdoll import ( - rule "mongo.games.com/game/gamerule/clawdoll" "mongo.games.com/game/gamesrv/base" "mongo.games.com/goserver/core/logger" ) @@ -63,7 +62,6 @@ func (this *PlayerEx) ReStartGame() { this.gainCoin = 0 this.taxCoin = 0 this.odds = 0 - this.clawDollState = rule.ClawDollPlayerStateWait } // 初始化 diff --git a/gamesrv/clawdoll/scene_clawdoll.go b/gamesrv/clawdoll/scene_clawdoll.go index f43ee22..3347ea6 100644 --- a/gamesrv/clawdoll/scene_clawdoll.go +++ b/gamesrv/clawdoll/scene_clawdoll.go @@ -73,16 +73,37 @@ func (this *SceneEx) delPlayer(p *base.Player) { } } +// 广播玩家进入 +func (this *SceneEx) BroadcastPlayerEnter(p *base.Player, reason int) { + pack := &clawdoll.SCCLAWDOLLPlayerEnter{} + + pack.Data = &clawdoll.CLAWDOLLPlayerDigestInfo{} + + pack.Data.SnId = p.GetSnId() + pack.Data.Head = p.Head + pack.Data.HeadUrl = p.HeadUrl + pack.Data.Name = p.Name + + proto.SetDefaults(pack) + + this.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PlayerEnter), pack, p.GetSid()) +} + // 广播玩家离开 func (this *SceneEx) BroadcastPlayerLeave(p *base.Player, reason int) { scLeavePack := &clawdoll.SCCLAWDOLLPlayerLeave{ - Pos: proto.Int(p.GetPos()), + SnId: proto.Int32(p.SnId), } proto.SetDefaults(scLeavePack) this.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PlayerLeave), scLeavePack, p.GetSid()) } +// 玩家进入事件 +func (this *SceneEx) OnPlayerEnter(p *base.Player, reason int) { + this.BroadcastPlayerEnter(p, reason) +} + // 玩家离开事件 func (this *SceneEx) OnPlayerLeave(p *base.Player, reason int) { this.delPlayer(p) @@ -309,6 +330,17 @@ func (this *SceneEx) SetPlayingState(state int32) { playerEx := this.players[this.playingSnid] if playerEx != nil { + oldState := playerEx.GetClawState() + if oldState != state { + if oldState == rule.ClawDollPlayerStateWait && (state >= rule.ClawDollPlayerStateStart && state <= rule.ClawDollPlayerWaitPayCoin) { + ClawdollBroadcastPlayingInfo(this.Scene) + } + + if state == rule.ClawDollPlayerStateWait && (oldState >= rule.ClawDollPlayerStateStart && oldState <= rule.ClawDollPlayerWaitPayCoin) { + ClawdollBroadcastPlayingInfo(this.Scene) + } + } + playerEx.SetClawState(state) } } diff --git a/gamesrv/clawdoll/scenepolicy_clawdoll.go b/gamesrv/clawdoll/scenepolicy_clawdoll.go index ec08dd2..4128a09 100644 --- a/gamesrv/clawdoll/scenepolicy_clawdoll.go +++ b/gamesrv/clawdoll/scenepolicy_clawdoll.go @@ -112,6 +112,11 @@ func (this *PolicyClawdoll) OnPlayerEnter(s *base.Scene, p *base.Player) { //给自己发送房间信息 this.SendRoomInfo(s, p, sceneEx) + ClawdollBroadcastRoomWaitPlayers(s) + ClawdollBroadcastPlayingInfo(s) + + // 玩家数据发送 + sceneEx.OnPlayerEnter(p, 0) s.FirePlayerEvent(p, base.PlayerEventEnter, nil) } } @@ -166,6 +171,8 @@ func (this *PolicyClawdoll) OnPlayerRehold(s *base.Scene, p *base.Player) { p.MarkFlag(base.PlayerState_Ready) } this.SendRoomInfo(s, p, sceneEx) + ClawdollBroadcastRoomWaitPlayers(s) + ClawdollBroadcastPlayingInfo(s) s.FirePlayerEvent(p, base.PlayerEventRehold, nil) } } @@ -183,6 +190,9 @@ func (this *PolicyClawdoll) OnPlayerReturn(s *base.Scene, p *base.Player) { p.MarkFlag(base.PlayerState_Ready) } this.SendRoomInfo(s, p, sceneEx) + ClawdollBroadcastRoomWaitPlayers(s) + ClawdollBroadcastPlayingInfo(s) + s.FirePlayerEvent(p, base.PlayerEventReturn, nil) } } @@ -273,11 +283,65 @@ func ClawdollSendPlayerInfo(s *base.Scene) { GainCoin: proto.Int64(playerEx.gainCoin), } + proto.SetDefaults(pack) + playerEx.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYERINFO), pack) } } } +// 广播房间里所有等待玩家信息 +func ClawdollBroadcastRoomWaitPlayers(s *base.Scene) { + pack := &clawdoll.CLAWDOLLWaitPlayers{} + + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + for _, playerEx := range sceneEx.players { + // 玩家信息 + if playerEx.SnId != sceneEx.playingSnid { + pd := &clawdoll.CLAWDOLLPlayerDigestInfo{ + SnId: proto.Int32(playerEx.SnId), + Head: proto.Int32(playerEx.Head), + HeadUrl: proto.String(playerEx.HeadUrl), + Name: proto.String(playerEx.Name), + } + + pack.WaitPlayersInfo = append(pack.WaitPlayersInfo, pd) + } + } + + s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_WAITPLAYERS), pack, 0) + } +} + +// 广播房间正在控制娃娃机的玩家信息 +func ClawdollBroadcastPlayingInfo(s *base.Scene) { + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + + if !sceneEx.IsHasPlaying() { + pack := &clawdoll.CLAWDOLLPlayerDigestInfo{ + SnId: proto.Int32(0), + Head: proto.Int32(0), + } + + s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYINGINFO), pack, 0) + return + } + + playerEx := sceneEx.GetPlayingEx() + if playerEx != nil && playerEx.SnId == sceneEx.playingSnid { + pack := &clawdoll.CLAWDOLLPlayerDigestInfo{ + SnId: proto.Int32(playerEx.SnId), + Head: proto.Int32(playerEx.Head), + HeadUrl: proto.String(playerEx.HeadUrl), + Name: proto.String(playerEx.Name), + } + + s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYINGINFO), pack, 0) + //playerEx.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYERINFO), pack) + } + } +} + //===================================== // BaseState 状态基类 //===================================== @@ -426,6 +490,8 @@ func (this *StateWait) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, par ClawdollBroadcastRoomState(s) ClawdollSendPlayerInfo(s) + ClawdollBroadcastPlayingInfo(s) + sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params) } } @@ -636,6 +702,26 @@ func (this *StateBilled) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, p func (this *StateBilled) OnEnter(s *base.Scene) { logger.Logger.Trace("(this *StateBilled) OnEnter, sceneid=", s.GetSceneId()) this.BaseState.OnEnter(s) + + sceneEx, ok := s.ExtraData.(*SceneEx) + if !ok { + return + } + + playerEx := sceneEx.GetPlayingEx() + if playerEx != nil { + pack := &clawdoll.SCCLAWDOLLRoundGameBilled{ + RoundId: proto.Int32(int32(sceneEx.RoundId)), + ClowResult: proto.Int32(0), + Award: proto.Int64(playerEx.gainCoin), + Balance: proto.Int64(playerEx.Coin), + } + + // logger.Logger.Trace("SCSmallRocketRoundGameBilled is pack: ", pack) + proto.SetDefaults(pack) + + playerEx.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_GAMEBILLED), pack) + } } func (this *StateBilled) OnLeave(s *base.Scene) { @@ -661,6 +747,7 @@ func (this *StateBilled) OnTick(s *base.Scene) { ClawdollBroadcastRoomState(s) ClawdollSendPlayerInfo(s) + return } } @@ -729,7 +816,30 @@ func (this *StateWaitPayCoin) OnPlayerOp(s *base.Scene, p *base.Player, opcode i ClawdollSendPlayerInfo(s) sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params) + + case rule.ClawDollPlayerCancelPayCoin: + if sceneEx.playingSnid != playerEx.SnId { + logger.Logger.Trace("StateWaitPayCoin OnPlayerOp-----sceneEx.playingSnid:", sceneEx.playingSnid, " playerEx.SnId: ", playerEx.SnId) + return false + } + + // 先设置时间 + playingEx := sceneEx.GetPlayingEx() + if playingEx != nil { + playingEx.ReStartGame() + ClawdollSendPlayerInfo(s) + } + + // 再重置scene数据 + sceneEx.ReStartGame() + + s.ChangeSceneState(rule.ClawDollSceneStateWait) + sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateWait)) + + ClawdollBroadcastRoomState(s) + ClawdollBroadcastPlayingInfo(s) } + return false } @@ -762,7 +872,7 @@ func (this *StateWaitPayCoin) OnTick(s *base.Scene) { sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateWait)) ClawdollBroadcastRoomState(s) - + ClawdollBroadcastPlayingInfo(s) return } } diff --git a/protocol/clawdoll/clawdoll.pb.go b/protocol/clawdoll/clawdoll.pb.go index b0f6fc1..04e9a9f 100644 --- a/protocol/clawdoll/clawdoll.pb.go +++ b/protocol/clawdoll/clawdoll.pb.go @@ -37,6 +37,7 @@ const ( CLAWDOLLPacketID_PACKET_SC_SENDTOKEN CLAWDOLLPacketID = 5610 // 获取token CLAWDOLLPacketID_PACKET_CS_WAITPLAYERS CLAWDOLLPacketID = 5611 // 获取等待玩家信息 (客户->服务) CLAWDOLLPacketID_PACKET_SC_WAITPLAYERS CLAWDOLLPacketID = 5612 // 获取等待玩家信息 (服务->客户) + CLAWDOLLPacketID_PACKET_SC_PLAYINGINFO CLAWDOLLPacketID = 5613 // 正在控制娃娃机的玩家信息 (服务->客户) ) // Enum value maps for CLAWDOLLPacketID. @@ -55,6 +56,7 @@ var ( 5610: "PACKET_SC_SENDTOKEN", 5611: "PACKET_CS_WAITPLAYERS", 5612: "PACKET_SC_WAITPLAYERS", + 5613: "PACKET_SC_PLAYINGINFO", } CLAWDOLLPacketID_value = map[string]int32{ "PACKET_ZERO": 0, @@ -70,6 +72,7 @@ var ( "PACKET_SC_SENDTOKEN": 5610, "PACKET_CS_WAITPLAYERS": 5611, "PACKET_SC_WAITPLAYERS": 5612, + "PACKET_SC_PLAYINGINFO": 5613, } ) @@ -670,11 +673,10 @@ type SCCLAWDOLLPlayerInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` // 玩家ID - ClawDollState int32 `protobuf:"varint,2,opt,name=clawDollState,proto3" json:"clawDollState,omitempty"` // 玩家状态 - GainCoin int64 `protobuf:"varint,3,opt,name=gainCoin,proto3" json:"gainCoin,omitempty"` // 本局赢取 - Coin int64 `protobuf:"varint,4,opt,name=Coin,proto3" json:"Coin,omitempty"` // 玩家 - Params []int64 `protobuf:"varint,5,rep,packed,name=Params,proto3" json:"Params,omitempty"` //操作参数 + SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` // 玩家ID + ClawDollState int32 `protobuf:"varint,2,opt,name=clawDollState,proto3" json:"clawDollState,omitempty"` // 玩家状态 + GainCoin int64 `protobuf:"varint,3,opt,name=gainCoin,proto3" json:"gainCoin,omitempty"` // 本局赢取 + Coin int64 `protobuf:"varint,4,opt,name=Coin,proto3" json:"Coin,omitempty"` // 玩家 } func (x *SCCLAWDOLLPlayerInfo) Reset() { @@ -737,13 +739,6 @@ func (x *SCCLAWDOLLPlayerInfo) GetCoin() int64 { return 0 } -func (x *SCCLAWDOLLPlayerInfo) GetParams() []int64 { - if x != nil { - return x.Params - } - return nil -} - //玩家进入 //PACKET_SCCLAWDOLLPlayerEnter type SCCLAWDOLLPlayerEnter struct { @@ -751,7 +746,7 @@ type SCCLAWDOLLPlayerEnter struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *CLAWDOLLPlayerData `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` + Data *CLAWDOLLPlayerDigestInfo `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` } func (x *SCCLAWDOLLPlayerEnter) Reset() { @@ -786,7 +781,7 @@ func (*SCCLAWDOLLPlayerEnter) Descriptor() ([]byte, []int) { return file_clawdoll_proto_rawDescGZIP(), []int{7} } -func (x *SCCLAWDOLLPlayerEnter) GetData() *CLAWDOLLPlayerData { +func (x *SCCLAWDOLLPlayerEnter) GetData() *CLAWDOLLPlayerDigestInfo { if x != nil { return x.Data } @@ -800,7 +795,7 @@ type SCCLAWDOLLPlayerLeave struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Pos int32 `protobuf:"varint,1,opt,name=Pos,proto3" json:"Pos,omitempty"` //玩家位置 + SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` //玩家id } func (x *SCCLAWDOLLPlayerLeave) Reset() { @@ -835,9 +830,9 @@ func (*SCCLAWDOLLPlayerLeave) Descriptor() ([]byte, []int) { return file_clawdoll_proto_rawDescGZIP(), []int{8} } -func (x *SCCLAWDOLLPlayerLeave) GetPos() int32 { +func (x *SCCLAWDOLLPlayerLeave) GetSnId() int32 { if x != nil { - return x.Pos + return x.SnId } return 0 } @@ -937,6 +932,125 @@ func (x *SCCLAWDOLLSendToken) GetToken() string { return "" } +type CLAWDOLLWaitPlayers struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WaitPlayersInfo []*CLAWDOLLPlayerDigestInfo `protobuf:"bytes,1,rep,name=WaitPlayersInfo,proto3" json:"WaitPlayersInfo,omitempty"` +} + +func (x *CLAWDOLLWaitPlayers) Reset() { + *x = CLAWDOLLWaitPlayers{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CLAWDOLLWaitPlayers) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CLAWDOLLWaitPlayers) ProtoMessage() {} + +func (x *CLAWDOLLWaitPlayers) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_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 CLAWDOLLWaitPlayers.ProtoReflect.Descriptor instead. +func (*CLAWDOLLWaitPlayers) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{11} +} + +func (x *CLAWDOLLWaitPlayers) GetWaitPlayersInfo() []*CLAWDOLLPlayerDigestInfo { + if x != nil { + return x.WaitPlayersInfo + } + return nil +} + +// 玩家摘要信息 +type CLAWDOLLPlayerDigestInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` //账号 + Head int32 `protobuf:"varint,2,opt,name=Head,proto3" json:"Head,omitempty"` //头像 + HeadUrl string `protobuf:"bytes,3,opt,name=HeadUrl,proto3" json:"HeadUrl,omitempty"` //头像 + Name string `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"` //名字 +} + +func (x *CLAWDOLLPlayerDigestInfo) Reset() { + *x = CLAWDOLLPlayerDigestInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CLAWDOLLPlayerDigestInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CLAWDOLLPlayerDigestInfo) ProtoMessage() {} + +func (x *CLAWDOLLPlayerDigestInfo) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_proto_msgTypes[12] + 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 CLAWDOLLPlayerDigestInfo.ProtoReflect.Descriptor instead. +func (*CLAWDOLLPlayerDigestInfo) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{12} +} + +func (x *CLAWDOLLPlayerDigestInfo) GetSnId() int32 { + if x != nil { + return x.SnId + } + return 0 +} + +func (x *CLAWDOLLPlayerDigestInfo) GetHead() int32 { + if x != nil { + return x.Head + } + return 0 +} + +func (x *CLAWDOLLPlayerDigestInfo) GetHeadUrl() string { + if x != nil { + return x.HeadUrl + } + return "" +} + +func (x *CLAWDOLLPlayerDigestInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + var File_clawdoll_proto protoreflect.FileDescriptor var file_clawdoll_proto_rawDesc = []byte{ @@ -1006,7 +1120,7 @@ var file_clawdoll_proto_rawDesc = []byte{ 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x98, 0x01, 0x0a, + 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x80, 0x01, 0x0a, 0x14, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6c, 0x61, @@ -1014,54 +1128,68 @@ var file_clawdoll_proto_rawDesc = []byte{ 0x52, 0x0d, 0x63, 0x6c, 0x61, 0x77, 0x44, 0x6f, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x67, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x43, - 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x12, - 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, - 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x49, 0x0a, 0x15, 0x53, 0x43, 0x43, 0x4c, 0x41, - 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x30, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x2e, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, - 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x44, 0x61, - 0x74, 0x61, 0x22, 0x29, 0x0a, 0x15, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, - 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x50, - 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x22, 0x2a, 0x0a, + 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x22, + 0x4f, 0x0a, 0x15, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, + 0x6c, 0x2e, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, + 0x22, 0x2b, 0x0a, 0x15, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x12, 0x43, 0x53, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x41, 0x70, 0x70, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2a, 0xe1, 0x02, 0x0a, 0x10, 0x43, 0x4c, 0x41, 0x57, 0x44, - 0x4f, 0x4c, 0x4c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x0f, 0x0a, 0x0b, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x12, - 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x49, 0x4e, - 0x46, 0x4f, 0x10, 0xe1, 0x2b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, - 0x43, 0x53, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe2, 0x2b, 0x12, 0x17, - 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x59, - 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe3, 0x2b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, - 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xe4, - 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x47, - 0x41, 0x4d, 0x45, 0x42, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0xe5, 0x2b, 0x12, 0x1a, 0x0a, 0x15, - 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xe6, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, - 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, - 0x65, 0x10, 0xe7, 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, - 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe8, 0x2b, 0x12, - 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x47, 0x45, 0x54, - 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0xe9, 0x2b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, - 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, - 0xea, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, - 0x57, 0x41, 0x49, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x10, 0xeb, 0x2b, 0x12, 0x1a, - 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x41, 0x49, 0x54, - 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x10, 0xec, 0x2b, 0x2a, 0x64, 0x0a, 0x0c, 0x4f, 0x70, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, - 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, - 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, - 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43, 0x6f, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, - 0x67, 0x68, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x6f, 0x73, - 0x41, 0x6c, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x10, 0x03, - 0x42, 0x28, 0x5a, 0x26, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2f, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x63, 0x0a, 0x13, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, + 0x4c, 0x4c, 0x57, 0x61, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x4c, 0x0a, + 0x0f, 0x57, 0x61, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, + 0x6c, 0x2e, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x57, 0x61, 0x69, 0x74, + 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x70, 0x0a, 0x18, 0x43, + 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x69, 0x67, + 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x48, + 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x48, 0x65, 0x61, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x48, 0x65, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x2a, 0xfd, 0x02, + 0x0a, 0x10, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x49, 0x44, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x5a, 0x45, 0x52, + 0x4f, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, + 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe1, 0x2b, 0x12, 0x17, 0x0a, 0x12, + 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, + 0x4f, 0x50, 0x10, 0xe2, 0x2b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe3, 0x2b, 0x12, 0x18, + 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xe4, 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, + 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x42, 0x49, 0x4c, 0x4c, 0x45, 0x44, + 0x10, 0xe5, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, + 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xe6, 0x2b, 0x12, + 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x10, 0xe7, 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x49, + 0x4e, 0x46, 0x4f, 0x10, 0xe8, 0x2b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, + 0x5f, 0x43, 0x53, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0xe9, 0x2b, 0x12, + 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x45, 0x4e, + 0x44, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0xea, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45, + 0x52, 0x53, 0x10, 0xeb, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x53, 0x43, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x10, 0xec, + 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, + 0x4c, 0x41, 0x59, 0x49, 0x4e, 0x47, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xed, 0x2b, 0x2a, 0x64, 0x0a, + 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, + 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, + 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, + 0x16, 0x0a, 0x12, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43, 0x6f, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x45, + 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x50, 0x52, 0x43, 0x5f, + 0x50, 0x6f, 0x73, 0x41, 0x6c, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x6c, 0x61, 0x79, 0x69, 0x6e, + 0x67, 0x10, 0x03, 0x42, 0x28, 0x5a, 0x26, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1077,7 +1205,7 @@ func file_clawdoll_proto_rawDescGZIP() []byte { } var file_clawdoll_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_clawdoll_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_clawdoll_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_clawdoll_proto_goTypes = []interface{}{ (CLAWDOLLPacketID)(0), // 0: clawdoll.CLAWDOLLPacketID (OpResultCode)(0), // 1: clawdoll.OpResultCode @@ -1092,16 +1220,19 @@ var file_clawdoll_proto_goTypes = []interface{}{ (*SCCLAWDOLLPlayerLeave)(nil), // 10: clawdoll.SCCLAWDOLLPlayerLeave (*CSCLAWDOLLGetToken)(nil), // 11: clawdoll.CSCLAWDOLLGetToken (*SCCLAWDOLLSendToken)(nil), // 12: clawdoll.SCCLAWDOLLSendToken + (*CLAWDOLLWaitPlayers)(nil), // 13: clawdoll.CLAWDOLLWaitPlayers + (*CLAWDOLLPlayerDigestInfo)(nil), // 14: clawdoll.CLAWDOLLPlayerDigestInfo } var file_clawdoll_proto_depIdxs = []int32{ - 2, // 0: clawdoll.SCCLAWDOLLRoomInfo.Players:type_name -> clawdoll.CLAWDOLLPlayerData - 1, // 1: clawdoll.SCCLAWDOLLOp.OpRetCode:type_name -> clawdoll.OpResultCode - 2, // 2: clawdoll.SCCLAWDOLLPlayerEnter.Data:type_name -> clawdoll.CLAWDOLLPlayerData - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 2, // 0: clawdoll.SCCLAWDOLLRoomInfo.Players:type_name -> clawdoll.CLAWDOLLPlayerData + 1, // 1: clawdoll.SCCLAWDOLLOp.OpRetCode:type_name -> clawdoll.OpResultCode + 14, // 2: clawdoll.SCCLAWDOLLPlayerEnter.Data:type_name -> clawdoll.CLAWDOLLPlayerDigestInfo + 14, // 3: clawdoll.CLAWDOLLWaitPlayers.WaitPlayersInfo:type_name -> clawdoll.CLAWDOLLPlayerDigestInfo + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_clawdoll_proto_init() } @@ -1242,6 +1373,30 @@ func file_clawdoll_proto_init() { return nil } } + file_clawdoll_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CLAWDOLLWaitPlayers); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clawdoll_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CLAWDOLLPlayerDigestInfo); 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{ @@ -1249,7 +1404,7 @@ func file_clawdoll_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_clawdoll_proto_rawDesc, NumEnums: 2, - NumMessages: 11, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/protocol/clawdoll/clawdoll.proto b/protocol/clawdoll/clawdoll.proto index 893b281..68e1b44 100644 --- a/protocol/clawdoll/clawdoll.proto +++ b/protocol/clawdoll/clawdoll.proto @@ -17,6 +17,7 @@ enum CLAWDOLLPacketID { PACKET_SC_SENDTOKEN = 5610; // 获取token PACKET_CS_WAITPLAYERS = 5611; // 获取等待玩家信息 (客户->服务) PACKET_SC_WAITPLAYERS = 5612; // 获取等待玩家信息 (服务->客户) + PACKET_SC_PLAYINGINFO = 5613; // 正在控制娃娃机的玩家信息 (服务->客户) } //操作结果 @@ -94,21 +95,19 @@ message SCCLAWDOLLPlayerInfo { int32 clawDollState = 2; // 玩家状态 int64 gainCoin = 3; // 本局赢取 int64 Coin = 4; // 玩家 - - repeated int64 Params = 5; //操作参数 } //玩家进入 //PACKET_SCCLAWDOLLPlayerEnter message SCCLAWDOLLPlayerEnter { - CLAWDOLLPlayerData Data = 1; + CLAWDOLLPlayerDigestInfo Data = 1; } //玩家离开 //PACKET_SCCLAWDOLLPlayerLeave message SCCLAWDOLLPlayerLeave { - int32 Pos = 1; //玩家位置 + int32 SnId = 1; //玩家id } //玩家请求进入视频地址token message CSCLAWDOLLGetToken { @@ -117,4 +116,16 @@ message CSCLAWDOLLGetToken { message SCCLAWDOLLSendToken { string Token = 1; -} \ No newline at end of file +} + +message CLAWDOLLWaitPlayers { + repeated CLAWDOLLPlayerDigestInfo WaitPlayersInfo = 1; +} + +// 玩家摘要信息 +message CLAWDOLLPlayerDigestInfo { + int32 SnId = 1; //账号 + int32 Head = 2; //头像 + string HeadUrl = 3; //头像 + string Name = 4; //名字 +}