From 2568b6614727ed99eb820a2713edb44ad08b763c Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 13 Aug 2024 14:06:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A8=83=E5=A8=83=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public b/public index 3ed239e..682e8f3 160000 --- a/public +++ b/public @@ -1 +1 @@ -Subproject commit 3ed239e304c7e287233a284fe1e3813595d7910f +Subproject commit 682e8f3ccf7d1056210c3ee68c9d1db271d9069d From ed358edfce7f7a98773721273e9a11c2b2d2de96 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 13 Aug 2024 14:04:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A8=83=E5=A8=83=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/constant.go | 2 + data/gameconfig/machine.json | 19 + gamerule/clawdoll/constants.go | 25 + gamerule/clawdoll/logic.go | 4 + gamesrv/action/action_machine.go | 9 + gamesrv/base/srvdatamgrex.go | 2 +- gamesrv/clawdoll/action_clawdoll.go | 55 + gamesrv/clawdoll/player_clawdoll.go | 71 ++ gamesrv/clawdoll/scene_clawdoll.go | 205 +++ gamesrv/clawdoll/scenepolicy_clawdoll.go | 576 +++++++++ gamesrv/machine/action_machine.go | 14 - machine/action/action_server.go | 4 +- ...achineIPConfig.json => machineConfig.json} | 0 machine/machinedoll/command.go | 7 + machine/machinedoll/machinemgr.go | 14 +- protocol/clawdoll/clawdoll.pb.go | 1094 +++++++++++++++++ protocol/clawdoll/clawdoll.proto | 103 ++ protocol/dollmachine/dollmachine.pb.go | 537 ++++++++ .../dollmachine.proto} | 25 +- protocol/gameMachine/machine.pb.go | 594 --------- 20 files changed, 2727 insertions(+), 633 deletions(-) create mode 100644 data/gameconfig/machine.json create mode 100644 gamerule/clawdoll/constants.go create mode 100644 gamerule/clawdoll/logic.go create mode 100644 gamesrv/clawdoll/action_clawdoll.go create mode 100644 gamesrv/clawdoll/player_clawdoll.go create mode 100644 gamesrv/clawdoll/scene_clawdoll.go create mode 100644 gamesrv/clawdoll/scenepolicy_clawdoll.go delete mode 100644 gamesrv/machine/action_machine.go rename machine/{machineIPConfig.json => machineConfig.json} (100%) create mode 100644 protocol/clawdoll/clawdoll.pb.go create mode 100644 protocol/clawdoll/clawdoll.proto create mode 100644 protocol/dollmachine/dollmachine.pb.go rename protocol/{gameMachine/machine.proto => dollmachine/dollmachine.proto} (58%) delete mode 100644 protocol/gameMachine/machine.pb.go diff --git a/common/constant.go b/common/constant.go index 936c429..8e66d95 100644 --- a/common/constant.go +++ b/common/constant.go @@ -86,6 +86,7 @@ const ( GameId_CaoThap = 605 //CaoThap GameId_AngerUncle = 606 // 愤怒大叔 GameId_SmallRoket = 607 // 小火箭 + GameId_Clawdoll = 608 // 娃娃机 __GameId_ThrGame_Min__ = 700 //################三方类################ GameId_Thr_Dg = 701 //DG Game GameId_Thr_XHJ = 901 //DG Game @@ -104,6 +105,7 @@ const ( GameDifTamQuoc = "305" // 百战成神 GameDifFruits = "306" // 水果机 GameDifRichblessed = "307" // 多彩多福 + GameDifClawdoll = "608" // 娃娃机 ) // IsTienLenYuLe TienLen娱乐 diff --git a/data/gameconfig/machine.json b/data/gameconfig/machine.json new file mode 100644 index 0000000..8d4687f --- /dev/null +++ b/data/gameconfig/machine.json @@ -0,0 +1,19 @@ +{ + "GameName":"娃娃机", + "GameId":608, + "GameMode":[0], + "SceneType":[1], + "CanForceStart":false, + "MinPlayerCnt":1, + "DefaultPlayerCnt":1, + "MaxIndex":0, + "TimeFreeStart":0, + "TimeFreeEnd":0, + "DependentPlayerCnt":true, + "EnterAfterStart":false, + "PerGameTakeCard":100, + "ViewLogCnt":-1, + "BetState":0, + "Params":[ + ] +} \ No newline at end of file diff --git a/gamerule/clawdoll/constants.go b/gamerule/clawdoll/constants.go new file mode 100644 index 0000000..5f361d0 --- /dev/null +++ b/gamerule/clawdoll/constants.go @@ -0,0 +1,25 @@ +package clawdoll + +import "time" + +// 场景状态 +const ( + ClawDollSceneStateWait int = iota //等待状态 + ClawDollSceneStateStart //开始倒计时 + ClawDollSceneStatePlayGame //游戏中 + ClawDollSceneStateBilled //结算 + ClawDollSceneStateMax +) + +const ( + ClawDollSceneWaitTimeout = time.Second * 2 //等待倒计时 + ClawDollSceneStartTimeout = time.Second * 6 //开始倒计时 + ClawDollSceneBilledTimeout = time.Second * 2 //结算 +) + +// 玩家操作 +const ( + ClawDollPlayerOpScore = iota + 1 // 上分 + ClawDollPlayerOpGo // 下抓 + ClawDollPlayerOpMove // 移动方向 +) diff --git a/gamerule/clawdoll/logic.go b/gamerule/clawdoll/logic.go new file mode 100644 index 0000000..78f1018 --- /dev/null +++ b/gamerule/clawdoll/logic.go @@ -0,0 +1,4 @@ +package clawdoll + +type Logic struct { +} diff --git a/gamesrv/action/action_machine.go b/gamesrv/action/action_machine.go index b86128a..92d56e6 100644 --- a/gamesrv/action/action_machine.go +++ b/gamesrv/action/action_machine.go @@ -6,8 +6,17 @@ import ( "mongo.games.com/goserver/core/netlib" ) +var MachineMap = make(map[int]string) + func MSDollMachineList(session *netlib.Session, packetId int, data interface{}) error { logger.Logger.Tracef("TestHandler %v", data) + MachineMap = make(map[int]string) + if msg, ok := data.(*machine.MSDollMachineList); ok { + for i, info := range msg.Data { + MachineMap[i+1] = info.VideoAddr + logger.Logger.Tracef("MachineMap[%v] = %v", i, info.VideoAddr) + } + } return nil } diff --git a/gamesrv/base/srvdatamgrex.go b/gamesrv/base/srvdatamgrex.go index e6f700b..bde76d8 100644 --- a/gamesrv/base/srvdatamgrex.go +++ b/gamesrv/base/srvdatamgrex.go @@ -171,7 +171,7 @@ type DB_FishOutMgrEx struct { func (this *DB_FishOutMgrEx) InitFishAppear() { this.FishOutPool = make(map[int32]*AppearFish) for _, v := range srvdata.PBDB_FishOutMgr.Datas.Arr { - logger.Logger.Tracef("初始化房间出鱼列表 fishId = %v", v.Id) + //logger.Logger.Tracef("初始化房间出鱼列表 fishId = %v", v.Id) this.FishOutPool[v.Id] = &AppearFish{ FishId: v.Id, Exp: v.Exp, diff --git a/gamesrv/clawdoll/action_clawdoll.go b/gamesrv/clawdoll/action_clawdoll.go new file mode 100644 index 0000000..591aca8 --- /dev/null +++ b/gamesrv/clawdoll/action_clawdoll.go @@ -0,0 +1,55 @@ +package clawdoll + +import ( + "mongo.games.com/game/common" + "mongo.games.com/game/gamesrv/base" + "mongo.games.com/game/protocol/clawdoll" + "mongo.games.com/goserver/core/logger" + "mongo.games.com/goserver/core/netlib" +) + +type CSPlayerOpPacketFactory struct { +} + +type CSPlayerOpHandler struct { +} + +func (f *CSPlayerOpPacketFactory) CreatePacket() interface{} { + pack := &clawdoll.CSCLAWDOLLOp{} + return pack +} + +func (h *CSPlayerOpHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error { + logger.Logger.Trace("CSPlayerOpHandler Process recv ", data) + if msg, ok := data.(*clawdoll.CSCLAWDOLLOp); ok { + p := base.PlayerMgrSington.GetPlayer(sid) + if p == nil { + logger.Logger.Warn("CSPlayerOpHandler p == nil") + return nil + } + scene := p.GetScene() + if scene == nil { + logger.Logger.Warn("CSPlayerOpHandler p.scene == nil") + return nil + } + + if scene.KeyGameDif != common.GameDifClawdoll { + logger.Logger.Error("CSPlayerOpHandler gameId Error ", scene.GameId) + return nil + } + if !scene.HasPlayer(p) { + return nil + } + sp := scene.GetScenePolicy() + if sp != nil { + sp.OnPlayerOp(scene, p, int(msg.GetOpCode()), msg.GetParams()) + } + return nil + } + return nil +} + +func init() { + common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_CLAWDOLL_PLAYEROP), &CSPlayerOpHandler{}) + netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_CLAWDOLL_PLAYEROP), &CSPlayerOpPacketFactory{}) +} diff --git a/gamesrv/clawdoll/player_clawdoll.go b/gamesrv/clawdoll/player_clawdoll.go new file mode 100644 index 0000000..e7559b3 --- /dev/null +++ b/gamesrv/clawdoll/player_clawdoll.go @@ -0,0 +1,71 @@ +package clawdoll + +import ( + "mongo.games.com/game/gamesrv/base" + "mongo.games.com/goserver/core/logger" +) + +type PlayerEx struct { + *base.Player //玩家信息 + + gainCoin int64 // 本局赢的金币 + taxCoin int64 // 本局税收 + odds int32 +} + +func (this *PlayerEx) Clear(baseScore int32) { + this.UnmarkFlag(base.PlayerState_WaitNext) + this.UnmarkFlag(base.PlayerState_GameBreak) + this.MarkFlag(base.PlayerState_Ready) + + this.gainCoin = 0 + this.taxCoin = 0 + this.odds = 0 +} + +func (this *PlayerEx) CanOp(sceneEx *SceneEx) bool { + if !this.IsGameing() { + logger.Logger.Trace("(this *PlayerEx) CanOp return false ", this.SnId) + return false + } + return true +} + +func (this *PlayerEx) CanPayCoinByPos() bool { + + return false +} + +// 游戏新一局 设置数据 +func (this *PlayerEx) ReStartGame() { + this.ReDataStartGame() + this.gainCoin = 0 + this.taxCoin = 0 + this.odds = 0 +} + +// 初始化 +func (this *PlayerEx) InitData(baseScore int32) { + +} + +// 重置下注数据 +func (this *PlayerEx) ResetData() { + +} + +// 游戏新一局 设置数据 +func (this *PlayerEx) ReDataStartGame() { + +} + +func (this *PlayerEx) CanPlayerOpInState(sceneState int) bool { + + return false +} + +// 能否退出游戏 +func (this *PlayerEx) CanLeaveScene(sceneState int) bool { + + return true +} diff --git a/gamesrv/clawdoll/scene_clawdoll.go b/gamesrv/clawdoll/scene_clawdoll.go new file mode 100644 index 0000000..fd6a518 --- /dev/null +++ b/gamesrv/clawdoll/scene_clawdoll.go @@ -0,0 +1,205 @@ +package clawdoll + +import ( + "mongo.games.com/game/protocol/clawdoll" + "mongo.games.com/goserver/core/logger" + + "mongo.games.com/game/common" + rule "mongo.games.com/game/gamerule/clawdoll" + "mongo.games.com/game/gamesrv/base" + "mongo.games.com/game/proto" +) + +type PlayerData struct { + SnId int32 + Head int32 //头像框 + VIP int32 //VIP帐号 等级 + Name string //名字 + Sex int32 //性别 + IsRob bool + + Coin int64 + gainCoin int64 //本局赢的金币 + taxCoin int64 //本局税收 + isBilled bool //是否结算 + CurIsWin int64 //当局输赢 负数:输 正数:赢 + + InviterId int32 //邀请人Id + BeUnderAgentCode string //隶属经销商(推广人) + IsPlayerFirst bool + + Platform string //平台 + Channel string //渠道信息 + PackageID string //推广包标识 对应客户端的packagetag + flag int +} + +type SceneEx struct { + *base.Scene // 场景 + logic *rule.Logic // + players map[int32]*PlayerEx // 玩家信息 + PlayerBackup map[int32]*PlayerData // 本局离场玩家数据备份 + seats []*PlayerEx // 本局游戏中的玩家状态数据 + + RoundId int // 局数,第几局 + robotNum int // 参与游戏的机器人数量 + logid string +} + +// 游戏是否能开始 +func (this *SceneEx) CanStart() bool { + //人数>=1自动开始 + if len(this.players) >= 0 && (this.GetRealPlayerNum() >= 0 || this.IsPreCreateScene()) { + return true + } + return false +} + +// 从房间删除玩家 +func (this *SceneEx) delPlayer(p *base.Player) { + if p, exist := this.players[p.SnId]; exist { + this.seats[p.GetPos()] = nil + delete(this.players, p.SnId) + } +} + +// 广播玩家离开 +func (this *SceneEx) BroadcastPlayerLeave(p *base.Player, reason int) { + scLeavePack := &clawdoll.SCCLAWDOLLPlayerLeave{ + Pos: proto.Int(p.GetPos()), + } + proto.SetDefaults(scLeavePack) + + this.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PlayerLeave), scLeavePack, p.GetSid()) +} + +// 玩家离开事件 +func (this *SceneEx) OnPlayerLeave(p *base.Player, reason int) { + this.delPlayer(p) + this.BroadcastPlayerLeave(p, reason) +} +func (this *SceneEx) SceneDestroy(force bool) { + //销毁房间 + this.Scene.Destroy(force) +} + +func (e *SceneEx) playerOpPack(snId int32, opcode int, opRetCode clawdoll.OpResultCode, params []int64) *clawdoll.SCCLAWDOLLOp { + pack := &clawdoll.SCCLAWDOLLOp{ + SnId: proto.Int32(snId), + OpCode: proto.Int32(int32(opcode)), + Params: params, + OpRetCode: clawdoll.OpResultCode_OPRC_Success, + } + + proto.SetDefaults(pack) + return pack +} + +// OnPlayerSCOp 发送玩家操作情况 +func (e *SceneEx) OnPlayerSCOp(p *base.Player, opcode int, opRetCode clawdoll.OpResultCode, params []int64) { + pack := e.playerOpPack(p.SnId, opcode, opRetCode, params) + p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PLAYEROP), pack) + logger.Logger.Tracef("OnPlayerSCOp %s", pack) +} + +// 房间信息打包 +func (this *SceneEx) ClawdollCreateRoomInfoPacket(s *base.Scene, p *base.Player) interface{} { + pack := &clawdoll.SCCLAWDOLLRoomInfo{ + RoomId: proto.Int(s.GetSceneId()), + GameId: proto.Int(s.GetGameId()), + RoomMode: proto.Int(s.GetSceneMode()), + Params: common.CopySliceInt64ToInt32(s.Params), + State: proto.Int(s.GetSceneState().GetState()), + TimeOut: proto.Int(s.GetSceneState().GetTimeout(s)), + TotalPlayer: proto.Int(len(this.players)), + RoundId: proto.Int(this.RoundId), + ParamsEx: nil, + GameFreeId: 0, + BaseScore: proto.Int32(this.GetBaseScore()), + } + + // 玩家信息 + for _, playerEx := range this.players { + + if p.SnId == playerEx.SnId { + pd := &clawdoll.CLAWDOLLPlayerData{ + SnId: proto.Int32(playerEx.SnId), + Name: proto.String(playerEx.Name), + Head: proto.Int32(playerEx.Head), + Sex: proto.Int32(playerEx.Sex), + Coin: proto.Int64(playerEx.Coin), + Flag: proto.Int(playerEx.GetFlag()), + HeadOutLine: proto.Int32(playerEx.HeadOutLine), + VIP: proto.Int32(playerEx.VIP), + + WinCoin: proto.Int64(playerEx.gainCoin), + } + + pack.Players = append(pack.Players, pd) + } + } + + proto.SetDefaults(pack) + if p != nil { + p.SyncFlag() + } + + return pack +} + +func NewClawdollSceneData(s *base.Scene) *SceneEx { + sceneEx := &SceneEx{ + Scene: s, + logic: new(rule.Logic), + players: make(map[int32]*PlayerEx), + seats: make([]*PlayerEx, s.GetPlayerNum()), + PlayerBackup: make(map[int32]*PlayerData), + } + + return sceneEx +} + +func (this *SceneEx) init() bool { + this.Clear() + return true +} + +// 检查上分是否合法 +func (this *SceneEx) CheckPayOp(betVal int64, takeMul int64) bool { //游戏底分 + return true +} + +func (this *SceneEx) Clear() { + this.robotNum = 0 + this.PlayerBackup = make(map[int32]*PlayerData) + this.RoundId = 0 + + for i := 0; i < this.GetPlayerNum(); i++ { + if this.seats[i] != nil { + this.seats[i].Clear(this.GetBaseScore()) + } + } +} + +func (this *SceneEx) BackupPlayer(p *PlayerEx, isBilled bool) { + this.PlayerBackup[p.SnId] = &PlayerData{ + SnId: p.SnId, + gainCoin: p.gainCoin, + taxCoin: p.taxCoin, + isBilled: isBilled, + IsRob: p.IsRob, + Coin: p.Coin, + Head: p.Head, + flag: p.GetFlag(), + Platform: p.Platform, + Channel: p.Channel, + PackageID: p.PackageID, + CurIsWin: p.CurIsWin, + Name: p.Name, + Sex: p.Sex, + VIP: p.VIP, + InviterId: p.InviterId, + IsPlayerFirst: this.IsPlayerFirst(p.Player), + BeUnderAgentCode: p.BeUnderAgentCode, + } +} diff --git a/gamesrv/clawdoll/scenepolicy_clawdoll.go b/gamesrv/clawdoll/scenepolicy_clawdoll.go new file mode 100644 index 0000000..46bc199 --- /dev/null +++ b/gamesrv/clawdoll/scenepolicy_clawdoll.go @@ -0,0 +1,576 @@ +package clawdoll + +import ( + "mongo.games.com/game/protocol/clawdoll" + "time" + + "mongo.games.com/goserver/core" + "mongo.games.com/goserver/core/logger" + + "mongo.games.com/game/common" + rule "mongo.games.com/game/gamerule/clawdoll" + "mongo.games.com/game/gamesrv/base" + "mongo.games.com/game/proto" +) + +var PolicyClawdollSingleton = &PolicyClawdoll{} + +type PolicyClawdoll struct { + base.BaseScenePolicy + states [rule.ClawDollSceneStateMax]base.SceneState +} + +func (this *PolicyClawdoll) CreateSceneExData(s *base.Scene) interface{} { + sceneEx := NewClawdollSceneData(s) + if sceneEx != nil { + if sceneEx.init() { + s.ExtraData = sceneEx + } + } + return sceneEx +} + +func (this *PolicyClawdoll) CreatePlayerExData(s *base.Scene, p *base.Player) interface{} { + playerEx := &PlayerEx{Player: p} + if playerEx != nil { + p.ExtraData = playerEx + } + return playerEx +} + +func (this *PolicyClawdoll) OnStart(s *base.Scene) { + logger.Logger.Trace("(this *PolicyClawdoll) OnStart, sceneId=", s.GetSceneId()) + + sceneEx := NewClawdollSceneData(s) + if sceneEx != nil { + if sceneEx.init() { + s.ExtraData = sceneEx + s.ChangeSceneState(rule.ClawDollSceneStateWait) + } + } +} + +func (this *PolicyClawdoll) OnStop(s *base.Scene) { + logger.Logger.Trace("(this *PolicyClawdoll) OnStop , sceneId=", s.GetSceneId()) +} + +func (this *PolicyClawdoll) OnTick(s *base.Scene) { + if s == nil { + return + } + if s.SceneState != nil { + s.SceneState.OnTick(s) + } +} + +func (this *PolicyClawdoll) OnPlayerEnter(s *base.Scene, p *base.Player) { + if s == nil || p == nil { + return + } + + logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.SnId) + + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + pos := -1 + for i := 0; i < sceneEx.GetPlayerNum(); i++ { + if sceneEx.seats[i] == nil { + pos = i + break + } + } + if pos != -1 { + playerEx := &PlayerEx{Player: p} + sceneEx.seats[pos] = playerEx + sceneEx.players[p.SnId] = playerEx + + baseScore := sceneEx.GetBaseScore() + + p.Pos = pos + p.ExtraData = playerEx + playerEx.Clear(baseScore) + + if sceneEx.Gaming { + p.MarkFlag(base.PlayerState_WaitNext) + p.UnmarkFlag(base.PlayerState_Ready) + } + + //给自己发送房间信息 + this.SendRoomInfo(s, p, sceneEx) + s.FirePlayerEvent(p, base.PlayerEventEnter, nil) + } + } +} + +func (this *PolicyClawdoll) OnPlayerLeave(s *base.Scene, p *base.Player, reason int) { + logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerLeave, sceneId=", s.GetSceneId(), " player=", p.SnId) + if s == nil || p == nil { + return + } + if !this.CanChangeCoinScene(s, p) { + return + } + + sceneEx, ok := s.ExtraData.(*SceneEx) + if !ok { + return + } + playerEx, ok := p.ExtraData.(*PlayerEx) + if !ok { + return + } + + isBilled := false + + // 游戏已开始,玩家离开,备份玩家数据 + if sceneEx.Gaming { + sceneEx.BackupPlayer(playerEx, isBilled) + } + + // 清理玩家数据 + sceneEx.OnPlayerLeave(p, reason) + s.FirePlayerEvent(p, base.PlayerEventLeave, nil) +} + +func (this *PolicyClawdoll) OnPlayerDropLine(s *base.Scene, p *base.Player) { + if s == nil || p == nil { + return + } + logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerDropLine, sceneId=", s.GetSceneId(), " player=", p.SnId) + s.FirePlayerEvent(p, base.PlayerEventDropLine, nil) +} + +func (this *PolicyClawdoll) OnPlayerRehold(s *base.Scene, p *base.Player) { + if s == nil || p == nil { + return + } + logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerRehold, sceneId=", s.GetSceneId(), " player=", p.SnId) + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + if _, ok := p.ExtraData.(*PlayerEx); ok { + //发送房间信息给自己 + if p.IsGameing() { + p.MarkFlag(base.PlayerState_Ready) + } + this.SendRoomInfo(s, p, sceneEx) + s.FirePlayerEvent(p, base.PlayerEventRehold, nil) + } + } +} + +func (this *PolicyClawdoll) OnPlayerReturn(s *base.Scene, p *base.Player) { + if s == nil || p == nil { + return + } + logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerRehold, sceneId=", s.GetSceneId(), " player=", p.SnId) + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + if _, ok := p.ExtraData.(*PlayerEx); ok { + //发送房间信息给自己 + if p.IsGameing() { + p.MarkFlag(base.PlayerState_Ready) + } + this.SendRoomInfo(s, p, sceneEx) + s.FirePlayerEvent(p, base.PlayerEventReturn, nil) + } + } +} + +func (this *PolicyClawdoll) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool { + if s == nil || p == nil { + return false + } + logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerOp, sceneId=", s.GetSceneId(), " player=", p.SnId, " opcode=", opcode, " params=", params) + if s.SceneState != nil { + p.LastOPTimer = time.Now() + p.Trusteeship = 0 + return s.SceneState.OnPlayerOp(s, p, opcode, params) + } + return true +} + +func (this *PolicyClawdoll) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) { + if s == nil || p == nil { + return + } + logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " eventcode=", evtcode, " params=", params) + if s.SceneState != nil { + s.SceneState.OnPlayerEvent(s, p, evtcode, params) + } +} + +func (this *PolicyClawdoll) IsCompleted(s *base.Scene) bool { + if s == nil { + return false + } + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + return !sceneEx.Gaming + } + return false +} + +func (this *PolicyClawdoll) IsCanForceStart(s *base.Scene) bool { + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + return len(s.Players) >= 2 && !sceneEx.Gaming + } + return false +} + +func (this *PolicyClawdoll) ForceStart(s *base.Scene) { + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + if sceneEx.SceneState.GetState() == rule.ClawDollSceneStateWait { + s.ChangeSceneState(rule.ClawDollSceneStateStart) + } + } +} + +// 当前状态能否退出游戏 +func (this *PolicyClawdoll) CanChangeCoinScene(s *base.Scene, p *base.Player) bool { + if s == nil || p == nil { + return false + } + if s.GetSceneState() != nil { + return s.GetSceneState().CanChangeCoinScene(s, p) + } + + return true +} + +func (this *PolicyClawdoll) SendRoomInfo(s *base.Scene, p *base.Player, sceneEx *SceneEx) { + pack := sceneEx.ClawdollCreateRoomInfoPacket(s, p) + p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_ROOMINFO), pack) +} + +// 广播房间状态 +func ClawdollBroadcastRoomState(s *base.Scene, params ...float32) { + pack := &clawdoll.SCCLAWDOLLRoomState{ + State: proto.Int(s.SceneState.GetState()), + Params: params, + } + s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_ROOMSTATE), pack, 0) +} + +//===================================== +// BaseState 状态基类 +//===================================== + +type BaseState struct { +} + +func (this *BaseState) GetTimeout(s *base.Scene) int { + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + return int(time.Now().Sub(sceneEx.StateStartTime) / time.Second) + } + return 0 +} + +func (this *BaseState) CanChangeTo(s base.SceneState) bool { + return true +} + +func (this *BaseState) CanChangeCoinScene(s *base.Scene, p *base.Player) bool { + + //playerEx, ok := p.ExtraData.(*PlayerEx) + //if !ok { + // return false + //} + // + //if !playerEx.CanLeaveScene(s.GetSceneState().GetState()) { + // return false + //} + + return true +} + +func (this *BaseState) OnEnter(s *base.Scene) { + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + sceneEx.StateStartTime = time.Now() + } +} + +func (this *BaseState) OnLeave(s *base.Scene) {} + +func (this *BaseState) OnTick(s *base.Scene) { +} + +func (this *BaseState) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool { + + return false +} + +func (this *BaseState) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) { +} + +//===================================== +// StateWait 等待中 +//===================================== + +type StateWait struct { + BaseState +} + +func (this *StateWait) GetState() int { + return rule.ClawDollSceneStateWait +} + +func (this *StateWait) CanChangeTo(s base.SceneState) bool { + if s.GetState() == rule.ClawDollSceneStateStart { + return true + } + return false +} + +func (this *StateWait) GetTimeout(s *base.Scene) int { + + return this.BaseState.GetTimeout(s) +} + +func (this *StateWait) OnEnter(s *base.Scene) { + this.BaseState.OnEnter(s) + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + if s.Gaming { + s.NotifySceneRoundPause() + } + s.Gaming = false + + ClawdollBroadcastRoomState(s, float32(0), float32(0)) + + if sceneEx.CanStart() { + s.ChangeSceneState(rule.ClawDollSceneStateStart) + } + } +} + +// 玩家事件 +func (this *StateWait) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) { + logger.Logger.Trace("(this *StateWait) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " evtcode=", evtcode) + this.BaseState.OnPlayerEvent(s, p, evtcode, params) + if _, ok := s.ExtraData.(*SceneEx); ok { + switch evtcode { + case base.PlayerEventLeave: + case base.PlayerEventEnter: + if !p.IsReady() { + p.MarkFlag(base.PlayerState_Ready) + p.SyncFlag() + } + } + } +} + +func (this *StateWait) OnTick(s *base.Scene) { + this.BaseState.OnTick(s) + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + if s.CheckNeedDestroy() { + sceneEx.SceneDestroy(true) + return + } + if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneWaitTimeout { + //切换到准备开局状态 + if sceneEx.CanStart() { + s.ChangeSceneState(rule.ClawDollSceneStateStart) + } + } + } +} + +//===================================== +// StateStart 开始倒计时 +//===================================== + +type StateStart struct { + BaseState +} + +func (this *StateStart) GetState() int { + return rule.ClawDollSceneStateStart +} + +func (this *StateStart) CanChangeTo(s base.SceneState) bool { + switch s.GetState() { + case rule.ClawDollSceneStatePlayGame: + return true + } + return false +} + +func (this *StateStart) OnEnter(s *base.Scene) { + this.BaseState.OnEnter(s) + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + ClawdollBroadcastRoomState(s, float32(0), float32(0)) + s.Gaming = false + sceneEx.GameNowTime = time.Now() + sceneEx.NumOfGames++ + + } +} + +func (this *StateStart) OnTick(s *base.Scene) { + this.BaseState.OnTick(s) + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneStartTimeout { + //切换到等待操作状态 + if sceneEx.CanStart() { + s.ChangeSceneState(rule.ClawDollSceneStatePlayGame) + } else { + s.ChangeSceneState(rule.ClawDollSceneStateWait) + } + } + } +} + +func (this *StateStart) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool { + if this.BaseState.OnPlayerOp(s, p, opcode, params) { + return true + } + + return false +} + +func (this *StateStart) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) { + logger.Logger.Trace("(this *StateStart) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " evtcode=", evtcode) + this.BaseState.OnPlayerEvent(s, p, evtcode, params) + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + switch evtcode { + case base.PlayerEventLeave: + if !sceneEx.CanStart() { + s.ChangeSceneState(rule.ClawDollSceneStateWait) + } + case base.PlayerEventEnter: + if !p.IsReady() { + p.MarkFlag(base.PlayerState_Ready) + p.SyncFlag() + } + } + } +} + +// ===================================== +// PlayGame 游戏中 +// ===================================== +type PlayGame struct { + BaseState +} + +func (this *PlayGame) GetState() int { + return rule.ClawDollSceneStatePlayGame +} + +func (this *PlayGame) CanChangeTo(s base.SceneState) bool { + switch s.GetState() { + case rule.ClawDollSceneStateBilled: + return true + } + return false +} + +func (this *PlayGame) OnEnter(s *base.Scene) { + logger.Logger.Trace("(this *PlayGame) OnEnter, sceneid=", s.GetSceneId()) + + this.BaseState.OnEnter(s) + + s.Gaming = true + + ClawdollBroadcastRoomState(s, float32(0), float32(0)) + +} + +func (this *PlayGame) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool { + + logger.Logger.Trace("StatePlayGame OnPlayerOp-----SnId:", p.SnId, " opcode: ", opcode, " params:", params) + + if this.BaseState.OnPlayerOp(s, p, opcode, params) { + return true + } + + return false +} + +func (this *PlayGame) OnTick(s *base.Scene) { + this.BaseState.OnTick(s) +} + +//===================================== +// StateBilled 结算 +//===================================== + +type StateBilled struct { + BaseState +} + +func (this *StateBilled) GetState() int { + return rule.ClawDollSceneStateBilled +} + +func (this *StateBilled) CanChangeTo(s base.SceneState) bool { + switch s.GetState() { + case rule.ClawDollSceneStateStart: + return true + } + return false +} + +func (this *StateBilled) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool { + return false +} + +func (this *StateBilled) OnEnter(s *base.Scene) { + logger.Logger.Trace("(this *StateBilled) OnEnter, sceneid=", s.GetSceneId()) + this.BaseState.OnEnter(s) +} + +func (this *StateBilled) OnLeave(s *base.Scene) { + logger.Logger.Trace("(this *StateBilled) OnLeave, sceneid=", s.GetSceneId()) + this.BaseState.OnLeave(s) + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + + sceneEx.PlayerBackup = make(map[int32]*PlayerData) + + if s.CheckNeedDestroy() { + sceneEx.SceneDestroy(true) + } + } +} + +func (this *StateBilled) OnTick(s *base.Scene) { + this.BaseState.OnTick(s) + if sceneEx, ok := s.ExtraData.(*SceneEx); ok { + if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneBilledTimeout { + if sceneEx.CanStart() { + s.ChangeSceneState(rule.ClawDollSceneStateStart) + } else { + s.ChangeSceneState(rule.ClawDollSceneStateWait) + } + return + } + } +} + +// // ////////////////////////////////////////////////////////////////////////////// +func (this *PolicyClawdoll) RegisteSceneState(state base.SceneState) { + if state == nil { + return + } + stateid := state.GetState() + + if stateid < 0 || stateid >= rule.ClawDollSceneStateMax { + return + } + this.states[stateid] = state +} + +func (this *PolicyClawdoll) GetSceneState(s *base.Scene, stateid int) base.SceneState { + if stateid >= 0 && stateid < rule.ClawDollSceneStateMax { + return this.states[stateid] + } + return nil +} + +func init() { + PolicyClawdollSingleton.RegisteSceneState(&StateWait{}) + PolicyClawdollSingleton.RegisteSceneState(&StateStart{}) + PolicyClawdollSingleton.RegisteSceneState(&PlayGame{}) + PolicyClawdollSingleton.RegisteSceneState(&StateBilled{}) + + core.RegisteHook(core.HOOK_BEFORE_START, func() error { + base.RegisteScenePolicy(common.GameId_Clawdoll, 0, PolicyClawdollSingleton) + + return nil + }) +} diff --git a/gamesrv/machine/action_machine.go b/gamesrv/machine/action_machine.go deleted file mode 100644 index 06e5f15..0000000 --- a/gamesrv/machine/action_machine.go +++ /dev/null @@ -1,14 +0,0 @@ -package machine - -import ( - "mongo.games.com/game/protocol/machine" - "mongo.games.com/goserver/core/netlib" -) - -func MSDollMachineListHandler(session *netlib.Session, packetId int, data interface{}) error { - - return nil -} -func init() { - netlib.Register(int(machine.DollMachinePacketID_PACKET_MSDollMachineList), &machine.MSDollMachineList{}, MSDollMachineListHandler) -} diff --git a/machine/action/action_server.go b/machine/action/action_server.go index a0a4c98..36963fe 100644 --- a/machine/action/action_server.go +++ b/machine/action/action_server.go @@ -68,6 +68,8 @@ func SMDollMachineGrabHandler(session *netlib.Session, packetId int, data interf machinedoll.Grab(conn) } else if typeId == 3 { //必中抓 + machinedoll.SetPower(conn) + time.Sleep(200 * time.Millisecond) machinedoll.Grab(conn) } //返回消息 @@ -92,7 +94,7 @@ func SMGameLinkSucceedHandler(session *netlib.Session, packetId int, data interf msg.Data = append(msg.Data, info) } session.Send(int(machine.DollMachinePacketID_PACKET_MSDollMachineList), msg) - fmt.Printf("开始向游戏服务器发送娃娃机连接信息!\n") + fmt.Printf("开始向游戏服务器发送娃娃机连接信息!\n", msg) return nil } func init() { diff --git a/machine/machineIPConfig.json b/machine/machineConfig.json similarity index 100% rename from machine/machineIPConfig.json rename to machine/machineConfig.json diff --git a/machine/machinedoll/command.go b/machine/machinedoll/command.go index d4970d8..ea8b82b 100644 --- a/machine/machinedoll/command.go +++ b/machine/machinedoll/command.go @@ -103,6 +103,13 @@ func Grab(conn net.Conn) { fmt.Println("Failed to send command to server:", err) return } + // 读取服务端的响应 + buf := make([]byte, 1024) + _, err = conn.Read(buf) + if err != nil { + fmt.Println("Failed to read response from server:", err) + return + } } // 弱抓aa 05 01 50 06 00 52 dd diff --git a/machine/machinedoll/machinemgr.go b/machine/machinedoll/machinemgr.go index 36cedee..eaece9c 100644 --- a/machine/machinedoll/machinemgr.go +++ b/machine/machinedoll/machinemgr.go @@ -37,16 +37,13 @@ const heartbeatInterval = 1 func (this *MachineManager) Init() { var serverAddrs []string - // 获取程序所在的绝对路径 programDir, err := os.Getwd() if err != nil { fmt.Println("Error getting working directory:", err) return } - - // 构建配置文件的绝对路径 configFile := filepath.Join(programDir, "machineIPConfig.json") - + fmt.Println("构建配置文件的路径", configFile) fileData, err := os.ReadFile(configFile) if err != nil { logger.Logger.Error("Read robot account file error:", err) @@ -72,10 +69,10 @@ func (this *MachineManager) Init() { fmt.Println("投币请按Q!!!!") fmt.Println("w向前s向后a向左d向右 j强力抓取k弱力抓取!") // 监听 WASD 按键事件 - //go listenKeyboardEvents(ConnMap[1]) + /* go listenKeyboardEvents(ConnMap[1]) - // 监听中断信号,等待用户退出 - //waitForUserExit() + // 监听中断信号,等待用户退出 + waitForUserExit()*/ } func (this *MachineManager) StartHeartbeat(id int, conn *net.Conn, addr string) { // 定期发送心跳包 @@ -195,6 +192,8 @@ func listenKeyboardEvents(conn net.Conn) { case "j": Grab(conn) case "J": + SetPower(conn) + time.Sleep(200 * time.Millisecond) Grab(conn) case "k": @@ -209,7 +208,6 @@ func listenKeyboardEvents(conn net.Conn) { BackwardStop(conn) case "Q": Coin(conn) - Backward(conn) time.Sleep(150 * time.Millisecond) BackwardStop(conn) diff --git a/protocol/clawdoll/clawdoll.pb.go b/protocol/clawdoll/clawdoll.pb.go new file mode 100644 index 0000000..e395726 --- /dev/null +++ b/protocol/clawdoll/clawdoll.pb.go @@ -0,0 +1,1094 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1-devel +// protoc v3.19.4 +// source: clawdoll.proto + +package clawdoll + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +//娃娃机 +type CLAWDOLLPacketID int32 + +const ( + CLAWDOLLPacketID_PACKET_CLAWDOLL_ZERO CLAWDOLLPacketID = 0 //弃用消息号 + CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_ROOMINFO CLAWDOLLPacketID = 5601 //房间信息 + CLAWDOLLPacketID_PACKET_CS_CLAWDOLL_PLAYEROP CLAWDOLLPacketID = 5602 //玩家操作(客户->服务) + CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PLAYEROP CLAWDOLLPacketID = 5603 //玩家操作(服务->客户) + CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_ROOMSTATE CLAWDOLLPacketID = 5604 //房间状态 + CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_GAMEBILLED CLAWDOLLPacketID = 5605 //游戏结算 + CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PlayerEnter CLAWDOLLPacketID = 5606 // 玩家进入 + CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PlayerLeave CLAWDOLLPacketID = 5607 // 玩家离开 + CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PLAYERINFO CLAWDOLLPacketID = 5608 // 玩家状态信息变化 +) + +// Enum value maps for CLAWDOLLPacketID. +var ( + CLAWDOLLPacketID_name = map[int32]string{ + 0: "PACKET_CLAWDOLL_ZERO", + 5601: "PACKET_SC_CLAWDOLL_ROOMINFO", + 5602: "PACKET_CS_CLAWDOLL_PLAYEROP", + 5603: "PACKET_SC_CLAWDOLL_PLAYEROP", + 5604: "PACKET_SC_CLAWDOLL_ROOMSTATE", + 5605: "PACKET_SC_CLAWDOLL_GAMEBILLED", + 5606: "PACKET_SC_CLAWDOLL_PlayerEnter", + 5607: "PACKET_SC_CLAWDOLL_PlayerLeave", + 5608: "PACKET_SC_CLAWDOLL_PLAYERINFO", + } + CLAWDOLLPacketID_value = map[string]int32{ + "PACKET_CLAWDOLL_ZERO": 0, + "PACKET_SC_CLAWDOLL_ROOMINFO": 5601, + "PACKET_CS_CLAWDOLL_PLAYEROP": 5602, + "PACKET_SC_CLAWDOLL_PLAYEROP": 5603, + "PACKET_SC_CLAWDOLL_ROOMSTATE": 5604, + "PACKET_SC_CLAWDOLL_GAMEBILLED": 5605, + "PACKET_SC_CLAWDOLL_PlayerEnter": 5606, + "PACKET_SC_CLAWDOLL_PlayerLeave": 5607, + "PACKET_SC_CLAWDOLL_PLAYERINFO": 5608, + } +) + +func (x CLAWDOLLPacketID) Enum() *CLAWDOLLPacketID { + p := new(CLAWDOLLPacketID) + *p = x + return p +} + +func (x CLAWDOLLPacketID) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CLAWDOLLPacketID) Descriptor() protoreflect.EnumDescriptor { + return file_clawdoll_proto_enumTypes[0].Descriptor() +} + +func (CLAWDOLLPacketID) Type() protoreflect.EnumType { + return &file_clawdoll_proto_enumTypes[0] +} + +func (x CLAWDOLLPacketID) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CLAWDOLLPacketID.Descriptor instead. +func (CLAWDOLLPacketID) EnumDescriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{0} +} + +//操作结果 +type OpResultCode int32 + +const ( + OpResultCode_OPRC_Success OpResultCode = 0 //成功 + OpResultCode_OPRC_Error OpResultCode = 1 //失败 + OpResultCode_OPRC_CoinNotEnough OpResultCode = 2 //钱不够 + OpResultCode_OPRC_PosAlReadyPlaying OpResultCode = 3 //本局位置已存在玩家 +) + +// Enum value maps for OpResultCode. +var ( + OpResultCode_name = map[int32]string{ + 0: "OPRC_Success", + 1: "OPRC_Error", + 2: "OPRC_CoinNotEnough", + 3: "OPRC_PosAlReadyPlaying", + } + OpResultCode_value = map[string]int32{ + "OPRC_Success": 0, + "OPRC_Error": 1, + "OPRC_CoinNotEnough": 2, + "OPRC_PosAlReadyPlaying": 3, + } +) + +func (x OpResultCode) Enum() *OpResultCode { + p := new(OpResultCode) + *p = x + return p +} + +func (x OpResultCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OpResultCode) Descriptor() protoreflect.EnumDescriptor { + return file_clawdoll_proto_enumTypes[1].Descriptor() +} + +func (OpResultCode) Type() protoreflect.EnumType { + return &file_clawdoll_proto_enumTypes[1] +} + +func (x OpResultCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OpResultCode.Descriptor instead. +func (OpResultCode) EnumDescriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{1} +} + +type CLAWDOLLPlayerData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` //名字 + SnId int32 `protobuf:"varint,2,opt,name=SnId,proto3" json:"SnId,omitempty"` //账号 + Head int32 `protobuf:"varint,3,opt,name=Head,proto3" json:"Head,omitempty"` //头像 + Sex int32 `protobuf:"varint,4,opt,name=Sex,proto3" json:"Sex,omitempty"` //性别 + Coin int64 `protobuf:"varint,5,opt,name=Coin,proto3" json:"Coin,omitempty"` //金币 + HeadOutLine int32 `protobuf:"varint,6,opt,name=HeadOutLine,proto3" json:"HeadOutLine,omitempty"` //头像框 + VIP int32 `protobuf:"varint,7,opt,name=VIP,proto3" json:"VIP,omitempty"` + Flag int32 `protobuf:"varint,8,opt,name=Flag,proto3" json:"Flag,omitempty"` //二进制标记 第一位:是否掉线(0:在线 1:掉线) 第二位:是否准备(0:未准备 1:已准备) + WinCoin int64 `protobuf:"varint,9,opt,name=WinCoin,proto3" json:"WinCoin,omitempty"` // 本局赢分 +} + +func (x *CLAWDOLLPlayerData) Reset() { + *x = CLAWDOLLPlayerData{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CLAWDOLLPlayerData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CLAWDOLLPlayerData) ProtoMessage() {} + +func (x *CLAWDOLLPlayerData) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CLAWDOLLPlayerData.ProtoReflect.Descriptor instead. +func (*CLAWDOLLPlayerData) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{0} +} + +func (x *CLAWDOLLPlayerData) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CLAWDOLLPlayerData) GetSnId() int32 { + if x != nil { + return x.SnId + } + return 0 +} + +func (x *CLAWDOLLPlayerData) GetHead() int32 { + if x != nil { + return x.Head + } + return 0 +} + +func (x *CLAWDOLLPlayerData) GetSex() int32 { + if x != nil { + return x.Sex + } + return 0 +} + +func (x *CLAWDOLLPlayerData) GetCoin() int64 { + if x != nil { + return x.Coin + } + return 0 +} + +func (x *CLAWDOLLPlayerData) GetHeadOutLine() int32 { + if x != nil { + return x.HeadOutLine + } + return 0 +} + +func (x *CLAWDOLLPlayerData) GetVIP() int32 { + if x != nil { + return x.VIP + } + return 0 +} + +func (x *CLAWDOLLPlayerData) GetFlag() int32 { + if x != nil { + return x.Flag + } + return 0 +} + +func (x *CLAWDOLLPlayerData) GetWinCoin() int64 { + if x != nil { + return x.WinCoin + } + return 0 +} + +//房间信息 +type SCCLAWDOLLRoomInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RoomId int32 `protobuf:"varint,1,opt,name=RoomId,proto3" json:"RoomId,omitempty"` //房间id + GameId int32 `protobuf:"varint,2,opt,name=GameId,proto3" json:"GameId,omitempty"` //游戏id + RoomMode int32 `protobuf:"varint,3,opt,name=RoomMode,proto3" json:"RoomMode,omitempty"` //游戏模式 + Params []int32 `protobuf:"varint,4,rep,packed,name=Params,proto3" json:"Params,omitempty"` //规则参数 + State int32 `protobuf:"varint,5,opt,name=State,proto3" json:"State,omitempty"` //房间当前状态 + TimeOut int32 `protobuf:"varint,6,opt,name=TimeOut,proto3" json:"TimeOut,omitempty"` //该状态已经历时间 单位:秒 + Players []*CLAWDOLLPlayerData `protobuf:"bytes,7,rep,name=Players,proto3" json:"Players,omitempty"` //房间内的玩家信息 + TotalPlayer int32 `protobuf:"varint,8,opt,name=TotalPlayer,proto3" json:"TotalPlayer,omitempty"` //房间总人数 + RoundId int32 `protobuf:"varint,9,opt,name=RoundId,proto3" json:"RoundId,omitempty"` //当前局数ID + ParamsEx []int32 `protobuf:"varint,10,rep,packed,name=ParamsEx,proto3" json:"ParamsEx,omitempty"` //其他参数 + GameFreeId int32 `protobuf:"varint,15,opt,name=GameFreeId,proto3" json:"GameFreeId,omitempty"` + BaseScore int32 `protobuf:"varint,16,opt,name=BaseScore,proto3" json:"BaseScore,omitempty"` //基础分 +} + +func (x *SCCLAWDOLLRoomInfo) Reset() { + *x = SCCLAWDOLLRoomInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCCLAWDOLLRoomInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCCLAWDOLLRoomInfo) ProtoMessage() {} + +func (x *SCCLAWDOLLRoomInfo) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCCLAWDOLLRoomInfo.ProtoReflect.Descriptor instead. +func (*SCCLAWDOLLRoomInfo) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{1} +} + +func (x *SCCLAWDOLLRoomInfo) GetRoomId() int32 { + if x != nil { + return x.RoomId + } + return 0 +} + +func (x *SCCLAWDOLLRoomInfo) GetGameId() int32 { + if x != nil { + return x.GameId + } + return 0 +} + +func (x *SCCLAWDOLLRoomInfo) GetRoomMode() int32 { + if x != nil { + return x.RoomMode + } + return 0 +} + +func (x *SCCLAWDOLLRoomInfo) GetParams() []int32 { + if x != nil { + return x.Params + } + return nil +} + +func (x *SCCLAWDOLLRoomInfo) GetState() int32 { + if x != nil { + return x.State + } + return 0 +} + +func (x *SCCLAWDOLLRoomInfo) GetTimeOut() int32 { + if x != nil { + return x.TimeOut + } + return 0 +} + +func (x *SCCLAWDOLLRoomInfo) GetPlayers() []*CLAWDOLLPlayerData { + if x != nil { + return x.Players + } + return nil +} + +func (x *SCCLAWDOLLRoomInfo) GetTotalPlayer() int32 { + if x != nil { + return x.TotalPlayer + } + return 0 +} + +func (x *SCCLAWDOLLRoomInfo) GetRoundId() int32 { + if x != nil { + return x.RoundId + } + return 0 +} + +func (x *SCCLAWDOLLRoomInfo) GetParamsEx() []int32 { + if x != nil { + return x.ParamsEx + } + return nil +} + +func (x *SCCLAWDOLLRoomInfo) GetGameFreeId() int32 { + if x != nil { + return x.GameFreeId + } + return 0 +} + +func (x *SCCLAWDOLLRoomInfo) GetBaseScore() int32 { + if x != nil { + return x.BaseScore + } + return 0 +} + +//玩家操作 +type CSCLAWDOLLOp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OpCode int32 `protobuf:"varint,1,opt,name=OpCode,proto3" json:"OpCode,omitempty"` + Params []int64 `protobuf:"varint,2,rep,packed,name=Params,proto3" json:"Params,omitempty"` +} + +func (x *CSCLAWDOLLOp) Reset() { + *x = CSCLAWDOLLOp{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CSCLAWDOLLOp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CSCLAWDOLLOp) ProtoMessage() {} + +func (x *CSCLAWDOLLOp) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_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 CSCLAWDOLLOp.ProtoReflect.Descriptor instead. +func (*CSCLAWDOLLOp) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{2} +} + +func (x *CSCLAWDOLLOp) GetOpCode() int32 { + if x != nil { + return x.OpCode + } + return 0 +} + +func (x *CSCLAWDOLLOp) GetParams() []int64 { + if x != nil { + return x.Params + } + return nil +} + +//玩家操作返回 +type SCCLAWDOLLOp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` //玩家ID + OpCode int32 `protobuf:"varint,2,opt,name=OpCode,proto3" json:"OpCode,omitempty"` //操作码 + Params []int64 `protobuf:"varint,3,rep,packed,name=Params,proto3" json:"Params,omitempty"` //操作参数 同上 CSCLAWDOLLOp + OpRetCode OpResultCode `protobuf:"varint,4,opt,name=OpRetCode,proto3,enum=clawdoll.OpResultCode" json:"OpRetCode,omitempty"` //操作结果 +} + +func (x *SCCLAWDOLLOp) Reset() { + *x = SCCLAWDOLLOp{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCCLAWDOLLOp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCCLAWDOLLOp) ProtoMessage() {} + +func (x *SCCLAWDOLLOp) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_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 SCCLAWDOLLOp.ProtoReflect.Descriptor instead. +func (*SCCLAWDOLLOp) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{3} +} + +func (x *SCCLAWDOLLOp) GetSnId() int32 { + if x != nil { + return x.SnId + } + return 0 +} + +func (x *SCCLAWDOLLOp) GetOpCode() int32 { + if x != nil { + return x.OpCode + } + return 0 +} + +func (x *SCCLAWDOLLOp) GetParams() []int64 { + if x != nil { + return x.Params + } + return nil +} + +func (x *SCCLAWDOLLOp) GetOpRetCode() OpResultCode { + if x != nil { + return x.OpRetCode + } + return OpResultCode_OPRC_Success +} + +//发送给客户端的数据 单局结算 +type SCCLAWDOLLRoundGameBilled struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RoundId int32 `protobuf:"varint,1,opt,name=RoundId,proto3" json:"RoundId,omitempty"` //牌局ID + ClowResult int32 `protobuf:"varint,2,opt,name=ClowResult,proto3" json:"ClowResult,omitempty"` //抓取结果 + Award int64 `protobuf:"varint,3,opt,name=Award,proto3" json:"Award,omitempty"` //获奖金额 + Balance int64 `protobuf:"varint,4,opt,name=Balance,proto3" json:"Balance,omitempty"` //玩家余额 +} + +func (x *SCCLAWDOLLRoundGameBilled) Reset() { + *x = SCCLAWDOLLRoundGameBilled{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCCLAWDOLLRoundGameBilled) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCCLAWDOLLRoundGameBilled) ProtoMessage() {} + +func (x *SCCLAWDOLLRoundGameBilled) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCCLAWDOLLRoundGameBilled.ProtoReflect.Descriptor instead. +func (*SCCLAWDOLLRoundGameBilled) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{4} +} + +func (x *SCCLAWDOLLRoundGameBilled) GetRoundId() int32 { + if x != nil { + return x.RoundId + } + return 0 +} + +func (x *SCCLAWDOLLRoundGameBilled) GetClowResult() int32 { + if x != nil { + return x.ClowResult + } + return 0 +} + +func (x *SCCLAWDOLLRoundGameBilled) GetAward() int64 { + if x != nil { + return x.Award + } + return 0 +} + +func (x *SCCLAWDOLLRoundGameBilled) GetBalance() int64 { + if x != nil { + return x.Balance + } + return 0 +} + +//房间状态 +type SCCLAWDOLLRoomState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State int32 `protobuf:"varint,1,opt,name=State,proto3" json:"State,omitempty"` //房间当前状态 + Params []float32 `protobuf:"fixed32,2,rep,packed,name=Params,proto3" json:"Params,omitempty"` +} + +func (x *SCCLAWDOLLRoomState) Reset() { + *x = SCCLAWDOLLRoomState{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCCLAWDOLLRoomState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCCLAWDOLLRoomState) ProtoMessage() {} + +func (x *SCCLAWDOLLRoomState) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCCLAWDOLLRoomState.ProtoReflect.Descriptor instead. +func (*SCCLAWDOLLRoomState) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{5} +} + +func (x *SCCLAWDOLLRoomState) GetState() int32 { + if x != nil { + return x.State + } + return 0 +} + +func (x *SCCLAWDOLLRoomState) GetParams() []float32 { + if x != nil { + return x.Params + } + return nil +} + +//玩家信息 +type SCCLAWDOLLPlayerInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` //玩家ID + GainCoin int64 `protobuf:"varint,2,opt,name=gainCoin,proto3" json:"gainCoin,omitempty"` //本局赢取 + Coin int64 `protobuf:"varint,3,opt,name=Coin,proto3" json:"Coin,omitempty"` // 玩家 +} + +func (x *SCCLAWDOLLPlayerInfo) Reset() { + *x = SCCLAWDOLLPlayerInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCCLAWDOLLPlayerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCCLAWDOLLPlayerInfo) ProtoMessage() {} + +func (x *SCCLAWDOLLPlayerInfo) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCCLAWDOLLPlayerInfo.ProtoReflect.Descriptor instead. +func (*SCCLAWDOLLPlayerInfo) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{6} +} + +func (x *SCCLAWDOLLPlayerInfo) GetSnId() int32 { + if x != nil { + return x.SnId + } + return 0 +} + +func (x *SCCLAWDOLLPlayerInfo) GetGainCoin() int64 { + if x != nil { + return x.GainCoin + } + return 0 +} + +func (x *SCCLAWDOLLPlayerInfo) GetCoin() int64 { + if x != nil { + return x.Coin + } + return 0 +} + +//玩家进入 +//PACKET_SCCLAWDOLLPlayerEnter +type SCCLAWDOLLPlayerEnter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *CLAWDOLLPlayerData `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` +} + +func (x *SCCLAWDOLLPlayerEnter) Reset() { + *x = SCCLAWDOLLPlayerEnter{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCCLAWDOLLPlayerEnter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCCLAWDOLLPlayerEnter) ProtoMessage() {} + +func (x *SCCLAWDOLLPlayerEnter) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCCLAWDOLLPlayerEnter.ProtoReflect.Descriptor instead. +func (*SCCLAWDOLLPlayerEnter) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{7} +} + +func (x *SCCLAWDOLLPlayerEnter) GetData() *CLAWDOLLPlayerData { + if x != nil { + return x.Data + } + return nil +} + +//玩家离开 +//PACKET_SCCLAWDOLLPlayerLeave +type SCCLAWDOLLPlayerLeave struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pos int32 `protobuf:"varint,1,opt,name=Pos,proto3" json:"Pos,omitempty"` //玩家位置 +} + +func (x *SCCLAWDOLLPlayerLeave) Reset() { + *x = SCCLAWDOLLPlayerLeave{} + if protoimpl.UnsafeEnabled { + mi := &file_clawdoll_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCCLAWDOLLPlayerLeave) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCCLAWDOLLPlayerLeave) ProtoMessage() {} + +func (x *SCCLAWDOLLPlayerLeave) ProtoReflect() protoreflect.Message { + mi := &file_clawdoll_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCCLAWDOLLPlayerLeave.ProtoReflect.Descriptor instead. +func (*SCCLAWDOLLPlayerLeave) Descriptor() ([]byte, []int) { + return file_clawdoll_proto_rawDescGZIP(), []int{8} +} + +func (x *SCCLAWDOLLPlayerLeave) GetPos() int32 { + if x != nil { + return x.Pos + } + return 0 +} + +var File_clawdoll_proto protoreflect.FileDescriptor + +var file_clawdoll_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x08, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x22, 0xd8, 0x01, 0x0a, 0x12, 0x43, + 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x65, 0x61, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x48, 0x65, 0x61, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x53, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x53, 0x65, 0x78, 0x12, + 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, + 0x6f, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x4f, 0x75, 0x74, 0x4c, 0x69, + 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x4f, 0x75, + 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x56, 0x49, 0x50, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x56, 0x49, 0x50, 0x12, 0x12, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x57, + 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x57, 0x69, + 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0xf6, 0x02, 0x0a, 0x12, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, + 0x44, 0x4f, 0x4c, 0x4c, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, + 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x6f, + 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, + 0x12, 0x36, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 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, + 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x54, + 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x6f, + 0x75, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x52, 0x6f, 0x75, + 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x78, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x78, + 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x49, 0x64, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x49, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x3e, + 0x0a, 0x0c, 0x43, 0x53, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x4f, 0x70, 0x12, 0x16, + 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x88, + 0x01, 0x0a, 0x0c, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x4f, 0x70, 0x12, + 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, + 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x34, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, + 0x6c, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, + 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x19, 0x53, 0x43, + 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x47, 0x61, 0x6d, + 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x6f, 0x75, 0x6e, 0x64, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x49, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x43, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x22, 0x43, 0x0a, 0x13, 0x53, 0x43, 0x43, 0x4c, 0x41, 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, 0x5a, 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, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x67, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, + 0x69, 0x6e, 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, 0x2a, 0xc7, 0x02, 0x0a, 0x10, 0x43, 0x4c, 0x41, + 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a, + 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, + 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, + 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x52, 0x4f, + 0x4f, 0x4d, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe1, 0x2b, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, + 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe2, 0x2b, 0x12, 0x20, 0x0a, 0x1b, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, + 0x4c, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe3, 0x2b, 0x12, 0x21, 0x0a, + 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, + 0x4f, 0x4c, 0x4c, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xe4, 0x2b, + 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, + 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x42, 0x49, 0x4c, 0x4c, 0x45, + 0x44, 0x10, 0xe5, 0x2b, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, + 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xe6, 0x2b, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, + 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x10, 0xe7, 0x2b, 0x12, 0x22, + 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, + 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x10, + 0xe8, 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 ( + file_clawdoll_proto_rawDescOnce sync.Once + file_clawdoll_proto_rawDescData = file_clawdoll_proto_rawDesc +) + +func file_clawdoll_proto_rawDescGZIP() []byte { + file_clawdoll_proto_rawDescOnce.Do(func() { + file_clawdoll_proto_rawDescData = protoimpl.X.CompressGZIP(file_clawdoll_proto_rawDescData) + }) + return file_clawdoll_proto_rawDescData +} + +var file_clawdoll_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_clawdoll_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_clawdoll_proto_goTypes = []interface{}{ + (CLAWDOLLPacketID)(0), // 0: clawdoll.CLAWDOLLPacketID + (OpResultCode)(0), // 1: clawdoll.OpResultCode + (*CLAWDOLLPlayerData)(nil), // 2: clawdoll.CLAWDOLLPlayerData + (*SCCLAWDOLLRoomInfo)(nil), // 3: clawdoll.SCCLAWDOLLRoomInfo + (*CSCLAWDOLLOp)(nil), // 4: clawdoll.CSCLAWDOLLOp + (*SCCLAWDOLLOp)(nil), // 5: clawdoll.SCCLAWDOLLOp + (*SCCLAWDOLLRoundGameBilled)(nil), // 6: clawdoll.SCCLAWDOLLRoundGameBilled + (*SCCLAWDOLLRoomState)(nil), // 7: clawdoll.SCCLAWDOLLRoomState + (*SCCLAWDOLLPlayerInfo)(nil), // 8: clawdoll.SCCLAWDOLLPlayerInfo + (*SCCLAWDOLLPlayerEnter)(nil), // 9: clawdoll.SCCLAWDOLLPlayerEnter + (*SCCLAWDOLLPlayerLeave)(nil), // 10: clawdoll.SCCLAWDOLLPlayerLeave +} +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 +} + +func init() { file_clawdoll_proto_init() } +func file_clawdoll_proto_init() { + if File_clawdoll_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_clawdoll_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CLAWDOLLPlayerData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clawdoll_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCCLAWDOLLRoomInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clawdoll_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CSCLAWDOLLOp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clawdoll_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCCLAWDOLLOp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clawdoll_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCCLAWDOLLRoundGameBilled); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clawdoll_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCCLAWDOLLRoomState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clawdoll_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCCLAWDOLLPlayerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clawdoll_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCCLAWDOLLPlayerEnter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clawdoll_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCCLAWDOLLPlayerLeave); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_clawdoll_proto_rawDesc, + NumEnums: 2, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_clawdoll_proto_goTypes, + DependencyIndexes: file_clawdoll_proto_depIdxs, + EnumInfos: file_clawdoll_proto_enumTypes, + MessageInfos: file_clawdoll_proto_msgTypes, + }.Build() + File_clawdoll_proto = out.File + file_clawdoll_proto_rawDesc = nil + file_clawdoll_proto_goTypes = nil + file_clawdoll_proto_depIdxs = nil +} diff --git a/protocol/clawdoll/clawdoll.proto b/protocol/clawdoll/clawdoll.proto new file mode 100644 index 0000000..e7091b2 --- /dev/null +++ b/protocol/clawdoll/clawdoll.proto @@ -0,0 +1,103 @@ +syntax = "proto3"; +package clawdoll; +option go_package = "mongo.games.com/game/protocol/clawdoll"; + +//娃娃机 +enum CLAWDOLLPacketID { + PACKET_CLAWDOLL_ZERO = 0; //弃用消息号 + PACKET_SC_CLAWDOLL_ROOMINFO = 5601; //房间信息 + PACKET_CS_CLAWDOLL_PLAYEROP = 5602; //玩家操作(客户->服务) + PACKET_SC_CLAWDOLL_PLAYEROP = 5603; //玩家操作(服务->客户) + PACKET_SC_CLAWDOLL_ROOMSTATE = 5604; //房间状态 + PACKET_SC_CLAWDOLL_GAMEBILLED = 5605; //游戏结算 + PACKET_SC_CLAWDOLL_PlayerEnter = 5606; // 玩家进入 + PACKET_SC_CLAWDOLL_PlayerLeave = 5607; // 玩家离开 + PACKET_SC_CLAWDOLL_PLAYERINFO = 5608; // 玩家状态信息变化 +} + +//操作结果 +enum OpResultCode { + OPRC_Success = 0; //成功 + OPRC_Error = 1; //失败 + OPRC_CoinNotEnough = 2; //钱不够 + OPRC_PosAlReadyPlaying = 3; //本局位置已存在玩家 +} + +message CLAWDOLLPlayerData { + string Name = 1; //名字 + int32 SnId = 2; //账号 + int32 Head = 3; //头像 + int32 Sex = 4; //性别 + int64 Coin = 5; //金币 + int32 HeadOutLine = 6; //头像框 + int32 VIP = 7; + int32 Flag = 8; //二进制标记 第一位:是否掉线(0:在线 1:掉线) 第二位:是否准备(0:未准备 1:已准备) + + int64 WinCoin = 9; // 本局赢分 + +} + +//房间信息 +message SCCLAWDOLLRoomInfo { + int32 RoomId = 1; //房间id + int32 GameId = 2; //游戏id + int32 RoomMode = 3; //游戏模式 + repeated int32 Params = 4; //规则参数 + int32 State = 5; //房间当前状态 + int32 TimeOut = 6; //该状态已经历时间 单位:秒 + repeated CLAWDOLLPlayerData Players = 7; //房间内的玩家信息 + int32 TotalPlayer = 8; //房间总人数 + int32 RoundId = 9; //当前局数ID + repeated int32 ParamsEx = 10; //其他参数 + + int32 GameFreeId = 15; + int32 BaseScore = 16; //基础分 +} + +//玩家操作 +message CSCLAWDOLLOp { + int32 OpCode = 1; + repeated int64 Params = 2; +} + +//玩家操作返回 +message SCCLAWDOLLOp { + int32 SnId = 1; //玩家ID + int32 OpCode = 2; //操作码 + repeated int64 Params = 3; //操作参数 同上 CSCLAWDOLLOp + OpResultCode OpRetCode = 4; //操作结果 +} + +//发送给客户端的数据 单局结算 +message SCCLAWDOLLRoundGameBilled { + int32 RoundId = 1; //牌局ID + int32 ClowResult = 2; //抓取结果 + int64 Award = 3; //获奖金额 + int64 Balance = 4; //玩家余额 +} + +//房间状态 +message SCCLAWDOLLRoomState { + int32 State = 1; //房间当前状态 + repeated float Params = 2; +} + +//玩家信息 +message SCCLAWDOLLPlayerInfo { + int32 SnId = 1; //玩家ID + int64 gainCoin = 2; //本局赢取 + int64 Coin = 3; // 玩家 +} + + +//玩家进入 +//PACKET_SCCLAWDOLLPlayerEnter +message SCCLAWDOLLPlayerEnter { + CLAWDOLLPlayerData Data = 1; +} + +//玩家离开 +//PACKET_SCCLAWDOLLPlayerLeave +message SCCLAWDOLLPlayerLeave { + int32 Pos = 1; //玩家位置 +} \ No newline at end of file diff --git a/protocol/dollmachine/dollmachine.pb.go b/protocol/dollmachine/dollmachine.pb.go new file mode 100644 index 0000000..6624f68 --- /dev/null +++ b/protocol/dollmachine/dollmachine.pb.go @@ -0,0 +1,537 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1-devel +// protoc v3.19.4 +// source: dollmachine.proto + +package dollmachine + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +//S-GAME M-娃娃机主机 +//娃娃机协议 +type DollMachinePacketID int32 + +const ( + DollMachinePacketID_PACKET_SMDollMachineZero DollMachinePacketID = 0 + DollMachinePacketID_PACKET_SMDollMachineMove DollMachinePacketID = 3001 + DollMachinePacketID_PACKET_SMDollMachineGrab DollMachinePacketID = 3002 + DollMachinePacketID_PACKET_MSDollMachineGrab DollMachinePacketID = 3003 + DollMachinePacketID_PACKET_MSDollMachineList DollMachinePacketID = 3004 +) + +// Enum value maps for DollMachinePacketID. +var ( + DollMachinePacketID_name = map[int32]string{ + 0: "PACKET_SMDollMachineZero", + 3001: "PACKET_SMDollMachineMove", + 3002: "PACKET_SMDollMachineGrab", + 3003: "PACKET_MSDollMachineGrab", + 3004: "PACKET_MSDollMachineList", + } + DollMachinePacketID_value = map[string]int32{ + "PACKET_SMDollMachineZero": 0, + "PACKET_SMDollMachineMove": 3001, + "PACKET_SMDollMachineGrab": 3002, + "PACKET_MSDollMachineGrab": 3003, + "PACKET_MSDollMachineList": 3004, + } +) + +func (x DollMachinePacketID) Enum() *DollMachinePacketID { + p := new(DollMachinePacketID) + *p = x + return p +} + +func (x DollMachinePacketID) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DollMachinePacketID) Descriptor() protoreflect.EnumDescriptor { + return file_dollmachine_proto_enumTypes[0].Descriptor() +} + +func (DollMachinePacketID) Type() protoreflect.EnumType { + return &file_dollmachine_proto_enumTypes[0] +} + +func (x DollMachinePacketID) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DollMachinePacketID.Descriptor instead. +func (DollMachinePacketID) EnumDescriptor() ([]byte, []int) { + return file_dollmachine_proto_rawDescGZIP(), []int{0} +} + +//移动 +type SMDollMachineMove struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Snid int32 `protobuf:"varint,1,opt,name=Snid,proto3" json:"Snid,omitempty"` + Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` //娃娃机标识 + Direction int32 `protobuf:"varint,3,opt,name=Direction,proto3" json:"Direction,omitempty"` // 1-前 2-后 3-左 4-右 +} + +func (x *SMDollMachineMove) Reset() { + *x = SMDollMachineMove{} + if protoimpl.UnsafeEnabled { + mi := &file_dollmachine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SMDollMachineMove) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SMDollMachineMove) ProtoMessage() {} + +func (x *SMDollMachineMove) ProtoReflect() protoreflect.Message { + mi := &file_dollmachine_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SMDollMachineMove.ProtoReflect.Descriptor instead. +func (*SMDollMachineMove) Descriptor() ([]byte, []int) { + return file_dollmachine_proto_rawDescGZIP(), []int{0} +} + +func (x *SMDollMachineMove) GetSnid() int32 { + if x != nil { + return x.Snid + } + return 0 +} + +func (x *SMDollMachineMove) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *SMDollMachineMove) GetDirection() int32 { + if x != nil { + return x.Direction + } + return 0 +} + +//下抓 +type SMDollMachineGrab struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeId int32 `protobuf:"varint,1,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //1-弱力抓 2 -强力抓 3-必出抓 + Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` //娃娃机标识 + Snid int32 `protobuf:"varint,3,opt,name=Snid,proto3" json:"Snid,omitempty"` +} + +func (x *SMDollMachineGrab) Reset() { + *x = SMDollMachineGrab{} + if protoimpl.UnsafeEnabled { + mi := &file_dollmachine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SMDollMachineGrab) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SMDollMachineGrab) ProtoMessage() {} + +func (x *SMDollMachineGrab) ProtoReflect() protoreflect.Message { + mi := &file_dollmachine_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SMDollMachineGrab.ProtoReflect.Descriptor instead. +func (*SMDollMachineGrab) Descriptor() ([]byte, []int) { + return file_dollmachine_proto_rawDescGZIP(), []int{1} +} + +func (x *SMDollMachineGrab) GetTypeId() int32 { + if x != nil { + return x.TypeId + } + return 0 +} + +func (x *SMDollMachineGrab) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *SMDollMachineGrab) GetSnid() int32 { + if x != nil { + return x.Snid + } + return 0 +} + +//返回下抓结果 +type MSDollMachineGrab struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Snid int32 `protobuf:"varint,1,opt,name=Snid,proto3" json:"Snid,omitempty"` + Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` //娃娃机标识 + Result int32 `protobuf:"varint,3,opt,name=Result,proto3" json:"Result,omitempty"` //1-中奖 其他未中奖 +} + +func (x *MSDollMachineGrab) Reset() { + *x = MSDollMachineGrab{} + if protoimpl.UnsafeEnabled { + mi := &file_dollmachine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MSDollMachineGrab) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MSDollMachineGrab) ProtoMessage() {} + +func (x *MSDollMachineGrab) ProtoReflect() protoreflect.Message { + mi := &file_dollmachine_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 MSDollMachineGrab.ProtoReflect.Descriptor instead. +func (*MSDollMachineGrab) Descriptor() ([]byte, []int) { + return file_dollmachine_proto_rawDescGZIP(), []int{2} +} + +func (x *MSDollMachineGrab) GetSnid() int32 { + if x != nil { + return x.Snid + } + return 0 +} + +func (x *MSDollMachineGrab) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *MSDollMachineGrab) GetResult() int32 { + if x != nil { + return x.Result + } + return 0 +} + +//返回所有娃娃机连接 +type MSDollMachineList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []*DollMachine `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` +} + +func (x *MSDollMachineList) Reset() { + *x = MSDollMachineList{} + if protoimpl.UnsafeEnabled { + mi := &file_dollmachine_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MSDollMachineList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MSDollMachineList) ProtoMessage() {} + +func (x *MSDollMachineList) ProtoReflect() protoreflect.Message { + mi := &file_dollmachine_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 MSDollMachineList.ProtoReflect.Descriptor instead. +func (*MSDollMachineList) Descriptor() ([]byte, []int) { + return file_dollmachine_proto_rawDescGZIP(), []int{3} +} + +func (x *MSDollMachineList) GetData() []*DollMachine { + if x != nil { + return x.Data + } + return nil +} + +type DollMachine struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` + Status int32 `protobuf:"varint,2,opt,name=Status,proto3" json:"Status,omitempty"` //1-空闲 2-无法使用 +} + +func (x *DollMachine) Reset() { + *x = DollMachine{} + if protoimpl.UnsafeEnabled { + mi := &file_dollmachine_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DollMachine) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DollMachine) ProtoMessage() {} + +func (x *DollMachine) ProtoReflect() protoreflect.Message { + mi := &file_dollmachine_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DollMachine.ProtoReflect.Descriptor instead. +func (*DollMachine) Descriptor() ([]byte, []int) { + return file_dollmachine_proto_rawDescGZIP(), []int{4} +} + +func (x *DollMachine) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *DollMachine) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +var File_dollmachine_proto protoreflect.FileDescriptor + +var file_dollmachine_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x64, 0x6f, 0x6c, 0x6c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x64, 0x6f, 0x6c, 0x6c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x22, 0x55, 0x0a, 0x11, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x11, 0x53, 0x4d, 0x44, 0x6f, 0x6c, + 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x47, 0x72, 0x61, 0x62, 0x12, 0x16, 0x0a, 0x06, + 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, + 0x70, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x02, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x22, 0x4f, 0x0a, 0x11, 0x4d, 0x53, 0x44, 0x6f, + 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x47, 0x72, 0x61, 0x62, 0x12, 0x12, 0x0a, + 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x41, 0x0a, 0x11, 0x4d, 0x53, 0x44, + 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2c, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, + 0x6f, 0x6c, 0x6c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x2e, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x35, 0x0a, 0x0b, + 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2a, 0xaf, 0x01, 0x0a, 0x13, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x18, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x4d, 0x6f, 0x76, 0x65, 0x10, 0xb9, 0x17, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, + 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x47, 0x72, 0x61, 0x62, 0x10, 0xba, 0x17, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, + 0x54, 0x5f, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x47, + 0x72, 0x61, 0x62, 0x10, 0xbb, 0x17, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, + 0x5f, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x10, 0xbc, 0x17, 0x42, 0x2b, 0x5a, 0x29, 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, 0x64, 0x6f, 0x6c, 0x6c, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_dollmachine_proto_rawDescOnce sync.Once + file_dollmachine_proto_rawDescData = file_dollmachine_proto_rawDesc +) + +func file_dollmachine_proto_rawDescGZIP() []byte { + file_dollmachine_proto_rawDescOnce.Do(func() { + file_dollmachine_proto_rawDescData = protoimpl.X.CompressGZIP(file_dollmachine_proto_rawDescData) + }) + return file_dollmachine_proto_rawDescData +} + +var file_dollmachine_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_dollmachine_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_dollmachine_proto_goTypes = []interface{}{ + (DollMachinePacketID)(0), // 0: dollmachine.DollMachinePacketID + (*SMDollMachineMove)(nil), // 1: dollmachine.SMDollMachineMove + (*SMDollMachineGrab)(nil), // 2: dollmachine.SMDollMachineGrab + (*MSDollMachineGrab)(nil), // 3: dollmachine.MSDollMachineGrab + (*MSDollMachineList)(nil), // 4: dollmachine.MSDollMachineList + (*DollMachine)(nil), // 5: dollmachine.DollMachine +} +var file_dollmachine_proto_depIdxs = []int32{ + 5, // 0: dollmachine.MSDollMachineList.data:type_name -> dollmachine.DollMachine + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_dollmachine_proto_init() } +func file_dollmachine_proto_init() { + if File_dollmachine_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_dollmachine_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SMDollMachineMove); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dollmachine_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SMDollMachineGrab); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dollmachine_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MSDollMachineGrab); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dollmachine_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MSDollMachineList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dollmachine_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DollMachine); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_dollmachine_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_dollmachine_proto_goTypes, + DependencyIndexes: file_dollmachine_proto_depIdxs, + EnumInfos: file_dollmachine_proto_enumTypes, + MessageInfos: file_dollmachine_proto_msgTypes, + }.Build() + File_dollmachine_proto = out.File + file_dollmachine_proto_rawDesc = nil + file_dollmachine_proto_goTypes = nil + file_dollmachine_proto_depIdxs = nil +} diff --git a/protocol/gameMachine/machine.proto b/protocol/dollmachine/dollmachine.proto similarity index 58% rename from protocol/gameMachine/machine.proto rename to protocol/dollmachine/dollmachine.proto index 00b6124..450795e 100644 --- a/protocol/gameMachine/machine.proto +++ b/protocol/dollmachine/dollmachine.proto @@ -1,27 +1,22 @@ syntax = "proto3"; -package machine; -option go_package = "mongo.games.com/game/protocol/machine"; +package dollmachine; +option go_package = "mongo.games.com/game/protocol/dollmachine"; //S-GAME M-娃娃机主机 - //娃娃机协议 enum DollMachinePacketID { PACKET_SMDollMachineZero = 0; - PACKET_SMGameLinkSucceed = 20000; - PACKET_SMDollMachinePerate = 20001; - PACKET_SMDollMachineGrab = 20002; - PACKET_MSDollMachineGrab = 20003; - PACKET_MSDollMachineList = 20004; -} -//通知链接成功 -message SMGameLinkSucceed{ + PACKET_SMDollMachineMove = 3001; + PACKET_SMDollMachineGrab = 3002; + PACKET_MSDollMachineGrab = 3003; + PACKET_MSDollMachineList = 3004; } -//操作 -message SMDollMachineoPerate{ +//移动 +message SMDollMachineMove{ int32 Snid = 1; int32 Id = 2; //娃娃机标识 - int32 Perate = 3; // 1-前 2-后 3-左 4-右 5-投币 + int32 Direction = 3; // 1-前 2-后 3-左 4-右 } //下抓 @@ -44,5 +39,5 @@ message MSDollMachineList{ } message DollMachine{ int32 Id = 1; - string VideoAddr = 2; + int32 Status = 2; //1-空闲 2-无法使用 } \ No newline at end of file diff --git a/protocol/gameMachine/machine.pb.go b/protocol/gameMachine/machine.pb.go deleted file mode 100644 index 576911a..0000000 --- a/protocol/gameMachine/machine.pb.go +++ /dev/null @@ -1,594 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1-devel -// protoc v3.19.4 -// source: machine.proto - -package machine - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -//娃娃机协议 -type DollMachinePacketID int32 - -const ( - DollMachinePacketID_PACKET_SMDollMachineZero DollMachinePacketID = 0 - DollMachinePacketID_PACKET_SMGameLinkSucceed DollMachinePacketID = 20000 - DollMachinePacketID_PACKET_SMDollMachinePerate DollMachinePacketID = 20001 - DollMachinePacketID_PACKET_SMDollMachineGrab DollMachinePacketID = 20002 - DollMachinePacketID_PACKET_MSDollMachineGrab DollMachinePacketID = 20003 - DollMachinePacketID_PACKET_MSDollMachineList DollMachinePacketID = 20004 -) - -// Enum value maps for DollMachinePacketID. -var ( - DollMachinePacketID_name = map[int32]string{ - 0: "PACKET_SMDollMachineZero", - 20000: "PACKET_SMGameLinkSucceed", - 20001: "PACKET_SMDollMachinePerate", - 20002: "PACKET_SMDollMachineGrab", - 20003: "PACKET_MSDollMachineGrab", - 20004: "PACKET_MSDollMachineList", - } - DollMachinePacketID_value = map[string]int32{ - "PACKET_SMDollMachineZero": 0, - "PACKET_SMGameLinkSucceed": 20000, - "PACKET_SMDollMachinePerate": 20001, - "PACKET_SMDollMachineGrab": 20002, - "PACKET_MSDollMachineGrab": 20003, - "PACKET_MSDollMachineList": 20004, - } -) - -func (x DollMachinePacketID) Enum() *DollMachinePacketID { - p := new(DollMachinePacketID) - *p = x - return p -} - -func (x DollMachinePacketID) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DollMachinePacketID) Descriptor() protoreflect.EnumDescriptor { - return file_machine_proto_enumTypes[0].Descriptor() -} - -func (DollMachinePacketID) Type() protoreflect.EnumType { - return &file_machine_proto_enumTypes[0] -} - -func (x DollMachinePacketID) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DollMachinePacketID.Descriptor instead. -func (DollMachinePacketID) EnumDescriptor() ([]byte, []int) { - return file_machine_proto_rawDescGZIP(), []int{0} -} - -//通知链接成功 -type SMGameLinkSucceed struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SMGameLinkSucceed) Reset() { - *x = SMGameLinkSucceed{} - if protoimpl.UnsafeEnabled { - mi := &file_machine_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SMGameLinkSucceed) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SMGameLinkSucceed) ProtoMessage() {} - -func (x *SMGameLinkSucceed) ProtoReflect() protoreflect.Message { - mi := &file_machine_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SMGameLinkSucceed.ProtoReflect.Descriptor instead. -func (*SMGameLinkSucceed) Descriptor() ([]byte, []int) { - return file_machine_proto_rawDescGZIP(), []int{0} -} - -//操作 -type SMDollMachineoPerate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Snid int32 `protobuf:"varint,1,opt,name=Snid,proto3" json:"Snid,omitempty"` - Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` //娃娃机标识 - Perate int32 `protobuf:"varint,3,opt,name=Perate,proto3" json:"Perate,omitempty"` // 1-前 2-后 3-左 4-右 5-投币 -} - -func (x *SMDollMachineoPerate) Reset() { - *x = SMDollMachineoPerate{} - if protoimpl.UnsafeEnabled { - mi := &file_machine_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SMDollMachineoPerate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SMDollMachineoPerate) ProtoMessage() {} - -func (x *SMDollMachineoPerate) ProtoReflect() protoreflect.Message { - mi := &file_machine_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SMDollMachineoPerate.ProtoReflect.Descriptor instead. -func (*SMDollMachineoPerate) Descriptor() ([]byte, []int) { - return file_machine_proto_rawDescGZIP(), []int{1} -} - -func (x *SMDollMachineoPerate) GetSnid() int32 { - if x != nil { - return x.Snid - } - return 0 -} - -func (x *SMDollMachineoPerate) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *SMDollMachineoPerate) GetPerate() int32 { - if x != nil { - return x.Perate - } - return 0 -} - -//下抓 -type SMDollMachineGrab struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TypeId int32 `protobuf:"varint,1,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //1-弱力抓 2 -强力抓 3-必出抓 - Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` //娃娃机标识 - Snid int32 `protobuf:"varint,3,opt,name=Snid,proto3" json:"Snid,omitempty"` -} - -func (x *SMDollMachineGrab) Reset() { - *x = SMDollMachineGrab{} - if protoimpl.UnsafeEnabled { - mi := &file_machine_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SMDollMachineGrab) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SMDollMachineGrab) ProtoMessage() {} - -func (x *SMDollMachineGrab) ProtoReflect() protoreflect.Message { - mi := &file_machine_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 SMDollMachineGrab.ProtoReflect.Descriptor instead. -func (*SMDollMachineGrab) Descriptor() ([]byte, []int) { - return file_machine_proto_rawDescGZIP(), []int{2} -} - -func (x *SMDollMachineGrab) GetTypeId() int32 { - if x != nil { - return x.TypeId - } - return 0 -} - -func (x *SMDollMachineGrab) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *SMDollMachineGrab) GetSnid() int32 { - if x != nil { - return x.Snid - } - return 0 -} - -//返回下抓结果 -type MSDollMachineGrab struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Snid int32 `protobuf:"varint,1,opt,name=Snid,proto3" json:"Snid,omitempty"` - Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` //娃娃机标识 - Result int32 `protobuf:"varint,3,opt,name=Result,proto3" json:"Result,omitempty"` //1-中奖 其他未中奖 -} - -func (x *MSDollMachineGrab) Reset() { - *x = MSDollMachineGrab{} - if protoimpl.UnsafeEnabled { - mi := &file_machine_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MSDollMachineGrab) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MSDollMachineGrab) ProtoMessage() {} - -func (x *MSDollMachineGrab) ProtoReflect() protoreflect.Message { - mi := &file_machine_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 MSDollMachineGrab.ProtoReflect.Descriptor instead. -func (*MSDollMachineGrab) Descriptor() ([]byte, []int) { - return file_machine_proto_rawDescGZIP(), []int{3} -} - -func (x *MSDollMachineGrab) GetSnid() int32 { - if x != nil { - return x.Snid - } - return 0 -} - -func (x *MSDollMachineGrab) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *MSDollMachineGrab) GetResult() int32 { - if x != nil { - return x.Result - } - return 0 -} - -//返回所有娃娃机连接 -type MSDollMachineList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []*DollMachine `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` -} - -func (x *MSDollMachineList) Reset() { - *x = MSDollMachineList{} - if protoimpl.UnsafeEnabled { - mi := &file_machine_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MSDollMachineList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MSDollMachineList) ProtoMessage() {} - -func (x *MSDollMachineList) ProtoReflect() protoreflect.Message { - mi := &file_machine_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MSDollMachineList.ProtoReflect.Descriptor instead. -func (*MSDollMachineList) Descriptor() ([]byte, []int) { - return file_machine_proto_rawDescGZIP(), []int{4} -} - -func (x *MSDollMachineList) GetData() []*DollMachine { - if x != nil { - return x.Data - } - return nil -} - -type DollMachine struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` - VideoAddr string `protobuf:"bytes,2,opt,name=VideoAddr,proto3" json:"VideoAddr,omitempty"` -} - -func (x *DollMachine) Reset() { - *x = DollMachine{} - if protoimpl.UnsafeEnabled { - mi := &file_machine_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DollMachine) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DollMachine) ProtoMessage() {} - -func (x *DollMachine) ProtoReflect() protoreflect.Message { - mi := &file_machine_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DollMachine.ProtoReflect.Descriptor instead. -func (*DollMachine) Descriptor() ([]byte, []int) { - return file_machine_proto_rawDescGZIP(), []int{5} -} - -func (x *DollMachine) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *DollMachine) GetVideoAddr() string { - if x != nil { - return x.VideoAddr - } - return "" -} - -var File_machine_proto protoreflect.FileDescriptor - -var file_machine_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x07, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x4d, 0x47, 0x61, - 0x6d, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x22, 0x52, 0x0a, - 0x14, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x6f, 0x50, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x50, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x22, 0x4f, 0x0a, 0x11, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x47, 0x72, 0x61, 0x62, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x0e, - 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, - 0x69, 0x64, 0x22, 0x4f, 0x0a, 0x11, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, - 0x69, 0x6e, 0x65, 0x47, 0x72, 0x61, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x22, 0x3d, 0x0a, 0x11, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, - 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x2e, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0x3b, 0x0a, 0x0b, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, - 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x2a, - 0xd5, 0x01, 0x0a, 0x13, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x50, - 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, - 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5a, - 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, - 0x53, 0x4d, 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, - 0x64, 0x10, 0xa0, 0x9c, 0x01, 0x12, 0x20, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, - 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x10, 0xa1, 0x9c, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, - 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x47, - 0x72, 0x61, 0x62, 0x10, 0xa2, 0x9c, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, - 0x54, 0x5f, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x47, - 0x72, 0x61, 0x62, 0x10, 0xa3, 0x9c, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, - 0x54, 0x5f, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, - 0x69, 0x73, 0x74, 0x10, 0xa4, 0x9c, 0x01, 0x42, 0x27, 0x5a, 0x25, 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, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_machine_proto_rawDescOnce sync.Once - file_machine_proto_rawDescData = file_machine_proto_rawDesc -) - -func file_machine_proto_rawDescGZIP() []byte { - file_machine_proto_rawDescOnce.Do(func() { - file_machine_proto_rawDescData = protoimpl.X.CompressGZIP(file_machine_proto_rawDescData) - }) - return file_machine_proto_rawDescData -} - -var file_machine_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_machine_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_machine_proto_goTypes = []interface{}{ - (DollMachinePacketID)(0), // 0: machine.DollMachinePacketID - (*SMGameLinkSucceed)(nil), // 1: machine.SMGameLinkSucceed - (*SMDollMachineoPerate)(nil), // 2: machine.SMDollMachineoPerate - (*SMDollMachineGrab)(nil), // 3: machine.SMDollMachineGrab - (*MSDollMachineGrab)(nil), // 4: machine.MSDollMachineGrab - (*MSDollMachineList)(nil), // 5: machine.MSDollMachineList - (*DollMachine)(nil), // 6: machine.DollMachine -} -var file_machine_proto_depIdxs = []int32{ - 6, // 0: machine.MSDollMachineList.data:type_name -> machine.DollMachine - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_machine_proto_init() } -func file_machine_proto_init() { - if File_machine_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_machine_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMGameLinkSucceed); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_machine_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMDollMachineoPerate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_machine_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMDollMachineGrab); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_machine_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MSDollMachineGrab); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_machine_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MSDollMachineList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_machine_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DollMachine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_machine_proto_rawDesc, - NumEnums: 1, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_machine_proto_goTypes, - DependencyIndexes: file_machine_proto_depIdxs, - EnumInfos: file_machine_proto_enumTypes, - MessageInfos: file_machine_proto_msgTypes, - }.Build() - File_machine_proto = out.File - file_machine_proto_rawDesc = nil - file_machine_proto_goTypes = nil - file_machine_proto_depIdxs = nil -}