Compare commits

..

No commits in common. "89aefd480a478d179fd901878cecf84eb28cd092" and "429c5e0a311b7fac9242facd1156fd0c629a0e75" have entirely different histories.

26 changed files with 1398 additions and 2978 deletions

Binary file not shown.

Binary file not shown.

View File

@ -39,7 +39,6 @@ const (
ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置 ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置
ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录 ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录
ETCDKEY_GUIDE = "/game/guide_config" //新手引导配置 ETCDKEY_GUIDE = "/game/guide_config" //新手引导配置
ETCDKEY_MACHINE = "/game/machine_config" //娃娃机配置
ETCDKEY_MatchAudience = "/game/match_audience" //比赛观众 ETCDKEY_MatchAudience = "/game/match_audience" //比赛观众
ETCDKEY_Spirit = "/game/spirit" // 小精灵配置 ETCDKEY_Spirit = "/game/spirit" // 小精灵配置
ETCDKEY_RoomType = "/game/room_type" // 房间类型配置 ETCDKEY_RoomType = "/game/room_type" // 房间类型配置

View File

@ -8,53 +8,18 @@ const (
ClawDollSceneStateStart //开始倒计时 ClawDollSceneStateStart //开始倒计时
ClawDollSceneStatePlayGame //游戏中 ClawDollSceneStatePlayGame //游戏中
ClawDollSceneStateBilled //结算 ClawDollSceneStateBilled //结算
ClawDollSceneWaitPayCoin //等待下一局投币
ClawDollSceneStateMax ClawDollSceneStateMax
) )
// 玩家状态
const ( const (
ClawDollPlayerStateWait int32 = iota //等待状态 ClawDollSceneWaitTimeout = time.Second * 2 //等待倒计时
ClawDollPlayerStateStart //开始倒计时 ClawDollSceneStartTimeout = time.Second * 6 //开始倒计时
ClawDollPlayerStatePlayGame //游戏中
ClawDollPlayerStateBilled //结算
ClawDollPlayerWaitPayCoin //等待下一局投币
ClawDollPlayerStateMax
)
const (
ClawDollSceneWaitTimeout = time.Second * 6 //等待倒计时
ClawDollSceneStartTimeout = time.Second * 1 //开始倒计时
ClawDollScenePlayTimeout = time.Second * 30 //娃娃机下抓倒计时
ClawDollSceneBilledTimeout = time.Second * 2 //结算 ClawDollSceneBilledTimeout = time.Second * 2 //结算
ClawDollSceneWaitPayCoinimeout = time.Second * 10 //等待下一局投币
) )
// 玩家操作 // 玩家操作
const ( const (
ClawDollPlayerOpPayCoin = iota + 1 // 上分 投币 ClawDollPlayerOpScore = iota + 1 // 上分
ClawDollPlayerOpGo // 下抓 ClawDollPlayerOpGo // 下抓
ClawDollPlayerOpMove // 玩家操控动作 // 1-前 2-后 3-左 4-右 ClawDollPlayerOpMove // 移动方向
ClawDollPlayerCancelPayCoin // 取消投币
)
// 1-前 2-后 3-左 4-右 5-投币
const (
ButtonFront = iota + 1 /*前*/
ButtonBack /*后*/
ButtonLeft /*左*/
ButtonRight /*右*/
ButtonPayCoin /*投币*/
)
const (
MoveStop = 0 /*移动停止*/
MoveStar = 1 /*移动开始*/
)
const (
ClawWeak = iota + 1 //弱力抓
ClawStrong //强力抓
ClawGain //必出抓
) )

View File

@ -1,221 +0,0 @@
package clawdoll
// queue队列容器包
// 以动态数组的形式实现
// 该容器可以在尾部实现线性增加元素,在首部实现线性减少元素
// 队列的扩容和缩容同vector一样,即数组小采用翻倍扩缩容/折半缩容,数组大时采用固定扩/缩容
// 该容器满足FIFO的先进先出模式
// 可接纳不同类型的元素
// queue队列结构体
// 包含泛型切片和该切片的首尾位的下标
// 当删除节点时仅仅需要后移首位一位即可
// 当剩余长度较小时采用缩容策略进行缩容以释放空间
// 当添加节点时若未占满全部已分配空间则尾指针后移一位同时进行覆盖存放
// 当添加节点时尾指针大于已分配空间长度,则先去掉首部多出来的空间,如果还不足则进行扩容
// 首节点指针始终不能超过尾节点指针
type Queue struct {
data []interface{} //泛型切片
begin uint64 //首节点下标
end uint64 //尾节点下标
cap uint64 //容量
}
//queue队列容器接口
//存放了queue容器可使用的函数
//对应函数介绍见下方
type queuer interface {
Size() (size uint64) //返回该队列中元素的使用空间大小
Clear() //清空该队列
Empty() (b bool) //判断该队列是否为空
Push(e interface{}) //将元素e添加到该队列末尾
Pop() (e interface{}) //将该队列首元素弹出并返回
Front() (e interface{}) //获取该队列首元素
Back() (e interface{}) //获取该队列尾元素
}
// 新建一个queue队列容器并返回
// 初始queue的切片数组为空
// 初始queue的首尾指针均置零
//
// @receiver nil
// @param nil
// @return q *Queue 新建的queue指针
func New() (q *Queue) {
return &Queue{
data: make([]interface{}, 1, 1),
begin: 0,
end: 0,
cap: 1,
}
}
// 返回该容器当前含有元素的数量
// 该长度并非实际占用空间数量
// 若容器为空则返回0
//
// @receiver q *Queue 接受者queue的指针
// @param nil
// @return size uint64 容器中实际使用元素所占空间大小
func (q *Queue) Size() (size uint64) {
if q == nil {
q = New()
}
return q.end - q.begin
}
// 以queue队列容器做接收者
// 将该容器中所承载的元素清空
// 将该容器的首尾指针均置0,容量设为1
//
// @receiver q *Queue 接受者queue的指针
// @param nil
// @return nil
func (q *Queue) Clear() {
if q == nil {
q = New()
}
q.data = make([]interface{}, 1, 1)
q.begin = 0
q.end = 0
q.cap = 1
}
// 判断该queue队列容器是否含有元素
// 如果含有元素则不为空,返回false
// 如果不含有元素则说明为空,返回true
// 如果容器不存在,返回true
// 该判断过程通过首尾指针数值进行判断
// 当尾指针数值等于首指针时说明不含有元素
// 当尾指针数值大于首指针时说明含有元素
//
// @receiver q *Queue 接受者queue的指针
// @param nil
// @return b bool 该容器是空的吗?
func (q *Queue) Empty() (b bool) {
if q == nil {
q = New()
}
return q.Size() <= 0
}
// 在容器尾部插入元素
// 若尾指针小于切片实际使用长度,则对当前指针位置进行覆盖,同时尾下标后移一位
// 若尾指针等于切片实际使用长度,则对实际使用量和实际占用量进行判断
// 当首部还有冗余时则删将实际使用整体前移到首部,否则对尾部进行扩容即可
//
// @receiver q *Queue 接受者queue的指针
// @param e interface{} 待插入元素
// @return nil
func (q *Queue) Push(e interface{}) {
if q == nil {
q = New()
}
if q.end < q.cap {
//不需要扩容
q.data[q.end] = e
} else {
//需要扩容
if q.begin > 0 {
//首部有冗余,整体前移
for i := uint64(0); i < q.end-q.begin; i++ {
q.data[i] = q.data[i+q.begin]
}
q.end -= q.begin
q.begin = 0
} else {
//冗余不足,需要扩容
if q.cap <= 65536 {
//容量翻倍
if q.cap == 0 {
q.cap = 1
}
q.cap *= 2
} else {
//容量增加2^16
q.cap += 2 ^ 16
}
//复制扩容前的元素
tmp := make([]interface{}, q.cap, q.cap)
copy(tmp, q.data)
q.data = tmp
}
q.data[q.end] = e
}
q.end++
}
// 弹出容器第一个元素,同时首下标后移一位
// 若容器为空,则不进行弹出
// 弹出结束后,进行缩容判断,考虑到queue的冗余会存在于前后两个方向
// 所以需要对前后两方分别做判断, 但由于首部主要是减少,并不会增加,所以不需要太多冗余量,而尾部只做添加,所以需要更多的冗余
// 所以可以对首部预留2^10的冗余,当超过时直接对首部冗余清除即可,释放首部空间时尾部空间仍然保留不变
// 当首部冗余不足2^10时,但冗余超过实际使用空间,也会对首部进行缩容,尾部不变
// 同时返回队首元素
//
// @receiver q *Queue 接受者queue的指针
// @param nil
// @return e interface{} 队首元素
func (q *Queue) Pop() (e interface{}) {
if q == nil {
q = New()
return nil
}
if q.Empty() {
q.Clear()
return nil
}
e = q.data[q.begin]
q.begin++
if q.begin >= 1024 || q.begin*2 > q.end {
//首部冗余超过2^10或首部冗余超过实际使用
q.cap -= q.begin
q.end -= q.begin
tmp := make([]interface{}, q.cap, q.cap)
copy(tmp, q.data[q.begin:])
q.data = tmp
q.begin = 0
}
return e
}
// 返回该容器的第一个元素
// 若该容器当前为空,则返回nil
//
// @receiver q *Queue 接受者queue的指针
// @param nil
// @return e interface{} 容器的第一个元素
func (q *Queue) Front() (e interface{}) {
if q == nil {
q = New()
return nil
}
if q.Empty() {
q.Clear()
return nil
}
return q.data[q.begin]
}
// 返回该容器的最后一个元素
// 若该容器当前为空,则返回nil
//
// @receiver q *Queue 接受者queue的指针
// @param nil
// @return e interface{} 容器的最后一个元素
func (q *Queue) Back() (e interface{}) {
if q == nil {
q = New()
return nil
}
if q.Empty() {
q.Clear()
return nil
}
return q.data[q.end-1]
}

View File

@ -4,77 +4,22 @@ import (
"mongo.games.com/game/protocol/machine" "mongo.games.com/game/protocol/machine"
"mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib" "mongo.games.com/goserver/core/netlib"
"sync"
) )
var MachineMap = make(map[int]*DollMachine) var MachineMap = make(map[int]string)
var MachineMapLock = sync.Mutex{}
type DollMachine struct { func MSDollMachineList(session *netlib.Session, packetId int, data interface{}) error {
Id int
MachineStatus int32 //娃娃机链接状态 0:离线 1:在线
Status bool //标记是否被占用
VideoAddr string
}
func MSDollMachineListHandler(session *netlib.Session, packetId int, data interface{}) error {
logger.Logger.Tracef("TestHandler %v", data) logger.Logger.Tracef("TestHandler %v", data)
MachineMap = make(map[int]*DollMachine) MachineMap = make(map[int]string)
if msg, ok := data.(*machine.MSDollMachineList); ok { if msg, ok := data.(*machine.MSDollMachineList); ok {
for i, info := range msg.Data { for i, info := range msg.Data {
MachineMap[i+1] = &DollMachine{ MachineMap[i+1] = info.VideoAddr
Id: i + 1,
Status: false,
VideoAddr: info.VideoAddr,
MachineStatus: 1,
}
logger.Logger.Tracef("MachineMap[%v] = %v", i, info.VideoAddr) logger.Logger.Tracef("MachineMap[%v] = %v", i, info.VideoAddr)
} }
} }
return nil return nil
} }
// 获取空闲娃娃机标识
func GetFreeDollMachineId() int {
// 获取互斥锁
MachineMapLock.Lock()
defer MachineMapLock.Unlock()
for i, v := range MachineMap {
if v.Status == false {
v.Status = true
return i
}
}
return 0
}
// 获取指定娃娃机链接状态
func GetDollMachineStatus(id int) int32 {
if MachineMap[id] == nil {
return 0
}
return MachineMap[id].MachineStatus
}
func MSUpdateDollMachineStatusHandler(session *netlib.Session, packetId int, data interface{}) error {
logger.Logger.Tracef("MSUpdateDollMachineStatusHandler %v", data)
if msg, ok := data.(*machine.MSUpdateDollMachineStatus); ok {
if MachineMap[int(msg.Id)] == nil {
MachineMap[int(msg.Id)] = &DollMachine{
Id: int(msg.Id),
Status: false,
VideoAddr: msg.VideoAddr,
MachineStatus: msg.Status,
}
} else {
MachineMap[int(msg.Id)].MachineStatus = msg.Status
}
logger.Logger.Tracef("更新娃娃机连接状态 id = %d,status= %d", msg.Id, msg.GetStatus())
}
return nil
}
func init() { func init() {
netlib.Register(int(machine.DollMachinePacketID_PACKET_MSDollMachineList), &machine.MSDollMachineList{}, MSDollMachineListHandler) netlib.Register(int(machine.DollMachinePacketID_PACKET_MSDollMachineList), &machine.MSDollMachineList{}, MSDollMachineList)
//更新娃娃机链接状态
netlib.Register(int(machine.DollMachinePacketID_PACKET_MSUpdateDollMachineStatus), &machine.MSUpdateDollMachineStatus{}, MSUpdateDollMachineStatusHandler)
} }

View File

@ -24,8 +24,6 @@ func init() {
etcd.Register(etcd.ETCDKEY_ChannelSwitch, webapi.ChannelSwitchConfig{}, platformConfigEtcd) etcd.Register(etcd.ETCDKEY_ChannelSwitch, webapi.ChannelSwitchConfig{}, platformConfigEtcd)
// 皮肤配置 // 皮肤配置
etcd.Register(etcd.ETCDKEY_SKin, webapi.SkinConfig{}, platformConfigEtcd) etcd.Register(etcd.ETCDKEY_SKin, webapi.SkinConfig{}, platformConfigEtcd)
// 娃娃机配置
etcd.Register(etcd.ETCDKEY_MACHINE, webapi.MachineConfig{}, platformConfigEtcd)
} }
func platformConfigEtcd(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) { func platformConfigEtcd(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
@ -43,8 +41,6 @@ func platformConfigEtcd(ctx context.Context, completeKey string, isInit bool, ev
ConfigMgrInst.GetConfig(d.Platform).ChannelSwitch[d.GetTp()] = d ConfigMgrInst.GetConfig(d.Platform).ChannelSwitch[d.GetTp()] = d
case *webapi.SkinConfig: case *webapi.SkinConfig:
ConfigMgrInst.GetConfig(d.Platform).SkinConfig = d ConfigMgrInst.GetConfig(d.Platform).SkinConfig = d
case *webapi.MachineConfig:
ConfigMgrInst.GetConfig(d.Platform).MachineConfig = d
default: default:
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey) logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
} }

View File

@ -2551,15 +2551,3 @@ func (this *Scene) TryRelease() {
this.Destroy(true) this.Destroy(true)
} }
} }
func (this *Scene) GetMachineServerSecret(MachineId int32, platform string) (AppId int64, ServerSecret string) {
config := ConfigMgrInst.GetConfig(platform).MachineConfig
if config == nil {
return 0, ""
}
for _, info := range config.Info {
if info.MachineId == MachineId {
return info.AppId, info.ServerSecret
}
}
return 0, ""
}

View File

@ -2,10 +2,8 @@ package clawdoll
import ( import (
"mongo.games.com/game/common" "mongo.games.com/game/common"
rule "mongo.games.com/game/gamerule/clawdoll"
"mongo.games.com/game/gamesrv/base" "mongo.games.com/game/gamesrv/base"
"mongo.games.com/game/protocol/clawdoll" "mongo.games.com/game/protocol/clawdoll"
"mongo.games.com/game/protocol/machine"
"mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib" "mongo.games.com/goserver/core/netlib"
) )
@ -50,129 +48,8 @@ func (h *CSPlayerOpHandler) Process(s *netlib.Session, packetid int, data interf
} }
return nil return nil
} }
func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data interface{}) error {
logger.Logger.Tracef("收到返回上分结果!!!!!!!!!!")
if msg, ok := data.(*machine.MSDollMachineoPerateResult); ok {
p := base.PlayerMgrSington.GetPlayerBySnId(msg.GetSnid())
if p == nil {
logger.Logger.Warn("CSGetTokenHandler p == nil")
return nil
}
scene := p.GetScene()
if scene == nil {
return nil
}
sceneEx, ok := scene.ExtraData.(*SceneEx)
if !ok {
return nil
}
switch msg.TypeId {
case 1:
if msg.Result == 1 {
logger.Logger.Tracef("上分成功snid = ", msg.Snid)
} else {
logger.Logger.Tracef("上分失败snid = ", msg.Snid)
}
case 2:
if msg.Result == 1 {
} else {
logger.Logger.Tracef("下抓失败snid = ", msg.Snid)
}
scene.ChangeSceneState(rule.ClawDollSceneStateBilled)
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateBilled))
ClawdollBroadcastRoomState(scene)
ClawdollSendPlayerInfo(scene)
}
}
return nil
}
type CSGetTokenPacketFactory struct {
}
type CSGetTokenHandler struct {
}
func (f *CSGetTokenPacketFactory) CreatePacket() interface{} {
pack := &clawdoll.CSCLAWDOLLGetToken{}
return pack
}
func (h *CSGetTokenHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
//转发到娃娃机主机
logger.Logger.Tracef("CSGetTokenHandler")
if _, ok := data.(*clawdoll.CSCLAWDOLLGetToken); ok {
p := base.PlayerMgrSington.GetPlayer(sid)
if p == nil {
logger.Logger.Warn("CSGetTokenHandler p == nil")
return nil
}
pack := &machine.SMGetToken{}
pack.Snid = p.SnId
scene := p.GetScene()
if scene == nil {
return nil
}
sceneEx, ok := scene.ExtraData.(*SceneEx)
if !ok {
return nil
}
machineId := scene.GetDBGameFree().GetId() % 6080000
appId, serverSecret := sceneEx.GetMachineServerSecret(machineId, p.Platform)
logger.Logger.Tracef("获取娃娃机 appId = %v, serverSecret = %v", appId, serverSecret)
if serverSecret == "" || appId == 0 {
return nil
}
pack.ServerSecret = serverSecret
pack.AppId = appId
sceneEx.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMGetToken), pack)
}
return nil
}
// 娃娃机返回token 通知客户端
func MSSendTokenHandler(session *netlib.Session, packetId int, data interface{}) error {
logger.Logger.Tracef("MSSendTokenHandler")
if msg, ok := data.(*machine.MSSendToken); ok {
//给客户端返回token
token := msg.Token
p := base.PlayerMgrSington.GetPlayerBySnId(msg.GetSnid())
if p == nil {
logger.Logger.Warn("MSSendTokenHandler p == nil")
return nil
}
scene := p.GetScene()
if scene == nil {
return nil
}
pack := &clawdoll.SCCLAWDOLLSendToken{
LogicId: scene.DBGameFree.GetId(),
Appid: msg.Appid,
Token: token,
}
p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_SENDTOKEN), pack)
}
return nil
}
func init() { func init() {
common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpHandler{}) common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_CLAWDOLL_PLAYEROP), &CSPlayerOpHandler{})
netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpPacketFactory{}) netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_CLAWDOLL_PLAYEROP), &CSPlayerOpPacketFactory{})
netlib.Register(int(machine.DollMachinePacketID_PACKET_MSDollMachineoPerateResult), &machine.MSDollMachineoPerateResult{}, MSDollMachineoCoinResultHandler)
//客户端请求token
common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_GETTOKEN), &CSGetTokenHandler{})
netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_GETTOKEN), &CSGetTokenPacketFactory{})
//获取token返回
netlib.Register(int(machine.DollMachinePacketID_PACKET_MSSendToken), &machine.MSSendToken{}, MSSendTokenHandler)
} }

View File

@ -8,10 +8,6 @@ import (
type PlayerEx struct { type PlayerEx struct {
*base.Player //玩家信息 *base.Player //玩家信息
clawDollState int32 // 抓娃娃状态
dollCardsCnt int32 // 娃娃卡数量
winDollCardType int32 // 本局赢取娃娃的类型
gainCoin int64 // 本局赢的金币 gainCoin int64 // 本局赢的金币
taxCoin int64 // 本局税收 taxCoin int64 // 本局税收
odds int32 odds int32
@ -35,37 +31,14 @@ func (this *PlayerEx) CanOp(sceneEx *SceneEx) bool {
return true return true
} }
// 能否投币 func (this *PlayerEx) CanPayCoinByPos() bool {
func (this *PlayerEx) CanPayCoin() bool {
return true
}
// 投币消耗 return false
func (this *PlayerEx) CostPlayCoin() bool {
return true
}
// 能否移动
func (this *PlayerEx) CanMove() bool {
return true
}
// 能否下抓
func (this *PlayerEx) CanGrab() bool {
return true
} }
// 游戏新一局 设置数据 // 游戏新一局 设置数据
func (this *PlayerEx) ReStartGame() { func (this *PlayerEx) ReStartGame() {
this.ReDataStartGame() this.ReDataStartGame()
this.UnmarkFlag(base.PlayerState_WaitNext)
this.UnmarkFlag(base.PlayerState_GameBreak)
this.MarkFlag(base.PlayerState_Ready)
this.gainCoin = 0 this.gainCoin = 0
this.taxCoin = 0 this.taxCoin = 0
this.odds = 0 this.odds = 0
@ -76,7 +49,7 @@ func (this *PlayerEx) InitData(baseScore int32) {
} }
// 重置数据 // 重置下注数据
func (this *PlayerEx) ResetData() { func (this *PlayerEx) ResetData() {
} }
@ -96,13 +69,3 @@ func (this *PlayerEx) CanLeaveScene(sceneState int) bool {
return true return true
} }
// 获取状态
func (this *PlayerEx) GetClawState() int32 {
return this.clawDollState
}
// 设置状态
func (this *PlayerEx) SetClawState(state int32) {
this.clawDollState = state
}

View File

@ -1,16 +1,13 @@
package clawdoll package clawdoll
import ( import (
"container/list" "mongo.games.com/game/protocol/clawdoll"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/game/common" "mongo.games.com/game/common"
rule "mongo.games.com/game/gamerule/clawdoll" rule "mongo.games.com/game/gamerule/clawdoll"
"mongo.games.com/game/gamesrv/base" "mongo.games.com/game/gamesrv/base"
"mongo.games.com/game/proto" "mongo.games.com/game/proto"
"mongo.games.com/game/protocol/clawdoll"
"mongo.games.com/game/protocol/machine"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib"
"mongo.games.com/goserver/srvlib"
) )
type PlayerData struct { type PlayerData struct {
@ -44,21 +41,15 @@ type SceneEx struct {
PlayerBackup map[int32]*PlayerData // 本局离场玩家数据备份 PlayerBackup map[int32]*PlayerData // 本局离场玩家数据备份
seats []*PlayerEx // 本局游戏中的玩家状态数据 seats []*PlayerEx // 本局游戏中的玩家状态数据
waitPlayers *list.List
playingSnid int32 // 正在玩的玩家snid
RoundId int // 局数,第几局 RoundId int // 局数,第几局
robotNum int // 参与游戏的机器人数量 robotNum int // 参与游戏的机器人数量
logid string logid string
machineId int //娃娃机ID
machineConn *netlib.Session //娃娃机链接
machineStatus int32 //娃娃机链接状态 0:离线 1:在线
} }
// 游戏是否能开始 // 游戏是否能开始
func (this *SceneEx) CanStart() bool { func (this *SceneEx) CanStart() bool {
//人数>=1自动开始 //人数>=1自动开始
if len(this.players) >= 1 && (this.GetRealPlayerNum() >= 1 || this.IsPreCreateScene() || this.IsHasPlaying()) { if len(this.players) >= 0 && (this.GetRealPlayerNum() >= 0 || this.IsPreCreateScene()) {
return true return true
} }
return false return false
@ -67,41 +58,19 @@ func (this *SceneEx) CanStart() bool {
// 从房间删除玩家 // 从房间删除玩家
func (this *SceneEx) delPlayer(p *base.Player) { func (this *SceneEx) delPlayer(p *base.Player) {
if p, exist := this.players[p.SnId]; exist { if p, exist := this.players[p.SnId]; exist {
//this.seats[p.GetPos()] = nil this.seats[p.GetPos()] = nil
delete(this.players, p.SnId) delete(this.players, p.SnId)
this.RemoveWaitPlayer(p.SnId)
} }
} }
// 广播玩家进入
func (this *SceneEx) BroadcastPlayerEnter(p *base.Player, reason int) {
pack := &clawdoll.SCCLAWDOLLPlayerEnter{}
pack.Data = &clawdoll.CLAWDOLLPlayerDigestInfo{}
pack.Data.SnId = p.GetSnId()
pack.Data.Head = p.Head
pack.Data.HeadUrl = p.HeadUrl
pack.Data.Name = p.Name
proto.SetDefaults(pack)
this.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PlayerEnter), pack, p.GetSid())
}
// 广播玩家离开 // 广播玩家离开
func (this *SceneEx) BroadcastPlayerLeave(p *base.Player, reason int) { func (this *SceneEx) BroadcastPlayerLeave(p *base.Player, reason int) {
scLeavePack := &clawdoll.SCCLAWDOLLPlayerLeave{ scLeavePack := &clawdoll.SCCLAWDOLLPlayerLeave{
SnId: proto.Int32(p.SnId), Pos: proto.Int(p.GetPos()),
} }
proto.SetDefaults(scLeavePack) proto.SetDefaults(scLeavePack)
this.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PlayerLeave), scLeavePack, p.GetSid()) this.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PlayerLeave), scLeavePack, p.GetSid())
}
// 玩家进入事件
func (this *SceneEx) OnPlayerEnter(p *base.Player, reason int) {
this.BroadcastPlayerEnter(p, reason)
} }
// 玩家离开事件 // 玩家离开事件
@ -119,7 +88,7 @@ func (e *SceneEx) playerOpPack(snId int32, opcode int, opRetCode clawdoll.OpResu
SnId: proto.Int32(snId), SnId: proto.Int32(snId),
OpCode: proto.Int32(int32(opcode)), OpCode: proto.Int32(int32(opcode)),
Params: params, Params: params,
OpRetCode: opRetCode, OpRetCode: clawdoll.OpResultCode_OPRC_Success,
} }
proto.SetDefaults(pack) proto.SetDefaults(pack)
@ -129,7 +98,7 @@ func (e *SceneEx) playerOpPack(snId int32, opcode int, opRetCode clawdoll.OpResu
// OnPlayerSCOp 发送玩家操作情况 // OnPlayerSCOp 发送玩家操作情况
func (e *SceneEx) OnPlayerSCOp(p *base.Player, opcode int, opRetCode clawdoll.OpResultCode, params []int64) { func (e *SceneEx) OnPlayerSCOp(p *base.Player, opcode int, opRetCode clawdoll.OpResultCode, params []int64) {
pack := e.playerOpPack(p.SnId, opcode, opRetCode, params) pack := e.playerOpPack(p.SnId, opcode, opRetCode, params)
p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYEROP), pack) p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PLAYEROP), pack)
logger.Logger.Tracef("OnPlayerSCOp %s", pack) logger.Logger.Tracef("OnPlayerSCOp %s", pack)
} }
@ -164,7 +133,6 @@ func (this *SceneEx) ClawdollCreateRoomInfoPacket(s *base.Scene, p *base.Player)
VIP: proto.Int32(playerEx.VIP), VIP: proto.Int32(playerEx.VIP),
WinCoin: proto.Int64(playerEx.gainCoin), WinCoin: proto.Int64(playerEx.gainCoin),
ClawDollState: proto.Int32(playerEx.clawDollState),
} }
pack.Players = append(pack.Players, pd) pack.Players = append(pack.Players, pd)
@ -184,8 +152,8 @@ func NewClawdollSceneData(s *base.Scene) *SceneEx {
Scene: s, Scene: s,
logic: new(rule.Logic), logic: new(rule.Logic),
players: make(map[int32]*PlayerEx), players: make(map[int32]*PlayerEx),
seats: make([]*PlayerEx, s.GetPlayerNum()),
PlayerBackup: make(map[int32]*PlayerData), PlayerBackup: make(map[int32]*PlayerData),
waitPlayers: list.New(),
} }
return sceneEx return sceneEx
@ -196,70 +164,23 @@ func (this *SceneEx) init() bool {
return true return true
} }
// 检查上分投币是否合法 // 检查上分是否合法
func (this *SceneEx) CheckPayCoinOp(p *PlayerEx) bool { func (this *SceneEx) CheckPayOp(betVal int64, takeMul int64) bool { //游戏底分
if p == nil {
return false
}
if p.SnId == this.playingSnid {
return true return true
} }
return false
}
// 检查移动是否合法
func (this *SceneEx) CheckMoveOp(p *PlayerEx) bool {
if p == nil {
return false
}
if p.SnId == this.playingSnid {
return true
}
return false
}
// 下抓是否合法
func (this *SceneEx) CheckGrapOp(p *PlayerEx) bool {
if p == nil {
return false
}
if p.SnId == this.playingSnid {
return true
}
return false
}
func (this *SceneEx) Clear() { func (this *SceneEx) Clear() {
this.robotNum = 0 this.robotNum = 0
this.PlayerBackup = make(map[int32]*PlayerData) this.PlayerBackup = make(map[int32]*PlayerData)
this.RoundId = 0 this.RoundId = 0
for e := this.waitPlayers.Front(); e != nil; e = e.Next() { for i := 0; i < this.GetPlayerNum(); i++ {
if e != nil { if this.seats[i] != nil {
p := e.Value.(*PlayerEx) this.seats[i].Clear(this.GetBaseScore())
p.Clear(0)
} }
} }
} }
// 是否有玩家正在玩
func (this *SceneEx) IsHasPlaying() bool {
if this.playingSnid == 0 {
return false
}
return true
}
// 等待下一个玩家
func (this *SceneEx) ReStartGame() {
this.playingSnid = 0
}
func (this *SceneEx) BackupPlayer(p *PlayerEx, isBilled bool) { func (this *SceneEx) BackupPlayer(p *PlayerEx, isBilled bool) {
this.PlayerBackup[p.SnId] = &PlayerData{ this.PlayerBackup[p.SnId] = &PlayerData{
SnId: p.SnId, SnId: p.SnId,
@ -282,107 +203,3 @@ func (this *SceneEx) BackupPlayer(p *PlayerEx, isBilled bool) {
BeUnderAgentCode: p.BeUnderAgentCode, BeUnderAgentCode: p.BeUnderAgentCode,
} }
} }
func (this *SceneEx) GetPlayGrabType(player *PlayerEx) int32 {
if player == nil {
return rule.ClawWeak
}
if this.RoundId%100 == 0 && this.RoundId != 0 {
return rule.ClawStrong
}
return rule.ClawWeak
}
func (this *SceneEx) AddWaitPlayer(player *PlayerEx) {
if player == nil {
return
}
this.waitPlayers.PushBack(player)
}
func (this *SceneEx) RemoveWaitPlayer(SnId int32) bool {
l := this.waitPlayers
for e := l.Front(); e != nil; e = e.Next() {
if p := e.Value.(*PlayerEx); p.SnId == SnId {
this.waitPlayers.Remove(e)
return true
}
}
return false
}
func (this *SceneEx) GetPlayingEx() *PlayerEx {
if this.playingSnid == 0 {
return nil
}
return this.players[this.playingSnid]
}
func (this *SceneEx) SetPlayingState(state int32) {
if this.playingSnid == 0 {
return
}
playerEx := this.players[this.playingSnid]
if playerEx != nil {
oldState := playerEx.GetClawState()
if oldState != state {
if oldState == rule.ClawDollPlayerStateWait && (state >= rule.ClawDollPlayerStateStart && state <= rule.ClawDollPlayerWaitPayCoin) {
ClawdollBroadcastPlayingInfo(this.Scene)
}
if state == rule.ClawDollPlayerStateWait && (oldState >= rule.ClawDollPlayerStateStart && oldState <= rule.ClawDollPlayerWaitPayCoin) {
ClawdollBroadcastPlayingInfo(this.Scene)
}
}
playerEx.SetClawState(state)
}
}
// 时间到 系统开始下抓
func (this *SceneEx) TimeOutPlayGrab() bool {
this.OnPlayerSMGrabOp(this.playingSnid, int32(this.machineId), rule.ClawWeak)
return true
}
// OnPlayerSMGrabOp 下抓 //1-弱力抓 2 -强力抓 3-必出抓
func (this *SceneEx) OnPlayerSMGrabOp(SnId, Id, GrabType int32) {
pack := &machine.SMDollMachineGrab{
Snid: proto.Int32(SnId),
Id: proto.Int32(Id),
TypeId: proto.Int32(GrabType),
}
this.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMDollMachineGrab), pack)
}
// OnPlayerSCOp 发送玩家操作情况 1-前 2-后 3-左 4-右 5-投币
func (this *SceneEx) OnPlayerSMPerateOp(SnId, Id, Perate int32) {
pack := &machine.SMDollMachineoPerate{
Snid: proto.Int32(SnId),
Id: proto.Int32(Id),
Perate: proto.Int32(Perate),
}
this.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMDollMachinePerate), pack)
}
// 向娃娃机主机发送消息
func (this *SceneEx) SendToMachine(pid int, msg interface{}) {
this.machineConn = srvlib.ServerSessionMgrSington.GetSession(1, 10, 1001)
if this.machineConn != nil {
this.machineConn.Send(pid, msg)
} else {
logger.Logger.Error("MachineConn is nil !")
}
}

View File

@ -1,9 +1,7 @@
package clawdoll package clawdoll
import ( import (
"mongo.games.com/game/gamesrv/action"
"mongo.games.com/game/protocol/clawdoll" "mongo.games.com/game/protocol/clawdoll"
"mongo.games.com/game/protocol/machine"
"time" "time"
"mongo.games.com/goserver/core" "mongo.games.com/goserver/core"
@ -63,31 +61,6 @@ func (this *PolicyClawdoll) OnTick(s *base.Scene) {
if s.SceneState != nil { if s.SceneState != nil {
s.SceneState.OnTick(s) s.SceneState.OnTick(s)
} }
sceneEx, ok := s.ExtraData.(*SceneEx)
if ok {
if sceneEx.machineId == 0 {
sceneEx.machineId = action.GetFreeDollMachineId()
}
if sceneEx.machineId != 0 {
machineStatus := action.GetDollMachineStatus(sceneEx.machineId)
if machineStatus == 0 {
//链接状态不可用 踢出所有玩家
for _, p := range sceneEx.players {
sceneEx.delPlayer(p.Player)
}
sceneEx.machineStatus = 0
logger.Logger.Trace("娃娃机离线,当前场景暂停服务!")
//通知客户单房间不可用
} else {
if sceneEx.machineStatus == 0 {
sceneEx.machineStatus = machineStatus
//通知客户端房间可用
}
}
}
}
} }
func (this *PolicyClawdoll) OnPlayerEnter(s *base.Scene, p *base.Player) { func (this *PolicyClawdoll) OnPlayerEnter(s *base.Scene, p *base.Player) {
@ -96,33 +69,37 @@ func (this *PolicyClawdoll) OnPlayerEnter(s *base.Scene, p *base.Player) {
} }
logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.SnId) logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.SnId)
if sceneEx, ok := s.ExtraData.(*SceneEx); ok { 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} playerEx := &PlayerEx{Player: p}
sceneEx.seats[pos] = playerEx
sceneEx.players[p.SnId] = playerEx sceneEx.players[p.SnId] = playerEx
baseScore := sceneEx.GetBaseScore() baseScore := sceneEx.GetBaseScore()
p.Pos = pos
p.ExtraData = playerEx p.ExtraData = playerEx
playerEx.Clear(baseScore) playerEx.Clear(baseScore)
if sceneEx.playingSnid == 0 { if sceneEx.Gaming {
//sceneEx.playingSnid = p.GetSnId()
}
p.MarkFlag(base.PlayerState_WaitNext) p.MarkFlag(base.PlayerState_WaitNext)
p.UnmarkFlag(base.PlayerState_Ready) p.UnmarkFlag(base.PlayerState_Ready)
}
//给自己发送房间信息 //给自己发送房间信息
this.SendRoomInfo(s, p, sceneEx) this.SendRoomInfo(s, p, sceneEx)
ClawdollBroadcastRoomWaitPlayers(s)
ClawdollBroadcastPlayingInfo(s)
// 玩家数据发送
sceneEx.OnPlayerEnter(p, 0)
this.SendGetVideoToken(s, p, sceneEx)
s.FirePlayerEvent(p, base.PlayerEventEnter, nil) s.FirePlayerEvent(p, base.PlayerEventEnter, nil)
} }
} }
}
func (this *PolicyClawdoll) OnPlayerLeave(s *base.Scene, p *base.Player, reason int) { func (this *PolicyClawdoll) OnPlayerLeave(s *base.Scene, p *base.Player, reason int) {
logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerLeave, sceneId=", s.GetSceneId(), " player=", p.SnId) logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerLeave, sceneId=", s.GetSceneId(), " player=", p.SnId)
@ -174,10 +151,6 @@ func (this *PolicyClawdoll) OnPlayerRehold(s *base.Scene, p *base.Player) {
p.MarkFlag(base.PlayerState_Ready) p.MarkFlag(base.PlayerState_Ready)
} }
this.SendRoomInfo(s, p, sceneEx) this.SendRoomInfo(s, p, sceneEx)
ClawdollBroadcastRoomWaitPlayers(s)
ClawdollBroadcastPlayingInfo(s)
this.SendGetVideoToken(s, p, sceneEx)
s.FirePlayerEvent(p, base.PlayerEventRehold, nil) s.FirePlayerEvent(p, base.PlayerEventRehold, nil)
} }
} }
@ -195,10 +168,6 @@ func (this *PolicyClawdoll) OnPlayerReturn(s *base.Scene, p *base.Player) {
p.MarkFlag(base.PlayerState_Ready) p.MarkFlag(base.PlayerState_Ready)
} }
this.SendRoomInfo(s, p, sceneEx) this.SendRoomInfo(s, p, sceneEx)
ClawdollBroadcastRoomWaitPlayers(s)
ClawdollBroadcastPlayingInfo(s)
this.SendGetVideoToken(s, p, sceneEx)
s.FirePlayerEvent(p, base.PlayerEventReturn, nil) s.FirePlayerEvent(p, base.PlayerEventReturn, nil)
} }
} }
@ -238,6 +207,9 @@ func (this *PolicyClawdoll) IsCompleted(s *base.Scene) bool {
} }
func (this *PolicyClawdoll) IsCanForceStart(s *base.Scene) bool { func (this *PolicyClawdoll) IsCanForceStart(s *base.Scene) bool {
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
return len(s.Players) >= 2 && !sceneEx.Gaming
}
return false return false
} }
@ -262,38 +234,8 @@ func (this *PolicyClawdoll) CanChangeCoinScene(s *base.Scene, p *base.Player) bo
} }
func (this *PolicyClawdoll) SendRoomInfo(s *base.Scene, p *base.Player, sceneEx *SceneEx) { func (this *PolicyClawdoll) SendRoomInfo(s *base.Scene, p *base.Player, sceneEx *SceneEx) {
if s == nil || p == nil || sceneEx == nil {
return
}
pack := sceneEx.ClawdollCreateRoomInfoPacket(s, p) pack := sceneEx.ClawdollCreateRoomInfoPacket(s, p)
p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_ROOMINFO), pack)
p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_ROOMINFO), pack)
}
func (this *PolicyClawdoll) SendGetVideoToken(s *base.Scene, p *base.Player, sceneEx *SceneEx) {
//转发到娃娃机主机
if s == nil || p == nil || sceneEx == nil {
return
}
logger.Logger.Tracef("ClawdollGetVideoToken")
if p == nil {
logger.Logger.Warn("ClawdollGetVideoToken p == nil")
return
}
pack := &machine.SMGetToken{}
pack.Snid = p.SnId
machineId := s.DBGameFree.GetId() % 6080000
appId, serverSecret := sceneEx.GetMachineServerSecret(machineId, p.Platform)
logger.Logger.Tracef("获取娃娃机 appId = %v, serverSecret = %v", appId, serverSecret)
if serverSecret == "" || appId == 0 {
return
}
pack.ServerSecret = serverSecret
pack.AppId = appId
sceneEx.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMGetToken), pack)
} }
// 广播房间状态 // 广播房间状态
@ -302,79 +244,7 @@ func ClawdollBroadcastRoomState(s *base.Scene, params ...float32) {
State: proto.Int(s.SceneState.GetState()), State: proto.Int(s.SceneState.GetState()),
Params: params, Params: params,
} }
s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_ROOMSTATE), pack, 0) s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_ROOMSTATE), pack, 0)
}
// 玩家状态信息变化
func ClawdollSendPlayerInfo(s *base.Scene) {
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
playerEx := sceneEx.GetPlayingEx()
if playerEx != nil && playerEx.SnId == sceneEx.playingSnid {
pack := &clawdoll.SCCLAWDOLLPlayerInfo{
SnId: proto.Int32(playerEx.SnId),
ClawDollState: proto.Int32(playerEx.GetClawState()),
Coin: proto.Int64(playerEx.Coin),
GainCoin: proto.Int64(playerEx.gainCoin),
}
proto.SetDefaults(pack)
playerEx.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYERINFO), pack)
}
}
}
// 广播房间里所有等待玩家信息
func ClawdollBroadcastRoomWaitPlayers(s *base.Scene) {
pack := &clawdoll.CLAWDOLLWaitPlayers{}
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
for _, playerEx := range sceneEx.players {
// 玩家信息
if playerEx.SnId != sceneEx.playingSnid {
pd := &clawdoll.CLAWDOLLPlayerDigestInfo{
SnId: proto.Int32(playerEx.SnId),
Head: proto.Int32(playerEx.Head),
HeadUrl: proto.String(playerEx.HeadUrl),
Name: proto.String(playerEx.Name),
}
pack.WaitPlayersInfo = append(pack.WaitPlayersInfo, pd)
}
}
s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_WAITPLAYERS), pack, 0)
}
}
// 广播房间正在控制娃娃机的玩家信息
func ClawdollBroadcastPlayingInfo(s *base.Scene) {
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
if !sceneEx.IsHasPlaying() {
pack := &clawdoll.CLAWDOLLPlayerDigestInfo{
SnId: proto.Int32(0),
Head: proto.Int32(0),
}
s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYINGINFO), pack, 0)
return
}
playerEx := sceneEx.GetPlayingEx()
if playerEx != nil && playerEx.SnId == sceneEx.playingSnid {
pack := &clawdoll.CLAWDOLLPlayerDigestInfo{
SnId: proto.Int32(playerEx.SnId),
Head: proto.Int32(playerEx.Head),
HeadUrl: proto.String(playerEx.HeadUrl),
Name: proto.String(playerEx.Name),
}
s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYINGINFO), pack, 0)
//playerEx.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYERINFO), pack)
}
}
} }
//===================================== //=====================================
@ -397,14 +267,14 @@ func (this *BaseState) CanChangeTo(s base.SceneState) bool {
func (this *BaseState) CanChangeCoinScene(s *base.Scene, p *base.Player) bool { func (this *BaseState) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
playerEx, ok := p.ExtraData.(*PlayerEx) //playerEx, ok := p.ExtraData.(*PlayerEx)
if !ok { //if !ok {
return false // return false
} //}
//
if !playerEx.CanLeaveScene(s.GetSceneState().GetState()) { //if !playerEx.CanLeaveScene(s.GetSceneState().GetState()) {
return false // return false
} //}
return true return true
} }
@ -418,7 +288,6 @@ func (this *BaseState) OnEnter(s *base.Scene) {
func (this *BaseState) OnLeave(s *base.Scene) {} func (this *BaseState) OnLeave(s *base.Scene) {}
func (this *BaseState) OnTick(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 { func (this *BaseState) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
@ -449,19 +318,23 @@ func (this *StateWait) CanChangeTo(s base.SceneState) bool {
} }
func (this *StateWait) GetTimeout(s *base.Scene) int { func (this *StateWait) GetTimeout(s *base.Scene) int {
return this.BaseState.GetTimeout(s) return this.BaseState.GetTimeout(s)
} }
func (this *StateWait) OnEnter(s *base.Scene) { func (this *StateWait) OnEnter(s *base.Scene) {
this.BaseState.OnEnter(s) this.BaseState.OnEnter(s)
if _, ok := s.ExtraData.(*SceneEx); ok { if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
if s.Gaming { if s.Gaming {
s.NotifySceneRoundPause() s.NotifySceneRoundPause()
} }
s.Gaming = false s.Gaming = false
ClawdollBroadcastRoomState(s) ClawdollBroadcastRoomState(s, float32(0), float32(0))
ClawdollSendPlayerInfo(s)
if sceneEx.CanStart() {
s.ChangeSceneState(rule.ClawDollSceneStateStart)
}
} }
} }
@ -488,51 +361,13 @@ func (this *StateWait) OnTick(s *base.Scene) {
sceneEx.SceneDestroy(true) sceneEx.SceneDestroy(true)
return return
} }
} if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneWaitTimeout {
} //切换到准备开局状态
func (this *StateWait) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
if this.BaseState.OnPlayerOp(s, p, opcode, params) {
return true
}
sceneEx, ok := s.ExtraData.(*SceneEx)
if !ok {
return false
}
playerEx, ok := p.ExtraData.(*PlayerEx)
if !ok {
return false
}
switch opcode {
case rule.ClawDollPlayerOpPayCoin:
if sceneEx.IsHasPlaying() {
return false
}
if !playerEx.CanPayCoin() {
return false
}
// 1-前 2-后 3-左 4-右 5-投币
sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonPayCoin)
if sceneEx.CanStart() { if sceneEx.CanStart() {
sceneEx.playingSnid = playerEx.SnId
s.ChangeSceneState(rule.ClawDollSceneStateStart) s.ChangeSceneState(rule.ClawDollSceneStateStart)
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateStart))
ClawdollBroadcastRoomState(s)
ClawdollSendPlayerInfo(s)
ClawdollBroadcastPlayingInfo(s)
sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params)
} }
} }
}
return false
} }
//===================================== //=====================================
@ -551,8 +386,6 @@ func (this *StateStart) CanChangeTo(s base.SceneState) bool {
switch s.GetState() { switch s.GetState() {
case rule.ClawDollSceneStatePlayGame: case rule.ClawDollSceneStatePlayGame:
return true return true
case rule.ClawDollSceneStateWait:
return true
} }
return false return false
} }
@ -560,12 +393,11 @@ func (this *StateStart) CanChangeTo(s base.SceneState) bool {
func (this *StateStart) OnEnter(s *base.Scene) { func (this *StateStart) OnEnter(s *base.Scene) {
this.BaseState.OnEnter(s) this.BaseState.OnEnter(s)
if sceneEx, ok := s.ExtraData.(*SceneEx); ok { if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
ClawdollBroadcastRoomState(s) ClawdollBroadcastRoomState(s, float32(0), float32(0))
ClawdollSendPlayerInfo(s)
s.Gaming = false s.Gaming = false
sceneEx.GameNowTime = time.Now() sceneEx.GameNowTime = time.Now()
sceneEx.NumOfGames++ sceneEx.NumOfGames++
} }
} }
@ -574,24 +406,32 @@ func (this *StateStart) OnTick(s *base.Scene) {
if sceneEx, ok := s.ExtraData.(*SceneEx); ok { if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneStartTimeout { if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneStartTimeout {
//切换到等待操作状态 //切换到等待操作状态
if sceneEx.CanStart() {
s.ChangeSceneState(rule.ClawDollSceneStatePlayGame) s.ChangeSceneState(rule.ClawDollSceneStatePlayGame)
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStatePlayGame)) } else {
s.ChangeSceneState(rule.ClawDollSceneStateWait)
ClawdollBroadcastRoomState(s) }
ClawdollSendPlayerInfo(s)
} }
} }
} }
func (this *StateStart) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool { 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 return false
} }
func (this *StateStart) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) { 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) logger.Logger.Trace("(this *StateStart) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " evtcode=", evtcode)
this.BaseState.OnPlayerEvent(s, p, evtcode, params) this.BaseState.OnPlayerEvent(s, p, evtcode, params)
if _, ok := s.ExtraData.(*SceneEx); ok { if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
switch evtcode { switch evtcode {
case base.PlayerEventLeave:
if !sceneEx.CanStart() {
s.ChangeSceneState(rule.ClawDollSceneStateWait)
}
case base.PlayerEventEnter: case base.PlayerEventEnter:
if !p.IsReady() { if !p.IsReady() {
p.MarkFlag(base.PlayerState_Ready) p.MarkFlag(base.PlayerState_Ready)
@ -627,8 +467,7 @@ func (this *PlayGame) OnEnter(s *base.Scene) {
s.Gaming = true s.Gaming = true
ClawdollBroadcastRoomState(s) ClawdollBroadcastRoomState(s, float32(0), float32(0))
ClawdollSendPlayerInfo(s)
} }
@ -640,65 +479,11 @@ func (this *PlayGame) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, para
return true return true
} }
sceneEx, ok := s.ExtraData.(*SceneEx)
if !ok {
return false
}
playerEx, ok := p.ExtraData.(*PlayerEx)
if !ok {
return false
}
switch opcode {
case rule.ClawDollPlayerOpGo:
if !sceneEx.CheckGrapOp(playerEx) {
return false
}
if !playerEx.CanGrab() {
return false
}
grapType := sceneEx.GetPlayGrabType(playerEx)
logger.Logger.Trace("StatePlayGame OnPlayerOp-----SnId:", p.SnId, " grapType: ", grapType)
//1-弱力抓 2 -强力抓
sceneEx.OnPlayerSMGrabOp(p.SnId, int32(sceneEx.machineId), grapType)
case rule.ClawDollPlayerOpMove:
if !sceneEx.CheckMoveOp(playerEx) {
return false
}
if !playerEx.CanMove() {
return false
}
if params[0] < rule.ButtonFront || params[0] > rule.ButtonRight {
logger.Logger.Trace("StatePlayGame OnPlayerOp-----SnId:", p.SnId, " opcode: ", opcode, " params:", params)
return false
}
// 1-前 2-后 3-左 4-右 5-投币
sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), int32(params[0]))
}
return false return false
} }
func (this *PlayGame) OnTick(s *base.Scene) { func (this *PlayGame) OnTick(s *base.Scene) {
this.BaseState.OnTick(s) this.BaseState.OnTick(s)
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollScenePlayTimeout {
if sceneEx.TimeOutPlayGrab() {
logger.Logger.Trace("PlayGame OnTick TimeOutPlayGrab SnId", sceneEx.playingSnid, " machineId:", sceneEx.machineId)
}
return
}
}
} }
//===================================== //=====================================
@ -715,7 +500,7 @@ func (this *StateBilled) GetState() int {
func (this *StateBilled) CanChangeTo(s base.SceneState) bool { func (this *StateBilled) CanChangeTo(s base.SceneState) bool {
switch s.GetState() { switch s.GetState() {
case rule.ClawDollSceneWaitPayCoin: case rule.ClawDollSceneStateStart:
return true return true
} }
return false return false
@ -728,26 +513,6 @@ func (this *StateBilled) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, p
func (this *StateBilled) OnEnter(s *base.Scene) { func (this *StateBilled) OnEnter(s *base.Scene) {
logger.Logger.Trace("(this *StateBilled) OnEnter, sceneid=", s.GetSceneId()) logger.Logger.Trace("(this *StateBilled) OnEnter, sceneid=", s.GetSceneId())
this.BaseState.OnEnter(s) this.BaseState.OnEnter(s)
sceneEx, ok := s.ExtraData.(*SceneEx)
if !ok {
return
}
playerEx := sceneEx.GetPlayingEx()
if playerEx != nil {
pack := &clawdoll.SCCLAWDOLLRoundGameBilled{
RoundId: proto.Int32(int32(sceneEx.RoundId)),
ClowResult: proto.Int32(0),
Award: proto.Int64(playerEx.gainCoin),
Balance: proto.Int64(playerEx.Coin),
}
// logger.Logger.Trace("SCSmallRocketRoundGameBilled is pack: ", pack)
proto.SetDefaults(pack)
playerEx.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_GAMEBILLED), pack)
}
} }
func (this *StateBilled) OnLeave(s *base.Scene) { func (this *StateBilled) OnLeave(s *base.Scene) {
@ -767,138 +532,11 @@ func (this *StateBilled) OnTick(s *base.Scene) {
this.BaseState.OnTick(s) this.BaseState.OnTick(s)
if sceneEx, ok := s.ExtraData.(*SceneEx); ok { if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneBilledTimeout { if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneBilledTimeout {
if sceneEx.CanStart() {
s.ChangeSceneState(rule.ClawDollSceneWaitPayCoin)
sceneEx.SetPlayingState(int32(rule.ClawDollSceneWaitPayCoin))
ClawdollBroadcastRoomState(s)
ClawdollSendPlayerInfo(s)
return
}
}
}
//=====================================
// StateWaitPayCoin 等待下一局投币
//=====================================
type StateWaitPayCoin struct {
BaseState
}
func (this *StateWaitPayCoin) GetState() int {
return rule.ClawDollSceneWaitPayCoin
}
func (this *StateWaitPayCoin) CanChangeTo(s base.SceneState) bool {
switch s.GetState() {
case rule.ClawDollSceneStateStart:
return true
case rule.ClawDollSceneStateWait:
return true
}
return false
}
func (this *StateWaitPayCoin) 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
}
sceneEx, ok := s.ExtraData.(*SceneEx)
if !ok {
return false
}
playerEx, ok := p.ExtraData.(*PlayerEx)
if !ok {
return false
}
switch opcode {
case rule.ClawDollPlayerOpPayCoin:
if sceneEx.playingSnid != playerEx.SnId {
logger.Logger.Trace("StateWaitPayCoin OnPlayerOp-----sceneEx.playingSnid:", sceneEx.playingSnid, " playerEx.SnId: ", playerEx.SnId)
return false
}
// 投币检测
if !playerEx.CanPayCoin() {
logger.Logger.Trace("StateWaitPayCoin OnPlayerOp-----CanPayCoin: false")
return false
}
sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonPayCoin)
playerEx.ReStartGame()
s.ChangeSceneState(rule.ClawDollSceneStateStart) s.ChangeSceneState(rule.ClawDollSceneStateStart)
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateStart)) } else {
ClawdollBroadcastRoomState(s)
ClawdollSendPlayerInfo(s)
sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params)
case rule.ClawDollPlayerCancelPayCoin:
if sceneEx.playingSnid != playerEx.SnId {
logger.Logger.Trace("StateWaitPayCoin OnPlayerOp-----sceneEx.playingSnid:", sceneEx.playingSnid, " playerEx.SnId: ", playerEx.SnId)
return false
}
// 先设置时间
playingEx := sceneEx.GetPlayingEx()
if playingEx != nil {
playingEx.ReStartGame()
ClawdollSendPlayerInfo(s)
}
// 再重置scene数据
sceneEx.ReStartGame()
s.ChangeSceneState(rule.ClawDollSceneStateWait) s.ChangeSceneState(rule.ClawDollSceneStateWait)
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateWait))
ClawdollBroadcastRoomState(s)
ClawdollBroadcastPlayingInfo(s)
} }
return false
}
func (this *StateWaitPayCoin) OnEnter(s *base.Scene) {
logger.Logger.Trace("(this *StateWaitPayCoin) OnEnter, sceneid=", s.GetSceneId())
this.BaseState.OnEnter(s)
}
func (this *StateWaitPayCoin) OnLeave(s *base.Scene) {
logger.Logger.Trace("(this *StateWaitPayCoin) OnLeave, sceneid=", s.GetSceneId())
this.BaseState.OnLeave(s)
}
func (this *StateWaitPayCoin) OnTick(s *base.Scene) {
this.BaseState.OnTick(s)
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneWaitPayCoinimeout {
// 先设置时间
playingEx := sceneEx.GetPlayingEx()
if playingEx != nil {
playingEx.ReStartGame()
ClawdollSendPlayerInfo(s)
}
// 再重置scene数据
sceneEx.ReStartGame()
s.ChangeSceneState(rule.ClawDollSceneStateWait)
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateWait))
ClawdollBroadcastRoomState(s)
ClawdollBroadcastPlayingInfo(s)
return return
} }
} }
@ -929,7 +567,6 @@ func init() {
PolicyClawdollSingleton.RegisteSceneState(&StateStart{}) PolicyClawdollSingleton.RegisteSceneState(&StateStart{})
PolicyClawdollSingleton.RegisteSceneState(&PlayGame{}) PolicyClawdollSingleton.RegisteSceneState(&PlayGame{})
PolicyClawdollSingleton.RegisteSceneState(&StateBilled{}) PolicyClawdollSingleton.RegisteSceneState(&StateBilled{})
PolicyClawdollSingleton.RegisteSceneState(&StateWaitPayCoin{})
core.RegisteHook(core.HOOK_BEFORE_START, func() error { core.RegisteHook(core.HOOK_BEFORE_START, func() error {
base.RegisteScenePolicy(common.GameId_Clawdoll, 0, PolicyClawdollSingleton) base.RegisteScenePolicy(common.GameId_Clawdoll, 0, PolicyClawdollSingleton)

View File

@ -19,7 +19,6 @@ import (
// game // game
_ "mongo.games.com/game/gamesrv/chess" _ "mongo.games.com/game/gamesrv/chess"
_ "mongo.games.com/game/gamesrv/clawdoll"
_ "mongo.games.com/game/gamesrv/fishing" _ "mongo.games.com/game/gamesrv/fishing"
_ "mongo.games.com/game/gamesrv/smallrocket" _ "mongo.games.com/game/gamesrv/smallrocket"
_ "mongo.games.com/game/gamesrv/thirteen" _ "mongo.games.com/game/gamesrv/thirteen"

View File

@ -1,315 +1,105 @@
package action package action
import ( import (
"bytes"
"fmt" "fmt"
"github.com/zegoim/zego_server_assistant/token/go/src/token04"
"math"
"mongo.games.com/game/machine/machinedoll" "mongo.games.com/game/machine/machinedoll"
"mongo.games.com/game/protocol/machine" "mongo.games.com/game/protocol/machine"
"mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib" "mongo.games.com/goserver/core/netlib"
"mongo.games.com/goserver/core/timer"
"sync"
"time" "time"
) )
type ConnMessageQueue struct {
queue chan []interface{}
conn *machinedoll.Conn
waitGroup *sync.WaitGroup
}
var connMessageQueues = make(map[*machinedoll.Conn]*ConnMessageQueue)
func Process(conn *machinedoll.Conn, f1 []func(), f2 []func()) {
// 获取或创建该 conn 对应的消息队列
queue, ok := connMessageQueues[conn]
if !ok {
queue = &ConnMessageQueue{
queue: make(chan []interface{}, 100),
conn: conn,
waitGroup: new(sync.WaitGroup),
}
connMessageQueues[conn] = queue
go processConnMessageQueue(queue)
}
// 将消息添加到队列中
queue.queue <- []interface{}{f1, f2}
}
func processConnMessageQueue(queue *ConnMessageQueue) {
for msg := range queue.queue {
f1 := msg[0].([]func())
f2 := msg[1].([]func())
queue.waitGroup.Add(len(f1))
for _, f := range f1 {
go func(f func()) {
defer queue.waitGroup.Done()
f()
}(f)
}
queue.waitGroup.Wait()
if len(f2) > 0 {
queue.waitGroup.Add(1)
go func() {
defer queue.waitGroup.Done()
timer.AfterTimer(func(h timer.TimerHandle, ud interface{}) bool {
for _, f := range f2 {
f()
}
return true
}, nil, 200*time.Millisecond)
}()
}
}
}
// 移动 // 移动
func SMDollMachinePerateHandler(session *netlib.Session, packetId int, data interface{}) error { func SMDollMachinePerateHandler(session *netlib.Session, packetId int, data interface{}) error {
logger.Logger.Tracef("SMDollMachinePerateHandler %v", data)
msg, ok := data.(*machine.SMDollMachineoPerate) msg, ok := data.(*machine.SMDollMachineoPerate)
if !ok { if !ok {
return nil return nil
} }
conn := machinedoll.ConnMap[int(msg.Id)]
conn, ok := machinedoll.MachineMgr.ConnMap[int(msg.GetId())] if conn == nil {
if !ok || conn == nil {
return nil return nil
} }
if msg.Perate == 1 {
switch msg.Perate {
case 1:
//向前移动 //向前移动
f1 := []func(){ machinedoll.Backward(conn)
func() { machinedoll.Backward(conn) }, time.Sleep(200 * time.Millisecond)
} machinedoll.BackwardStop(conn)
f2 := []func(){ } else if msg.Perate == 2 {
func() { machinedoll.BackwardStop(conn) },
}
Process(conn, f1, f2)
case 2:
//向后移动 //向后移动
f1 := []func(){ machinedoll.Forward(conn)
func() { machinedoll.Forward(conn) }, time.Sleep(200 * time.Millisecond)
} machinedoll.ForwardStop(conn)
f2 := []func(){ } else if msg.Perate == 3 {
func() { machinedoll.ForwardStop(conn) },
}
Process(conn, f1, f2)
case 3:
//向左移动 //向左移动
f1 := []func(){ machinedoll.Left(conn)
func() { machinedoll.Left(conn) }, time.Sleep(200 * time.Millisecond)
} machinedoll.LeftStop(conn)
f2 := []func(){ } else if msg.Perate == 4 {
func() { machinedoll.LeftStop(conn) },
}
Process(conn, f1, f2)
case 4:
//向右移动 //向右移动
f1 := []func(){ machinedoll.Right(conn)
func() { machinedoll.Right(conn) }, time.Sleep(200 * time.Millisecond)
} machinedoll.RightStop(conn)
f2 := []func(){ } else if msg.Perate == 5 {
func() { machinedoll.RightStop(conn) },
}
Process(conn, f1, f2)
case 5:
//投币 //投币
f1 := []func(){ machinedoll.Coin(conn)
func() { machinedoll.Coin(conn) }, machinedoll.Backward(conn)
} time.Sleep(200 * time.Millisecond)
f2 := []func(){ machinedoll.BackwardStop(conn)
func() {},
}
Process(conn, f1, f2)
go DollMachineGrabResult(session, conn, msg.Snid, msg.GetId())
} }
return nil return nil
} }
// 下抓 // 下抓
func SMDollMachineGrabHandler(session *netlib.Session, packetId int, data interface{}) error { func SMDollMachineGrabHandler(session *netlib.Session, packetId int, data interface{}) error {
logger.Logger.Tracef("SMDollMachineGrabHandler %v", data)
msg, ok := data.(*machine.SMDollMachineGrab) msg, ok := data.(*machine.SMDollMachineGrab)
if !ok { if !ok {
return nil return nil
} }
conn := machinedoll.ConnMap[int(msg.Id)]
conn, ok := machinedoll.MachineMgr.ConnMap[int(msg.GetId())] if conn == nil {
if !ok || conn == nil {
return nil return nil
} }
typeId := msg.TypeId
switch msg.GetTypeId() { if typeId == 1 {
case 1:
//弱抓 //弱抓
f1 := []func(){ machinedoll.WeakGrab(conn)
func() { machinedoll.WeakGrab(conn) }, } else if typeId == 2 {
}
f2 := []func(){}
Process(conn, f1, f2)
case 2:
//强力抓 //强力抓
f1 := []func(){ machinedoll.Grab(conn)
func() { machinedoll.Grab(conn) }, } else if typeId == 3 {
} //必中抓
f2 := []func(){} machinedoll.SetPower(conn)
Process(conn, f1, f2) time.Sleep(200 * time.Millisecond)
machinedoll.Grab(conn)
} }
//返回消息
session.Send(int(machine.DollMachinePacketID_PACKET_SMDollMachineGrab), &machine.MSDollMachineGrab{
Snid: msg.Snid,
Id: msg.GetId(),
Result: 1,
})
return nil return nil
} }
// 监听抓取结果返回
func DollMachineGrabResult(session *netlib.Session, conn *machinedoll.Conn, snid, id int32) {
num := int64(1)
for {
// 读取数据
logger.Logger.Trace("监听抓取结果返回!")
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
logger.Logger.Error("Failed to read response from client:", err)
return
}
// 将读取到的数据按照 221 进行分割
parts := bytes.Split(buf[:n], []byte{221})
fmt.Println("获取到的返回值:", parts)
instruction := []byte{0xAA, 0x05, 0x02, 0x50, 0x09, 0x00}
instruction1 := []byte{0xAA, 0x05, 0x02, 0x50, 0x09, 0x01}
// 遍历分割结果,打印出每个部分
for i, part := range parts {
if len(part) > 0 {
part = part[:len(part)-1] // 去除最后一个字节,该字节为分隔符
//fmt.Println("比较返回结果 part = ", part)
if bytes.Contains(part, instruction) && num != 1 {
fmt.Printf("Part %d: %s\n", i+1, part)
//回应数据
_, err = conn.Write([]byte{0xAA, 0x04, 0x01, 0x50, 0x09, 0x5c, 0xdd})
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
session.Send(int(machine.DollMachinePacketID_PACKET_MSDollMachineoPerateResult), &machine.MSDollMachineoPerateResult{
Snid: snid,
Id: id,
Result: 0,
TypeId: 2,
})
logger.Logger.Trace("没有抓到礼品snid = ", snid, "num = ", num)
return
}
if bytes.Contains(part, instruction1) && num != 1 {
fmt.Printf("Part %d: %s\n", i+1, part)
//回应数据
_, err = conn.Write([]byte{0xAA, 0x04, 0x01, 0x50, 0x09, 0x5c, 0xdd})
if err != nil {
logger.Logger.Error("Failed to read response from server:", err)
return
}
session.Send(int(machine.DollMachinePacketID_PACKET_MSDollMachineoPerateResult), &machine.MSDollMachineoPerateResult{
Snid: snid,
Id: id,
Result: 1,
TypeId: 2,
})
logger.Logger.Trace("抓到礼品了snid = ", snid, "num = ", num)
return
}
//上分成功
coinData := []byte{0xAA, 0x04, 0x02, 0x03, 0x01}
if bytes.Contains(part, coinData) {
//返回消息
session.Send(int(machine.DollMachinePacketID_PACKET_MSDollMachineoPerateResult), &machine.MSDollMachineoPerateResult{
Snid: snid,
Id: id,
Result: 1,
TypeId: 1,
})
}
//上分失败
coinData = []byte{0xAA, 0x04, 0x02, 0x03, 0x00}
if bytes.Contains(part, coinData) {
//返回消息
session.Send(int(machine.DollMachinePacketID_PACKET_MSDollMachineoPerateResult), &machine.MSDollMachineoPerateResult{
Snid: snid,
Id: id,
Result: 0,
TypeId: 1,
})
}
}
}
num++
if num >= math.MaxInt64 {
num = 2
}
}
}
// 与游戏服务器连接成功,向游戏服务器推送所有娃娃机连接 // 与游戏服务器连接成功,向游戏服务器推送所有娃娃机连接
func SMGameLinkSucceedHandler(session *netlib.Session, packetId int, data interface{}) error { func SMGameLinkSucceedHandler(session *netlib.Session, packetId int, data interface{}) error {
logger.Logger.Trace("与游戏服务器连接成功") logger.Logger.Trace("与游戏服务器连接成功!!\n")
fmt.Printf("与游戏服务器连接成功!!\n")
//开始向游戏服务器发送娃娃机连接信息 //开始向游戏服务器发送娃娃机连接信息
msg := &machine.MSDollMachineList{} msg := &machine.MSDollMachineList{}
for i, _ := range machinedoll.MachineMgr.ConnMap { for i, _ := range machinedoll.ConnMap {
info := &machine.DollMachine{} info := &machine.DollMachine{}
info.Id = int32(i) info.Id = int32(i)
info.VideoAddr = "www.baidu.com"
msg.Data = append(msg.Data, info) msg.Data = append(msg.Data, info)
} }
session.Send(int(machine.DollMachinePacketID_PACKET_MSDollMachineList), msg) session.Send(int(machine.DollMachinePacketID_PACKET_MSDollMachineList), msg)
logger.Logger.Tracef("向游戏服务器发送娃娃机连接信息:%v", msg) fmt.Printf("开始向游戏服务器发送娃娃机连接信息!\n", msg)
return nil return nil
} }
// 获取进入视频房间token
func SMGetTokenHandler(session *netlib.Session, packetId int, data interface{}) error {
logger.Logger.Tracef("SMGetTokenHandler %v", data)
msg, ok := data.(*machine.SMGetToken)
if !ok {
return nil
}
// 请将 appId 修改为你的 appIdappid 为数字,从即构控制台获取
// 举例1234567890
var appId uint32 = uint32(msg.GetAppId())
// 请修改为你的 serverSecretserverSecret 为字符串,从即构控制台获取
// 举例: "fa94dd0f974cf2e293728a526b028271"
serverSecret := msg.ServerSecret
// 请将 userId 修改为用户的 user_id
userId := msg.GetSnid()
// token 的有效时长,单位:秒
var effectiveTimeInSeconds int64 = 3600
// token业务认证扩展基础鉴权token此处填空字符串
var payload string = ""
//生成token
token, err := token04.GenerateToken04(appId, string(userId), serverSecret, effectiveTimeInSeconds, payload)
if err != nil {
logger.Logger.Error(err)
return err
}
logger.Logger.Trace(token)
info := &machine.MSSendToken{}
info.Snid = msg.Snid
info.Token = token
info.Appid = msg.AppId
session.Send(int(machine.DollMachinePacketID_PACKET_MSSendToken), info)
logger.Logger.Tracef("向游戏服务器发送娃娃机token%v", info)
return nil
}
func init() { func init() {
netlib.Register(int(machine.DollMachinePacketID_PACKET_SMDollMachinePerate), &machine.SMDollMachineoPerate{}, SMDollMachinePerateHandler) netlib.Register(int(machine.DollMachinePacketID_PACKET_SMDollMachinePerate), &machine.SMDollMachineoPerate{}, SMDollMachinePerateHandler)
netlib.Register(int(machine.DollMachinePacketID_PACKET_SMDollMachineGrab), &machine.SMDollMachineGrab{}, SMDollMachineGrabHandler) netlib.Register(int(machine.DollMachinePacketID_PACKET_SMDollMachineGrab), &machine.SMDollMachineGrab{}, SMDollMachineGrabHandler)
//链接成功 返回消息 //链接成功 返回消息
netlib.Register(int(machine.DollMachinePacketID_PACKET_SMGameLinkSucceed), &machine.SMGameLinkSucceed{}, SMGameLinkSucceedHandler) netlib.Register(int(machine.DollMachinePacketID_PACKET_SMGameLinkSucceed), &machine.SMGameLinkSucceed{}, SMGameLinkSucceedHandler)
netlib.Register(int(machine.DollMachinePacketID_PACKET_SMGetToken), &machine.SMGetToken{}, SMGetTokenHandler)
} }

View File

@ -8,7 +8,7 @@ import (
// 向前aa 05 01 50 01 01 54 dd // 向前aa 05 01 50 01 01 54 dd
func Forward(conn net.Conn) { func Forward(conn net.Conn) {
instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x01, 0x01} instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x01, 0x01}
instruction = CalculateChecksum(instruction) instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction) _, err := conn.Write(instruction)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
@ -19,7 +19,7 @@ func Forward(conn net.Conn) {
// 向前停止aa 05 01 50 01 00 55 dd // 向前停止aa 05 01 50 01 00 55 dd
func ForwardStop(conn net.Conn) { func ForwardStop(conn net.Conn) {
instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x01, 0x00} instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x01, 0x00}
instruction = CalculateChecksum(instruction) instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction) _, err := conn.Write(instruction)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
@ -31,7 +31,7 @@ func ForwardStop(conn net.Conn) {
// aa 05 01 50 02 01 57 dd // aa 05 01 50 02 01 57 dd
func Backward(conn net.Conn) { func Backward(conn net.Conn) {
instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x02, 0x01} instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x02, 0x01}
instruction = CalculateChecksum(instruction) instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction) _, err := conn.Write(instruction)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
@ -42,7 +42,7 @@ func Backward(conn net.Conn) {
// 向后停止aa 05 01 50 02 00 56 dd // 向后停止aa 05 01 50 02 00 56 dd
func BackwardStop(conn net.Conn) { func BackwardStop(conn net.Conn) {
instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x02, 0x00} instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x02, 0x00}
instruction = CalculateChecksum(instruction) instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction) _, err := conn.Write(instruction)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
@ -53,7 +53,7 @@ func BackwardStop(conn net.Conn) {
// 向左aa 05 01 50 03 01 56 dd // 向左aa 05 01 50 03 01 56 dd
func Left(conn net.Conn) { func Left(conn net.Conn) {
instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x03, 0x01} instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x03, 0x01}
instruction = CalculateChecksum(instruction) instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction) _, err := conn.Write(instruction)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
@ -64,7 +64,7 @@ func Left(conn net.Conn) {
// 向左停止aa 05 01 50 03 00 57 dd // 向左停止aa 05 01 50 03 00 57 dd
func LeftStop(conn net.Conn) { func LeftStop(conn net.Conn) {
instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x03, 0x00} instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x03, 0x00}
instruction = CalculateChecksum(instruction) instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction) _, err := conn.Write(instruction)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
@ -75,7 +75,7 @@ func LeftStop(conn net.Conn) {
// 向右 // 向右
func Right(conn net.Conn) { func Right(conn net.Conn) {
instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x04, 0x01} instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x04, 0x01}
instruction = CalculateChecksum(instruction) instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction) _, err := conn.Write(instruction)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
@ -86,7 +86,7 @@ func Right(conn net.Conn) {
// 向右停止aa 05 01 50 04 00 50 dd // 向右停止aa 05 01 50 04 00 50 dd
func RightStop(conn net.Conn) { func RightStop(conn net.Conn) {
instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x04, 0x00} instruction := []byte{0xaa, 0x05, 0x01, 0x50, 0x04, 0x00}
instruction = CalculateChecksum(instruction) instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction) _, err := conn.Write(instruction)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
@ -97,34 +97,7 @@ func RightStop(conn net.Conn) {
// 强抓下抓 // 强抓下抓
func Grab(conn net.Conn) { func Grab(conn net.Conn) {
instruction := []byte{0xAA, 0x05, 0x01, 0x50, 0x06, 0x01} instruction := []byte{0xAA, 0x05, 0x01, 0x50, 0x06, 0x01}
instruction = CalculateChecksum(instruction) instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
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
}
instruction = []byte{0xAA, 0x04, 0x01, 0x50, 0x09, 0x5c, 0xdd}
_, err = conn.Write(instruction)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}*/
}
// 必中抓
func Grab2(conn net.Conn) {
//设置电压
instruction := []byte{0xAA, 0x05, 0x01, 0x50, 0x06, 0x01}
instruction = CalculateChecksum(instruction)
_, err := conn.Write(instruction) _, err := conn.Write(instruction)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
@ -142,7 +115,7 @@ func Grab2(conn net.Conn) {
// 弱抓aa 05 01 50 06 00 52 dd // 弱抓aa 05 01 50 06 00 52 dd
func WeakGrab(conn net.Conn) { func WeakGrab(conn net.Conn) {
instruction := []byte{0xAA, 0x05, 0x01, 0x50, 0x06, 0x00} instruction := []byte{0xAA, 0x05, 0x01, 0x50, 0x06, 0x00}
instruction = CalculateChecksum(instruction) instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction) _, err := conn.Write(instruction)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
@ -153,14 +126,14 @@ func WeakGrab(conn net.Conn) {
// 投币 // 投币
func Coin(conn net.Conn) { func Coin(conn net.Conn) {
moveCommand := []byte{0xaa, 0x08, 0x01, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00} moveCommand := []byte{0xaa, 0x08, 0x01, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00}
moveCommand = CalculateChecksum(moveCommand) moveCommand = calculateChecksum(moveCommand)
// 发送指令到服务端 // 发送指令到服务端
_, err := conn.Write(moveCommand) _, err := conn.Write(moveCommand)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
return return
} }
/* // 读取服务端的响应 // 读取服务端的响应
buf := make([]byte, 1024) buf := make([]byte, 1024)
n, err := conn.Read(buf) n, err := conn.Read(buf)
if err != nil { if err != nil {
@ -172,192 +145,13 @@ func Coin(conn net.Conn) {
} }
if buf[4] == 0 { if buf[4] == 0 {
fmt.Println("上分失败!!!") fmt.Println("上分失败!!!")
}*/ }
} }
// 剩余局数清零 // 剩余局数清零
func ClearRemainingGames(conn net.Conn) { func ClearRemainingGames(conn net.Conn) {
instruction := []byte{0xAA, 0x03, 0x01, 0x32} instruction := []byte{0xAA, 0x03, 0x01, 0x32}
instruction = CalculateChecksum(instruction) instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
/* // 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)*/
}
// 计算校验码
func CalculateChecksum(data []byte) []byte {
var value = byte(0)
for i, datum := range data {
if i > 0 {
value ^= datum
}
}
//fmt.Println("校验码 value = ", value)
data = append(data, value, 0xdd)
return data
}
// 开启音乐
func OpenMusic(conn net.Conn) {
data[43] = 0x01
instruction := []byte{0xAA, 0x33, 0x01, 0x06}
instruction = append(instruction, data...)
instruction = CalculateChecksum(instruction)
//instruction[1] = byte(len(instruction) - 3)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
// 读取服务端的响应
/* buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)*/
}
// 关闭音乐
func CloseMusic(conn net.Conn) {
data[43] = 0x00
instruction := []byte{0xAA, 0x33, 0x01, 0x06}
instruction = append(instruction, data...)
instruction = CalculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
/* // 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)*/
}
// 恢复出厂设置
func RestoreFactorySettings(conn net.Conn) {
instruction := []byte{0xAA, 0x03, 0x01, 0x38}
instruction = CalculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
/* // 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)*/
}
// 重启主板
func Reboot(conn net.Conn) {
instruction := []byte{0xAA, 0x03, 0x01, 0x39}
instruction = CalculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
/* // 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)*/
}
// 暂停服务
func StopServer(conn net.Conn) {
instruction := []byte{0xAA, 0x03, 0x01, 0x37}
instruction = CalculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
}
// 开启服务
func StartServer(conn net.Conn) {
instruction := []byte{0xAA, 0x03, 0x01, 0x36}
instruction = CalculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
}
// 查询基础参数
func queryBaseParam(conn net.Conn) {
instruction := []byte{0xAA, 0x03, 0x01, 0x05}
instruction = CalculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
/* // 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)*/
}
// 设置出奖模式
func SetPower(conn net.Conn) {
data[3] = 0x01
fmt.Println("data.len = ", len(data))
instruction := []byte{0xAA, 0x33, 0x01, 0x06}
instruction = append(instruction, data...)
instruction = CalculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
/* // 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)*/
}
// 基础设置
func SetBaseParam(conn net.Conn) {
instruction := []byte{0xAA, 0x33, 0x01, 0x06}
instruction = append(instruction, data...)
instruction = CalculateChecksum(instruction)
_, err := conn.Write(instruction) _, err := conn.Write(instruction)
if err != nil { if err != nil {
fmt.Println("Failed to send command to server:", err) fmt.Println("Failed to send command to server:", err)
@ -371,64 +165,217 @@ func SetBaseParam(conn net.Conn) {
return return
} }
fmt.Println("n", n) fmt.Println("n", n)
if buf[4] == 1 {
fmt.Println("设置成功!")
} else {
fmt.Println("设置失败!")
} }
// 计算校验码
func calculateChecksum(data []byte) []byte {
var value = byte(0)
for i, datum := range data {
if i > 0 {
value ^= datum
}
}
fmt.Println("校验码 value = ", value)
data = append(data, value, 0xdd)
return data
}
// 开启音乐
func OpenMusic(conn net.Conn) {
data[43] = 0x01
instruction := []byte{0xAA, 0x33, 0x01, 0x06}
instruction = append(instruction, data...)
instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
// 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)
}
// 关闭音乐
func CloseMusic(conn net.Conn) {
data[43] = 0x00
instruction := []byte{0xAA, 0x33, 0x01, 0x06}
instruction = append(instruction, data...)
instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
// 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)
}
// 恢复出厂设置
func RestoreFactorySettings(conn net.Conn) {
instruction := []byte{0xAA, 0x03, 0x01, 0x38}
instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
// 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)
}
// 重启主板
func Reboot(conn net.Conn) {
instruction := []byte{0xAA, 0x03, 0x01, 0x39}
instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
// 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)
}
// 暂停服务
func StopServer(conn net.Conn) {
instruction := []byte{0xAA, 0x03, 0x01, 0x37}
instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
}
// 开启服务
func StartServer(conn net.Conn) {
instruction := []byte{0xAA, 0x03, 0x01, 0x36}
instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
}
// 查询基础参数
func queryBaseParam(conn net.Conn) {
instruction := []byte{0xAA, 0x03, 0x01, 0x05}
instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
// 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)
}
// 设置强力
func SetPower(conn net.Conn) {
data[3] = 0x00
data[16] = 0x01
data[17] = 0xE0
data[18] = 0x13
data[19] = 0x88
fmt.Println("data.len = ", len(data))
instruction := []byte{0xAA, 0x33, 0x01, 0x06}
instruction = append(instruction, data...)
instruction = calculateChecksum(instruction)
_, err := conn.Write(instruction)
if err != nil {
fmt.Println("Failed to send command to server:", err)
return
}
// 读取服务端的响应
buf := make([]byte, 1024)
n, err := conn.Read(buf)
if err != nil {
fmt.Println("Failed to read response from server:", err)
return
}
fmt.Println("n", n)
} }
var data = []byte{ var data = []byte{
0x65, //0 几币几玩 0x65,
0x00, //1 几币几玩占用位 0x00,
0x2D, //2 游戏时间 0x0F,
0x00, //3 出奖模式0 无概率 1 随机模式 2 固定模式 3 冠兴模式 0x02,
0x0F, //4 出奖概率 0x0F,
0x00, //5 出奖概率占用位 0x00,
0x00, //6 空中抓物 0关闭 1开启 0x01,
0x00, //7 连续投币赠送 范围0~100 0x00,
0x00, //8 保夹次数 范围06 6为无限次 0x00,
0x01, //9 保夹赠送模式 0送游戏 1送中奖 2送游戏和中奖 0x01,
0xC8,
0x80, //10 强抓力电压 0x00,
0x01, //11 强抓力电压占用位 0x7C,
0x80, //12 中抓力电压 0x01,
0x01, //13 中抓力电压占用位 0x5A,
0x78, //14 弱抓力电压 0x00,
0x00, //15 弱抓力电压占用位 0xE0,
0xE0, //16 中奖电压 0x01,
0x01, //17 中奖电压占用位 0xC8,
0xC8, //18 强抓力时间 0x00,
0x00, //19 强抓力时间占用位 0x14,
0x32,
0x14, //20 放抓时间 0x32,
0x32, //21 前后速度 0x50,
0x32, //22 左右速度 0x34,
0x50, //23 上下速度 0x08,
0x9A, //24 放线长度 0x00,
0x06, //25 放线长度占用位 0x00,
0x00, //26 礼品下放高度 0x00,
0x00, //27 礼品下放高度占用位 0x00,
0x14, //28 甩抓长度 0x78,
0x00, //29 甩抓保护 0x00,
0x32,
0x78, //30 甩抓电压 0x02,
0x00, //31 甩抓电压占用位 0x00,
0x32, //32 上拉保护 0x00,
0x02, //33 天车自救时间 0xC8,
0x00, //34 下抓延时 0x00,
0x00, //35 下抓延时占用位 0x96,
0xC8, //36 抓物延时 0x00,
0x00, //37 抓物延时占用位 0x00,
0x96, //38 上停延时 0x00,
0x00, //39 上停延时占用位 0x00,
0x00,
0x00, //40 摇杆延时 0x0F,
0x00, //41 摇杆延时占用位 0x07,
0x00, //42 抓物二收 0x08,
0x00, //43 待机音乐开关 0x00,
0x00, //44 音量大小调整
0x07, //45 待机音乐选择
0x08, //46 游戏音乐选择
0x00, //47 概率队列自动
} }

View File

@ -3,54 +3,47 @@ package machinedoll
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"net" "mongo.games.com/goserver/core/timer"
"os"
"os/signal" "os/signal"
"path/filepath"
"syscall" "syscall"
"time"
"mongo.games.com/goserver/core/basic"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/module"
"mongo.games.com/goserver/core/netlib"
"mongo.games.com/goserver/core/task"
"mongo.games.com/goserver/srvlib"
"mongo.games.com/game/protocol/machine" "mongo.games.com/game/protocol/machine"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib"
"mongo.games.com/goserver/srvlib"
"net"
"os"
"path/filepath"
"time"
) )
var GameConn *netlib.Session var GameConn *netlib.Session
var ConnMap = make(map[int]net.Conn)
var MachineMgr = &MachineManager{
ConnMap: map[int]*Conn{},
DelConnMap: make(map[int]string),
}
type Conn struct {
Id int
net.Conn
Addr string
}
type MachineManager struct { type MachineManager struct {
ConnMap map[int]*Conn
DelConnMap map[int]string DelConnMap map[int]string
} }
var MachineMgr = &MachineManager{
DelConnMap: make(map[int]string),
}
func (this *MachineManager) ModuleName() string { func (this *MachineManager) ModuleName() string {
return "MachineManager" return "MachineManager"
} }
// 心跳间隔时间(秒)
const heartbeatInterval = 1
func (this *MachineManager) Init() { func (this *MachineManager) Init() {
var serverAddrs []string var serverAddrs []string
programDir, err := os.Getwd() programDir, err := os.Getwd()
if err != nil { if err != nil {
logger.Logger.Error("Error getting working directory:", err) fmt.Println("Error getting working directory:", err)
return return
} }
configFile := filepath.Join(programDir, "machineIPConfig.json") configFile := filepath.Join(programDir, "machineIPConfig.json")
logger.Logger.Trace("构建配置文件的路径", configFile) fmt.Println("构建配置文件的路径", configFile)
fileData, err := os.ReadFile(configFile) fileData, err := os.ReadFile(configFile)
if err != nil { if err != nil {
logger.Logger.Error("Read robot account file error:", err) logger.Logger.Error("Read robot account file error:", err)
@ -66,89 +59,82 @@ func (this *MachineManager) Init() {
for i, addr := range serverAddrs { for i, addr := range serverAddrs {
conn, err := net.DialTimeout("tcp", addr, 5*time.Second) conn, err := net.DialTimeout("tcp", addr, 5*time.Second)
if err != nil { if err != nil {
logger.Logger.Error("Failed to connect to server:", err) fmt.Println("Failed to connect to server:", err)
continue continue
} }
this.ConnMap[i+1] = &Conn{ ConnMap[i+1] = conn
Id: i + 1, go this.StartHeartbeat(i+1, &conn, addr)
Conn: conn,
Addr: addr,
} }
SetBaseParam(conn) fmt.Println("Connected to server:\n", ConnMap[1].RemoteAddr())
logger.Logger.Trace("设置每台娃娃机基础配置!")
}
/* fmt.Println("Connected to server:\n", this.ConnMap[1].RemoteAddr())
fmt.Println("投币请按Q") fmt.Println("投币请按Q")
fmt.Println("w向前s向后a向左d向右 j强力抓取k弱力抓取") fmt.Println("w向前s向后a向左d向右 j强力抓取k弱力抓取")
// 监听 WASD 按键事件 // 监听 WASD 按键事件
go listenKeyboardEvents(this.ConnMap[1]) /* go listenKeyboardEvents(ConnMap[1])
// 监听中断信号,等待用户退出 // 监听中断信号,等待用户退出
waitForUserExit()*/ waitForUserExit()*/
} }
func (this *MachineManager) StartHeartbeat(id int, conn *net.Conn, addr string) {
// 定期发送心跳包
ticker := time.NewTicker(heartbeatInterval * time.Second)
defer ticker.Stop()
func (this *MachineManager) Update() { for {
var delConn []*Conn select {
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} { case <-ticker.C:
for _, v := range this.ConnMap { // 发送心跳包
_, err := v.Write([]byte("heartbeat")) _, err := (*conn).Write([]byte("heartbeat"))
if err != nil { if err != nil {
delConn = append(delConn, v) fmt.Println("Failed to send heartbeat:", err)
v.Close() delete(ConnMap, id)
logger.Logger.Tracef("断开连接:%v", v.Addr) this.DelConnMap[id] = addr
this.UpdateToGameServer(v, 0) //通知游戏服
this.UpdateToGameServer()
fmt.Println("删除链接addr = ", addr)
go timer.StartTimer(timer.TimerActionWrapper(func(h timer.TimerHandle, ud interface{}) bool {
this.ReConnect()
return true
}), nil, time.Duration(5)*time.Second, 100)
return
}
} }
} }
return nil
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
for _, v := range delConn {
delete(this.ConnMap, v.Id)
this.DelConnMap[v.Id] = v.Addr
} }
// 重连 // 重连
var delIds []*Conn func (this *MachineManager) ReConnect() bool {
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} { fmt.Println("================重连============")
delIds := []int{}
status := false
for id, addr := range this.DelConnMap { for id, addr := range this.DelConnMap {
conn, err := net.DialTimeout("tcp", addr, 5*time.Second) conn, err := net.DialTimeout("tcp", addr, 5*time.Second)
if err != nil { if err != nil {
continue continue
} }
logger.Logger.Tracef("娃娃机重连成功addr = %v", addr) ConnMap[id] = conn
delIds = append(delIds, &Conn{ delIds = append(delIds, id)
Id: id, status = true
Conn: conn,
Addr: addr,
})
} }
return nil for _, id := range delIds {
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) { delete(this.DelConnMap, id)
for _, v := range delIds { fmt.Println("重新链接成功id = ", id)
this.ConnMap[v.Id] = v
delete(this.DelConnMap, v.Id)
this.UpdateToGameServer(v, 1)
} }
})).StartByFixExecutor(this.ModuleName()) if status {
})).StartByFixExecutor(this.ModuleName()) this.UpdateToGameServer()
return true
}
return false
} }
func (this *MachineManager) Shutdown() { func (this *MachineManager) UpdateToGameServer() {
for _, v := range this.ConnMap { msg := &machine.MSDollMachineList{}
v.Close() for i, _ := range ConnMap {
this.UpdateToGameServer(v, 0) info := &machine.DollMachine{}
info.Id = int32(i)
info.VideoAddr = "www.baidu.com"
msg.Data = append(msg.Data, info)
} }
SendToGameServer(int(machine.DollMachinePacketID_PACKET_MSDollMachineList), msg)
module.UnregisteModule(this)
}
func (this *MachineManager) UpdateToGameServer(conn *Conn, status int32) {
msg := &machine.MSUpdateDollMachineStatus{}
msg.Id = int32(conn.Id)
msg.Status = status
msg.VideoAddr = conn.Addr
SendToGameServer(int(machine.DollMachinePacketID_PACKET_MSUpdateDollMachineStatus), msg)
} }
func SendToGameServer(pid int, msg interface{}) { func SendToGameServer(pid int, msg interface{}) {
@ -163,7 +149,7 @@ func SendToGameServer(pid int, msg interface{}) {
} }
func init() { func init() {
module.RegisteModule(MachineMgr, time.Second, 0) MachineMgr.Init()
} }
func listenKeyboardEvents(conn net.Conn) { func listenKeyboardEvents(conn net.Conn) {
@ -241,8 +227,6 @@ func listenKeyboardEvents(conn net.Conn) {
SetPower(conn) SetPower(conn)
case "8": case "8":
CloseMusic(conn) CloseMusic(conn)
case "9":
queryBaseParam(conn)
} }
} }
} }

View File

@ -139,8 +139,6 @@ type AllConfig struct {
*webapi.AwardLogConfig *webapi.AwardLogConfig
// 新手引导配置 // 新手引导配置
*webapi.GuideConfig *webapi.GuideConfig
//娃娃机配置
*webapi.MachineConfig
MatchAudience map[int32]*webapi.MatchAudience // 比赛观众列表 key: 玩家id MatchAudience map[int32]*webapi.MatchAudience // 比赛观众列表 key: 玩家id
// 小精灵配置 // 小精灵配置
*webapi.SpiritConfig *webapi.SpiritConfig

View File

@ -24,55 +24,40 @@ const (
type CLAWDOLLPacketID int32 type CLAWDOLLPacketID int32
const ( const (
CLAWDOLLPacketID_PACKET_ZERO CLAWDOLLPacketID = 0 //弃用消息号 CLAWDOLLPacketID_PACKET_CLAWDOLL_ZERO CLAWDOLLPacketID = 0 //弃用消息号
CLAWDOLLPacketID_PACKET_SC_ROOMINFO CLAWDOLLPacketID = 5601 //房间信息 CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_ROOMINFO CLAWDOLLPacketID = 5601 //房间信息
CLAWDOLLPacketID_PACKET_CS_PLAYEROP CLAWDOLLPacketID = 5602 //玩家操作(客户->服务) CLAWDOLLPacketID_PACKET_CS_CLAWDOLL_PLAYEROP CLAWDOLLPacketID = 5602 //玩家操作(客户->服务)
CLAWDOLLPacketID_PACKET_SC_PLAYEROP CLAWDOLLPacketID = 5603 //玩家操作(服务->客户) CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PLAYEROP CLAWDOLLPacketID = 5603 //玩家操作(服务->客户)
CLAWDOLLPacketID_PACKET_SC_ROOMSTATE CLAWDOLLPacketID = 5604 //房间状态 CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_ROOMSTATE CLAWDOLLPacketID = 5604 //房间状态
CLAWDOLLPacketID_PACKET_SC_GAMEBILLED CLAWDOLLPacketID = 5605 //游戏结算 CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_GAMEBILLED CLAWDOLLPacketID = 5605 //游戏结算
CLAWDOLLPacketID_PACKET_SC_PlayerEnter CLAWDOLLPacketID = 5606 // 玩家进入 CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PlayerEnter CLAWDOLLPacketID = 5606 // 玩家进入
CLAWDOLLPacketID_PACKET_SC_PlayerLeave CLAWDOLLPacketID = 5607 // 玩家离开 CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PlayerLeave CLAWDOLLPacketID = 5607 // 玩家离开
CLAWDOLLPacketID_PACKET_SC_PLAYERINFO CLAWDOLLPacketID = 5608 // 玩家状态信息变化 CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PLAYERINFO CLAWDOLLPacketID = 5608 // 玩家状态信息变化
CLAWDOLLPacketID_PACKET_CS_GETTOKEN CLAWDOLLPacketID = 5609 // 获取token
CLAWDOLLPacketID_PACKET_SC_SENDTOKEN CLAWDOLLPacketID = 5610 // 获取token
CLAWDOLLPacketID_PACKET_CS_WAITPLAYERS CLAWDOLLPacketID = 5611 // 获取等待玩家信息 (客户->服务)
CLAWDOLLPacketID_PACKET_SC_WAITPLAYERS CLAWDOLLPacketID = 5612 // 获取等待玩家信息 (服务->客户)
CLAWDOLLPacketID_PACKET_SC_PLAYINGINFO CLAWDOLLPacketID = 5613 // 正在控制娃娃机的玩家信息 (服务->客户)
) )
// Enum value maps for CLAWDOLLPacketID. // Enum value maps for CLAWDOLLPacketID.
var ( var (
CLAWDOLLPacketID_name = map[int32]string{ CLAWDOLLPacketID_name = map[int32]string{
0: "PACKET_ZERO", 0: "PACKET_CLAWDOLL_ZERO",
5601: "PACKET_SC_ROOMINFO", 5601: "PACKET_SC_CLAWDOLL_ROOMINFO",
5602: "PACKET_CS_PLAYEROP", 5602: "PACKET_CS_CLAWDOLL_PLAYEROP",
5603: "PACKET_SC_PLAYEROP", 5603: "PACKET_SC_CLAWDOLL_PLAYEROP",
5604: "PACKET_SC_ROOMSTATE", 5604: "PACKET_SC_CLAWDOLL_ROOMSTATE",
5605: "PACKET_SC_GAMEBILLED", 5605: "PACKET_SC_CLAWDOLL_GAMEBILLED",
5606: "PACKET_SC_PlayerEnter", 5606: "PACKET_SC_CLAWDOLL_PlayerEnter",
5607: "PACKET_SC_PlayerLeave", 5607: "PACKET_SC_CLAWDOLL_PlayerLeave",
5608: "PACKET_SC_PLAYERINFO", 5608: "PACKET_SC_CLAWDOLL_PLAYERINFO",
5609: "PACKET_CS_GETTOKEN",
5610: "PACKET_SC_SENDTOKEN",
5611: "PACKET_CS_WAITPLAYERS",
5612: "PACKET_SC_WAITPLAYERS",
5613: "PACKET_SC_PLAYINGINFO",
} }
CLAWDOLLPacketID_value = map[string]int32{ CLAWDOLLPacketID_value = map[string]int32{
"PACKET_ZERO": 0, "PACKET_CLAWDOLL_ZERO": 0,
"PACKET_SC_ROOMINFO": 5601, "PACKET_SC_CLAWDOLL_ROOMINFO": 5601,
"PACKET_CS_PLAYEROP": 5602, "PACKET_CS_CLAWDOLL_PLAYEROP": 5602,
"PACKET_SC_PLAYEROP": 5603, "PACKET_SC_CLAWDOLL_PLAYEROP": 5603,
"PACKET_SC_ROOMSTATE": 5604, "PACKET_SC_CLAWDOLL_ROOMSTATE": 5604,
"PACKET_SC_GAMEBILLED": 5605, "PACKET_SC_CLAWDOLL_GAMEBILLED": 5605,
"PACKET_SC_PlayerEnter": 5606, "PACKET_SC_CLAWDOLL_PlayerEnter": 5606,
"PACKET_SC_PlayerLeave": 5607, "PACKET_SC_CLAWDOLL_PlayerLeave": 5607,
"PACKET_SC_PLAYERINFO": 5608, "PACKET_SC_CLAWDOLL_PLAYERINFO": 5608,
"PACKET_CS_GETTOKEN": 5609,
"PACKET_SC_SENDTOKEN": 5610,
"PACKET_CS_WAITPLAYERS": 5611,
"PACKET_SC_WAITPLAYERS": 5612,
"PACKET_SC_PLAYINGINFO": 5613,
} }
) )
@ -170,7 +155,6 @@ type CLAWDOLLPlayerData struct {
VIP int32 `protobuf:"varint,7,opt,name=VIP,proto3" json:"VIP,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:已准备) 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"` // 本局赢分 WinCoin int64 `protobuf:"varint,9,opt,name=WinCoin,proto3" json:"WinCoin,omitempty"` // 本局赢分
ClawDollState int32 `protobuf:"varint,10,opt,name=clawDollState,proto3" json:"clawDollState,omitempty"` // 玩家状态
} }
func (x *CLAWDOLLPlayerData) Reset() { func (x *CLAWDOLLPlayerData) Reset() {
@ -268,13 +252,6 @@ func (x *CLAWDOLLPlayerData) GetWinCoin() int64 {
return 0 return 0
} }
func (x *CLAWDOLLPlayerData) GetClawDollState() int32 {
if x != nil {
return x.ClawDollState
}
return 0
}
//房间信息 //房间信息
type SCCLAWDOLLRoomInfo struct { type SCCLAWDOLLRoomInfo struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -417,8 +394,8 @@ type CSCLAWDOLLOp struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
OpCode int32 `protobuf:"varint,1,opt,name=OpCode,proto3" json:"OpCode,omitempty"` //操作码 1:上分 投币 2:下抓 3:玩家操控动作 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"` //操作参数 1:无 Params []int64 `protobuf:"varint,2,rep,packed,name=Params,proto3" json:"Params,omitempty"`
} }
func (x *CSCLAWDOLLOp) Reset() { func (x *CSCLAWDOLLOp) Reset() {
@ -545,8 +522,8 @@ type SCCLAWDOLLRoundGameBilled struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
RoundId int32 `protobuf:"varint,1,opt,name=RoundId,proto3" json:"RoundId,omitempty"` //局ID 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"` //抓取结果 0: 没有抓住, 1抓住娃娃 ClowResult int32 `protobuf:"varint,2,opt,name=ClowResult,proto3" json:"ClowResult,omitempty"` //抓取结果
Award int64 `protobuf:"varint,3,opt,name=Award,proto3" json:"Award,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"` //玩家余额 Balance int64 `protobuf:"varint,4,opt,name=Balance,proto3" json:"Balance,omitempty"` //玩家余额
} }
@ -674,9 +651,8 @@ type SCCLAWDOLLPlayerInfo struct {
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` //玩家ID SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` //玩家ID
ClawDollState int32 `protobuf:"varint,2,opt,name=clawDollState,proto3" json:"clawDollState,omitempty"` // 玩家状态 GainCoin int64 `protobuf:"varint,2,opt,name=gainCoin,proto3" json:"gainCoin,omitempty"` //本局赢取
GainCoin int64 `protobuf:"varint,3,opt,name=gainCoin,proto3" json:"gainCoin,omitempty"` // 本局赢取 Coin int64 `protobuf:"varint,3,opt,name=Coin,proto3" json:"Coin,omitempty"` // 玩家
Coin int64 `protobuf:"varint,4,opt,name=Coin,proto3" json:"Coin,omitempty"` // 玩家
} }
func (x *SCCLAWDOLLPlayerInfo) Reset() { func (x *SCCLAWDOLLPlayerInfo) Reset() {
@ -718,13 +694,6 @@ func (x *SCCLAWDOLLPlayerInfo) GetSnId() int32 {
return 0 return 0
} }
func (x *SCCLAWDOLLPlayerInfo) GetClawDollState() int32 {
if x != nil {
return x.ClawDollState
}
return 0
}
func (x *SCCLAWDOLLPlayerInfo) GetGainCoin() int64 { func (x *SCCLAWDOLLPlayerInfo) GetGainCoin() int64 {
if x != nil { if x != nil {
return x.GainCoin return x.GainCoin
@ -746,7 +715,7 @@ type SCCLAWDOLLPlayerEnter struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Data *CLAWDOLLPlayerDigestInfo `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` Data *CLAWDOLLPlayerData `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"`
} }
func (x *SCCLAWDOLLPlayerEnter) Reset() { func (x *SCCLAWDOLLPlayerEnter) Reset() {
@ -781,7 +750,7 @@ func (*SCCLAWDOLLPlayerEnter) Descriptor() ([]byte, []int) {
return file_clawdoll_proto_rawDescGZIP(), []int{7} return file_clawdoll_proto_rawDescGZIP(), []int{7}
} }
func (x *SCCLAWDOLLPlayerEnter) GetData() *CLAWDOLLPlayerDigestInfo { func (x *SCCLAWDOLLPlayerEnter) GetData() *CLAWDOLLPlayerData {
if x != nil { if x != nil {
return x.Data return x.Data
} }
@ -795,7 +764,7 @@ type SCCLAWDOLLPlayerLeave struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` //玩家id Pos int32 `protobuf:"varint,1,opt,name=Pos,proto3" json:"Pos,omitempty"` //玩家位置
} }
func (x *SCCLAWDOLLPlayerLeave) Reset() { func (x *SCCLAWDOLLPlayerLeave) Reset() {
@ -830,239 +799,18 @@ func (*SCCLAWDOLLPlayerLeave) Descriptor() ([]byte, []int) {
return file_clawdoll_proto_rawDescGZIP(), []int{8} return file_clawdoll_proto_rawDescGZIP(), []int{8}
} }
func (x *SCCLAWDOLLPlayerLeave) GetSnId() int32 { func (x *SCCLAWDOLLPlayerLeave) GetPos() int32 {
if x != nil { if x != nil {
return x.SnId return x.Pos
} }
return 0 return 0
} }
//玩家请求进入视频地址token
type CSCLAWDOLLGetToken struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CSCLAWDOLLGetToken) Reset() {
*x = CSCLAWDOLLGetToken{}
if protoimpl.UnsafeEnabled {
mi := &file_clawdoll_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CSCLAWDOLLGetToken) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CSCLAWDOLLGetToken) ProtoMessage() {}
func (x *CSCLAWDOLLGetToken) ProtoReflect() protoreflect.Message {
mi := &file_clawdoll_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CSCLAWDOLLGetToken.ProtoReflect.Descriptor instead.
func (*CSCLAWDOLLGetToken) Descriptor() ([]byte, []int) {
return file_clawdoll_proto_rawDescGZIP(), []int{9}
}
type SCCLAWDOLLSendToken struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
LogicId int32 `protobuf:"varint,1,opt,name=LogicId,proto3" json:"LogicId,omitempty"`
Appid int64 `protobuf:"varint,2,opt,name=Appid,proto3" json:"Appid,omitempty"`
Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"`
}
func (x *SCCLAWDOLLSendToken) Reset() {
*x = SCCLAWDOLLSendToken{}
if protoimpl.UnsafeEnabled {
mi := &file_clawdoll_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SCCLAWDOLLSendToken) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SCCLAWDOLLSendToken) ProtoMessage() {}
func (x *SCCLAWDOLLSendToken) ProtoReflect() protoreflect.Message {
mi := &file_clawdoll_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SCCLAWDOLLSendToken.ProtoReflect.Descriptor instead.
func (*SCCLAWDOLLSendToken) Descriptor() ([]byte, []int) {
return file_clawdoll_proto_rawDescGZIP(), []int{10}
}
func (x *SCCLAWDOLLSendToken) GetLogicId() int32 {
if x != nil {
return x.LogicId
}
return 0
}
func (x *SCCLAWDOLLSendToken) GetAppid() int64 {
if x != nil {
return x.Appid
}
return 0
}
func (x *SCCLAWDOLLSendToken) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
type CLAWDOLLWaitPlayers struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
WaitPlayersInfo []*CLAWDOLLPlayerDigestInfo `protobuf:"bytes,1,rep,name=WaitPlayersInfo,proto3" json:"WaitPlayersInfo,omitempty"`
}
func (x *CLAWDOLLWaitPlayers) Reset() {
*x = CLAWDOLLWaitPlayers{}
if protoimpl.UnsafeEnabled {
mi := &file_clawdoll_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CLAWDOLLWaitPlayers) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CLAWDOLLWaitPlayers) ProtoMessage() {}
func (x *CLAWDOLLWaitPlayers) ProtoReflect() protoreflect.Message {
mi := &file_clawdoll_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CLAWDOLLWaitPlayers.ProtoReflect.Descriptor instead.
func (*CLAWDOLLWaitPlayers) Descriptor() ([]byte, []int) {
return file_clawdoll_proto_rawDescGZIP(), []int{11}
}
func (x *CLAWDOLLWaitPlayers) GetWaitPlayersInfo() []*CLAWDOLLPlayerDigestInfo {
if x != nil {
return x.WaitPlayersInfo
}
return nil
}
// 玩家摘要信息
type CLAWDOLLPlayerDigestInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` //账号
Head int32 `protobuf:"varint,2,opt,name=Head,proto3" json:"Head,omitempty"` //头像
HeadUrl string `protobuf:"bytes,3,opt,name=HeadUrl,proto3" json:"HeadUrl,omitempty"` //头像
Name string `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"` //名字
}
func (x *CLAWDOLLPlayerDigestInfo) Reset() {
*x = CLAWDOLLPlayerDigestInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_clawdoll_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CLAWDOLLPlayerDigestInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CLAWDOLLPlayerDigestInfo) ProtoMessage() {}
func (x *CLAWDOLLPlayerDigestInfo) ProtoReflect() protoreflect.Message {
mi := &file_clawdoll_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CLAWDOLLPlayerDigestInfo.ProtoReflect.Descriptor instead.
func (*CLAWDOLLPlayerDigestInfo) Descriptor() ([]byte, []int) {
return file_clawdoll_proto_rawDescGZIP(), []int{12}
}
func (x *CLAWDOLLPlayerDigestInfo) GetSnId() int32 {
if x != nil {
return x.SnId
}
return 0
}
func (x *CLAWDOLLPlayerDigestInfo) GetHead() int32 {
if x != nil {
return x.Head
}
return 0
}
func (x *CLAWDOLLPlayerDigestInfo) GetHeadUrl() string {
if x != nil {
return x.HeadUrl
}
return ""
}
func (x *CLAWDOLLPlayerDigestInfo) GetName() string {
if x != nil {
return x.Name
}
return ""
}
var File_clawdoll_proto protoreflect.FileDescriptor var File_clawdoll_proto protoreflect.FileDescriptor
var file_clawdoll_proto_rawDesc = []byte{ var file_clawdoll_proto_rawDesc = []byte{
0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0xfe, 0x01, 0x0a, 0x12, 0x43, 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, 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, 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, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20,
@ -1076,128 +824,99 @@ var file_clawdoll_proto_rawDesc = []byte{
0x28, 0x05, 0x52, 0x03, 0x56, 0x49, 0x50, 0x12, 0x12, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x18, 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, 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, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x57, 0x69,
0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6c, 0x61, 0x77, 0x44, 0x6f, 0x6c, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0xf6, 0x02, 0x0a, 0x12, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57,
0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x63, 0x6c, 0x44, 0x4f, 0x4c, 0x4c, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06,
0x61, 0x77, 0x44, 0x6f, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xf6, 0x02, 0x0a, 0x12, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x6f,
0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x02,
0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08,
0x28, 0x05, 0x52, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x61, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x6d, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61,
0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75,
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74,
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x12, 0x36, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28,
0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x54, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x2e, 0x43, 0x4c, 0x41,
0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52,
0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x54, 0x6f, 0x74, 0x61,
0x6c, 0x6c, 0x2e, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x54,
0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x20, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x6f,
0x0a, 0x0b, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x08, 0x20, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x52, 0x6f, 0x75,
0x01, 0x28, 0x05, 0x52, 0x0b, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x78,
0x12, 0x18, 0x0a, 0x07, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x78,
0x05, 0x52, 0x07, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x49, 0x64, 0x18, 0x0f,
0x72, 0x61, 0x6d, 0x73, 0x45, 0x78, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x50, 0x61, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x49, 0x64,
0x72, 0x61, 0x6d, 0x73, 0x45, 0x78, 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x10, 0x20,
0x65, 0x65, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x01, 0x28, 0x05, 0x52, 0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x3e,
0x46, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x0a, 0x0c, 0x43, 0x53, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x4f, 0x70, 0x12, 0x16,
0x6f, 0x72, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x63, 0x6f, 0x72, 0x65, 0x22, 0x3e, 0x0a, 0x0c, 0x43, 0x53, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
0x4c, 0x4c, 0x4f, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x88,
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x01, 0x0a, 0x0c, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x4f, 0x70, 0x12,
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53,
0x72, 0x61, 0x6d, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x0c, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20,
0x4f, 0x4c, 0x4c, 0x4f, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50,
0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61, 0x72,
0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x61, 0x6d, 0x73, 0x12, 0x34, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c,
0x03, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x34, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x6c, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09,
0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x63, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x19, 0x53, 0x43,
0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x47, 0x61, 0x6d,
0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x6f, 0x75, 0x6e, 0x64,
0x85, 0x01, 0x0a, 0x19, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x52, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x49,
0x75, 0x6e, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18,
0x07, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x43, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x75, 0x6c,
0x52, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x77, 0x52, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x43, 0x6c, 0x6f, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e,
0x77, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x65, 0x22, 0x43, 0x0a, 0x13, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x52,
0x07, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6f, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74,
0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x43, 0x0a, 0x13, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16,
0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x02, 0x52, 0x06,
0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x5a, 0x0a, 0x14, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57,
0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12,
0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x80, 0x01, 0x0a, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e,
0x14, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x02,
0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x67, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x12,
0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6c, 0x61, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f,
0x77, 0x44, 0x6f, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x69, 0x6e, 0x22, 0x49, 0x0a, 0x15, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c,
0x52, 0x0d, 0x63, 0x6c, 0x61, 0x77, 0x44, 0x6f, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x04, 0x44,
0x1a, 0x0a, 0x08, 0x67, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6c, 0x61, 0x77,
0x03, 0x52, 0x08, 0x67, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x64, 0x6f, 0x6c, 0x6c, 0x2e, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61,
0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x29, 0x0a,
0x4f, 0x0a, 0x15, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x15, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65,
0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x2a, 0xc7, 0x02, 0x0a, 0x10, 0x43, 0x4c, 0x41,
0x6c, 0x2e, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a,
0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c,
0x22, 0x2b, 0x0a, 0x15, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x52, 0x4f,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x22, 0x14, 0x0a, 0x4f, 0x4d, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe1, 0x2b, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43,
0x12, 0x43, 0x53, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f,
0x6b, 0x65, 0x6e, 0x22, 0x5b, 0x0a, 0x13, 0x53, 0x43, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe2, 0x2b, 0x12, 0x20, 0x0a, 0x1b, 0x50,
0x4c, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x4c, 0x6f, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c,
0x67, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4c, 0x6f, 0x67, 0x4c, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe3, 0x2b, 0x12, 0x21, 0x0a,
0x69, 0x63, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44,
0x01, 0x28, 0x03, 0x52, 0x05, 0x41, 0x70, 0x70, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x4f, 0x4c, 0x4c, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xe4, 0x2b,
0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x22, 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c,
0x22, 0x63, 0x0a, 0x13, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x57, 0x61, 0x69, 0x74, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x42, 0x49, 0x4c, 0x4c, 0x45,
0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x4c, 0x0a, 0x0f, 0x57, 0x61, 0x69, 0x74, 0x50, 0x44, 0x10, 0xe5, 0x2b, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65,
0x32, 0x22, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x2e, 0x43, 0x4c, 0x41, 0x57, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xe6, 0x2b, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43,
0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x4c, 0x5f,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x57, 0x61, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x10, 0xe7, 0x2b, 0x12, 0x22,
0x73, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x70, 0x0a, 0x18, 0x43, 0x4c, 0x41, 0x57, 0x44, 0x4f, 0x4c, 0x0a, 0x1d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x4c, 0x41, 0x57,
0x4c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x44, 0x4f, 0x4c, 0x4c, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0x6f, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0xe8, 0x2b, 0x2a, 0x64, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f,
0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65,
0x01, 0x28, 0x05, 0x52, 0x04, 0x48, 0x65, 0x61, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72,
0x64, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x48, 0x65, 0x61, 0x64, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43, 0x6f, 0x69,
0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x6e, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16,
0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x2a, 0xfd, 0x02, 0x0a, 0x10, 0x43, 0x4c, 0x41, 0x57, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x6f, 0x73, 0x41, 0x6c, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50,
0x44, 0x4f, 0x4c, 0x4c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x0f, 0x0a, 0x0b, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x42, 0x28, 0x5a, 0x26, 0x6d, 0x6f, 0x6e, 0x67,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65,
0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x49, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6c, 0x61, 0x77, 0x64, 0x6f,
0x4e, 0x46, 0x4f, 0x10, 0xe1, 0x2b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x6c, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x5f, 0x43, 0x53, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe2, 0x2b, 0x12,
0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41,
0x59, 0x45, 0x52, 0x4f, 0x50, 0x10, 0xe3, 0x2b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10,
0xe4, 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f,
0x47, 0x41, 0x4d, 0x45, 0x42, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0xe5, 0x2b, 0x12, 0x1a, 0x0a,
0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65,
0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xe6, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61,
0x76, 0x65, 0x10, 0xe7, 0x2b, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe8, 0x2b,
0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x47, 0x45,
0x54, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0xe9, 0x2b, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x54, 0x4f, 0x4b, 0x45, 0x4e,
0x10, 0xea, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53,
0x5f, 0x57, 0x41, 0x49, 0x54, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x10, 0xeb, 0x2b, 0x12,
0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x41, 0x49,
0x54, 0x50, 0x4c, 0x41, 0x59, 0x45, 0x52, 0x53, 0x10, 0xec, 0x2b, 0x12, 0x1a, 0x0a, 0x15, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x49, 0x4e, 0x47,
0x49, 0x4e, 0x46, 0x4f, 0x10, 0xed, 0x2b, 0x2a, 0x64, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f,
0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52,
0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x50, 0x52,
0x43, 0x5f, 0x43, 0x6f, 0x69, 0x6e, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10,
0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x6f, 0x73, 0x41, 0x6c, 0x52,
0x65, 0x61, 0x64, 0x79, 0x50, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x42, 0x28, 0x5a,
0x26, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63,
0x6c, 0x61, 0x77, 0x64, 0x6f, 0x6c, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -1213,7 +932,7 @@ func file_clawdoll_proto_rawDescGZIP() []byte {
} }
var file_clawdoll_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_clawdoll_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_clawdoll_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_clawdoll_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_clawdoll_proto_goTypes = []interface{}{ var file_clawdoll_proto_goTypes = []interface{}{
(CLAWDOLLPacketID)(0), // 0: clawdoll.CLAWDOLLPacketID (CLAWDOLLPacketID)(0), // 0: clawdoll.CLAWDOLLPacketID
(OpResultCode)(0), // 1: clawdoll.OpResultCode (OpResultCode)(0), // 1: clawdoll.OpResultCode
@ -1226,21 +945,16 @@ var file_clawdoll_proto_goTypes = []interface{}{
(*SCCLAWDOLLPlayerInfo)(nil), // 8: clawdoll.SCCLAWDOLLPlayerInfo (*SCCLAWDOLLPlayerInfo)(nil), // 8: clawdoll.SCCLAWDOLLPlayerInfo
(*SCCLAWDOLLPlayerEnter)(nil), // 9: clawdoll.SCCLAWDOLLPlayerEnter (*SCCLAWDOLLPlayerEnter)(nil), // 9: clawdoll.SCCLAWDOLLPlayerEnter
(*SCCLAWDOLLPlayerLeave)(nil), // 10: clawdoll.SCCLAWDOLLPlayerLeave (*SCCLAWDOLLPlayerLeave)(nil), // 10: clawdoll.SCCLAWDOLLPlayerLeave
(*CSCLAWDOLLGetToken)(nil), // 11: clawdoll.CSCLAWDOLLGetToken
(*SCCLAWDOLLSendToken)(nil), // 12: clawdoll.SCCLAWDOLLSendToken
(*CLAWDOLLWaitPlayers)(nil), // 13: clawdoll.CLAWDOLLWaitPlayers
(*CLAWDOLLPlayerDigestInfo)(nil), // 14: clawdoll.CLAWDOLLPlayerDigestInfo
} }
var file_clawdoll_proto_depIdxs = []int32{ var file_clawdoll_proto_depIdxs = []int32{
2, // 0: clawdoll.SCCLAWDOLLRoomInfo.Players:type_name -> clawdoll.CLAWDOLLPlayerData 2, // 0: clawdoll.SCCLAWDOLLRoomInfo.Players:type_name -> clawdoll.CLAWDOLLPlayerData
1, // 1: clawdoll.SCCLAWDOLLOp.OpRetCode:type_name -> clawdoll.OpResultCode 1, // 1: clawdoll.SCCLAWDOLLOp.OpRetCode:type_name -> clawdoll.OpResultCode
14, // 2: clawdoll.SCCLAWDOLLPlayerEnter.Data:type_name -> clawdoll.CLAWDOLLPlayerDigestInfo 2, // 2: clawdoll.SCCLAWDOLLPlayerEnter.Data:type_name -> clawdoll.CLAWDOLLPlayerData
14, // 3: clawdoll.CLAWDOLLWaitPlayers.WaitPlayersInfo:type_name -> clawdoll.CLAWDOLLPlayerDigestInfo 3, // [3:3] is the sub-list for method output_type
4, // [4:4] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type
4, // [4:4] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee
4, // [4:4] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name
0, // [0:4] is the sub-list for field type_name
} }
func init() { file_clawdoll_proto_init() } func init() { file_clawdoll_proto_init() }
@ -1357,54 +1071,6 @@ func file_clawdoll_proto_init() {
return nil return nil
} }
} }
file_clawdoll_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CSCLAWDOLLGetToken); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_clawdoll_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCCLAWDOLLSendToken); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_clawdoll_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CLAWDOLLWaitPlayers); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_clawdoll_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CLAWDOLLPlayerDigestInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@ -1412,7 +1078,7 @@ func file_clawdoll_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_clawdoll_proto_rawDesc, RawDescriptor: file_clawdoll_proto_rawDesc,
NumEnums: 2, NumEnums: 2,
NumMessages: 13, NumMessages: 9,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -4,20 +4,15 @@ option go_package = "mongo.games.com/game/protocol/clawdoll";
// //
enum CLAWDOLLPacketID { enum CLAWDOLLPacketID {
PACKET_ZERO = 0; // PACKET_CLAWDOLL_ZERO = 0; //
PACKET_SC_ROOMINFO = 5601; // PACKET_SC_CLAWDOLL_ROOMINFO = 5601; //
PACKET_CS_PLAYEROP = 5602; //-> PACKET_CS_CLAWDOLL_PLAYEROP = 5602; //->
PACKET_SC_PLAYEROP = 5603; //-> PACKET_SC_CLAWDOLL_PLAYEROP = 5603; //->
PACKET_SC_ROOMSTATE = 5604; // PACKET_SC_CLAWDOLL_ROOMSTATE = 5604; //
PACKET_SC_GAMEBILLED = 5605; // PACKET_SC_CLAWDOLL_GAMEBILLED = 5605; //
PACKET_SC_PlayerEnter = 5606; // PACKET_SC_CLAWDOLL_PlayerEnter = 5606; //
PACKET_SC_PlayerLeave = 5607; // PACKET_SC_CLAWDOLL_PlayerLeave = 5607; //
PACKET_SC_PLAYERINFO = 5608; // PACKET_SC_CLAWDOLL_PLAYERINFO = 5608; //
PACKET_CS_GETTOKEN = 5609; // token
PACKET_SC_SENDTOKEN = 5610; // token
PACKET_CS_WAITPLAYERS = 5611; // ->
PACKET_SC_WAITPLAYERS = 5612; // ->
PACKET_SC_PLAYINGINFO = 5613; // ->
} }
// //
@ -39,7 +34,7 @@ message CLAWDOLLPlayerData {
int32 Flag = 8; // :线(0:线 1:线) :(0: 1:) int32 Flag = 8; // :线(0:线 1:线) :(0: 1:)
int64 WinCoin = 9; // int64 WinCoin = 9; //
int32 clawDollState = 10; //
} }
// //
@ -61,10 +56,8 @@ message SCCLAWDOLLRoomInfo {
// //
message CSCLAWDOLLOp { message CSCLAWDOLLOp {
int32 OpCode = 1; // 1: 2: 3: int32 OpCode = 1;
repeated int64 Params = 2; // 1: repeated int64 Params = 2;
// 2:
// 3Params[0] 1- 2- 3- 4-
} }
// //
@ -77,8 +70,8 @@ message SCCLAWDOLLOp {
// //
message SCCLAWDOLLRoundGameBilled { message SCCLAWDOLLRoundGameBilled {
int32 RoundId = 1; //ID int32 RoundId = 1; //ID
int32 ClowResult = 2; // 0: 1 int32 ClowResult = 2; //
int64 Award = 3; // int64 Award = 3; //
int64 Balance = 4; // int64 Balance = 4; //
} }
@ -92,41 +85,19 @@ message SCCLAWDOLLRoomState {
// //
message SCCLAWDOLLPlayerInfo { message SCCLAWDOLLPlayerInfo {
int32 SnId = 1; //ID int32 SnId = 1; //ID
int32 clawDollState = 2; // int64 gainCoin = 2; //
int64 gainCoin = 3; // int64 Coin = 3; //
int64 Coin = 4; //
} }
// //
//PACKET_SCCLAWDOLLPlayerEnter //PACKET_SCCLAWDOLLPlayerEnter
message SCCLAWDOLLPlayerEnter { message SCCLAWDOLLPlayerEnter {
CLAWDOLLPlayerDigestInfo Data = 1; CLAWDOLLPlayerData Data = 1;
} }
// //
//PACKET_SCCLAWDOLLPlayerLeave //PACKET_SCCLAWDOLLPlayerLeave
message SCCLAWDOLLPlayerLeave { message SCCLAWDOLLPlayerLeave {
int32 SnId = 1; //id int32 Pos = 1; //
}
//token
message CSCLAWDOLLGetToken {
}
message SCCLAWDOLLSendToken {
int32 LogicId = 1;
int64 Appid = 2;
string Token = 3;
}
message CLAWDOLLWaitPlayers {
repeated CLAWDOLLPlayerDigestInfo WaitPlayersInfo = 1;
}
//
message CLAWDOLLPlayerDigestInfo {
int32 SnId = 1; //
int32 Head = 2; //
string HeadUrl = 3; //
string Name = 4; //
} }

View File

@ -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
}

View File

@ -0,0 +1,43 @@
syntax = "proto3";
package dollmachine;
option go_package = "mongo.games.com/game/protocol/dollmachine";
//S-GAME M-
//
enum DollMachinePacketID {
PACKET_SMDollMachineZero = 0;
PACKET_SMDollMachineMove = 3001;
PACKET_SMDollMachineGrab = 3002;
PACKET_MSDollMachineGrab = 3003;
PACKET_MSDollMachineList = 3004;
}
//
message SMDollMachineMove{
int32 Snid = 1;
int32 Id = 2; //
int32 Direction = 3; // 1- 2- 3- 4-
}
//
message SMDollMachineGrab{
int32 TypeId = 1;//1- 2 - 3-
int32 Id =2; //
int32 Snid = 3;
}
//
message MSDollMachineGrab{
int32 Snid = 1;
int32 Id = 2; //
int32 Result = 3;//1-
}
//
message MSDollMachineList{
repeated DollMachine data = 1;
}
message DollMachine{
int32 Id = 1;
int32 Status = 2; //1- 2-使
}

View File

@ -28,11 +28,8 @@ const (
DollMachinePacketID_PACKET_SMGameLinkSucceed DollMachinePacketID = 20000 DollMachinePacketID_PACKET_SMGameLinkSucceed DollMachinePacketID = 20000
DollMachinePacketID_PACKET_SMDollMachinePerate DollMachinePacketID = 20001 DollMachinePacketID_PACKET_SMDollMachinePerate DollMachinePacketID = 20001
DollMachinePacketID_PACKET_SMDollMachineGrab DollMachinePacketID = 20002 DollMachinePacketID_PACKET_SMDollMachineGrab DollMachinePacketID = 20002
DollMachinePacketID_PACKET_MSDollMachineList DollMachinePacketID = 20003 DollMachinePacketID_PACKET_MSDollMachineGrab DollMachinePacketID = 20003
DollMachinePacketID_PACKET_MSUpdateDollMachineStatus DollMachinePacketID = 20004 DollMachinePacketID_PACKET_MSDollMachineList DollMachinePacketID = 20004
DollMachinePacketID_PACKET_MSDollMachineoPerateResult DollMachinePacketID = 20005
DollMachinePacketID_PACKET_SMGetToken DollMachinePacketID = 20006
DollMachinePacketID_PACKET_MSSendToken DollMachinePacketID = 20007
) )
// Enum value maps for DollMachinePacketID. // Enum value maps for DollMachinePacketID.
@ -42,22 +39,16 @@ var (
20000: "PACKET_SMGameLinkSucceed", 20000: "PACKET_SMGameLinkSucceed",
20001: "PACKET_SMDollMachinePerate", 20001: "PACKET_SMDollMachinePerate",
20002: "PACKET_SMDollMachineGrab", 20002: "PACKET_SMDollMachineGrab",
20003: "PACKET_MSDollMachineList", 20003: "PACKET_MSDollMachineGrab",
20004: "PACKET_MSUpdateDollMachineStatus", 20004: "PACKET_MSDollMachineList",
20005: "PACKET_MSDollMachineoPerateResult",
20006: "PACKET_SMGetToken",
20007: "PACKET_MSSendToken",
} }
DollMachinePacketID_value = map[string]int32{ DollMachinePacketID_value = map[string]int32{
"PACKET_SMDollMachineZero": 0, "PACKET_SMDollMachineZero": 0,
"PACKET_SMGameLinkSucceed": 20000, "PACKET_SMGameLinkSucceed": 20000,
"PACKET_SMDollMachinePerate": 20001, "PACKET_SMDollMachinePerate": 20001,
"PACKET_SMDollMachineGrab": 20002, "PACKET_SMDollMachineGrab": 20002,
"PACKET_MSDollMachineList": 20003, "PACKET_MSDollMachineGrab": 20003,
"PACKET_MSUpdateDollMachineStatus": 20004, "PACKET_MSDollMachineList": 20004,
"PACKET_MSDollMachineoPerateResult": 20005,
"PACKET_SMGetToken": 20006,
"PACKET_MSSendToken": 20007,
} }
) )
@ -89,7 +80,6 @@ func (DollMachinePacketID) EnumDescriptor() ([]byte, []int) {
} }
//通知链接成功 //通知链接成功
//PACKET_SMDollMachinePerate
type SMGameLinkSucceed struct { type SMGameLinkSucceed struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -129,7 +119,6 @@ func (*SMGameLinkSucceed) Descriptor() ([]byte, []int) {
} }
//操作 //操作
//PACKET_SMDollMachinePerate
type SMDollMachineoPerate struct { type SMDollMachineoPerate struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -257,20 +246,19 @@ func (x *SMDollMachineGrab) GetSnid() int32 {
return 0 return 0
} }
//PACKET_MSDollMachineoPerateResult //返回下抓结果
type MSDollMachineoPerateResult struct { type MSDollMachineGrab struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Snid int32 `protobuf:"varint,1,opt,name=Snid,proto3" json:"Snid,omitempty"` Snid int32 `protobuf:"varint,1,opt,name=Snid,proto3" json:"Snid,omitempty"`
Id int32 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,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-成功 0-失败 Result int32 `protobuf:"varint,3,opt,name=Result,proto3" json:"Result,omitempty"` //1-中奖 其他未中奖
TypeId int32 `protobuf:"varint,4,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //1 投币 2 下抓结果
} }
func (x *MSDollMachineoPerateResult) Reset() { func (x *MSDollMachineGrab) Reset() {
*x = MSDollMachineoPerateResult{} *x = MSDollMachineGrab{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_machine_proto_msgTypes[3] mi := &file_machine_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -278,13 +266,13 @@ func (x *MSDollMachineoPerateResult) Reset() {
} }
} }
func (x *MSDollMachineoPerateResult) String() string { func (x *MSDollMachineGrab) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*MSDollMachineoPerateResult) ProtoMessage() {} func (*MSDollMachineGrab) ProtoMessage() {}
func (x *MSDollMachineoPerateResult) ProtoReflect() protoreflect.Message { func (x *MSDollMachineGrab) ProtoReflect() protoreflect.Message {
mi := &file_machine_proto_msgTypes[3] mi := &file_machine_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -296,39 +284,32 @@ func (x *MSDollMachineoPerateResult) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use MSDollMachineoPerateResult.ProtoReflect.Descriptor instead. // Deprecated: Use MSDollMachineGrab.ProtoReflect.Descriptor instead.
func (*MSDollMachineoPerateResult) Descriptor() ([]byte, []int) { func (*MSDollMachineGrab) Descriptor() ([]byte, []int) {
return file_machine_proto_rawDescGZIP(), []int{3} return file_machine_proto_rawDescGZIP(), []int{3}
} }
func (x *MSDollMachineoPerateResult) GetSnid() int32 { func (x *MSDollMachineGrab) GetSnid() int32 {
if x != nil { if x != nil {
return x.Snid return x.Snid
} }
return 0 return 0
} }
func (x *MSDollMachineoPerateResult) GetId() int32 { func (x *MSDollMachineGrab) GetId() int32 {
if x != nil { if x != nil {
return x.Id return x.Id
} }
return 0 return 0
} }
func (x *MSDollMachineoPerateResult) GetResult() int32 { func (x *MSDollMachineGrab) GetResult() int32 {
if x != nil { if x != nil {
return x.Result return x.Result
} }
return 0 return 0
} }
func (x *MSDollMachineoPerateResult) GetTypeId() int32 {
if x != nil {
return x.TypeId
}
return 0
}
//返回所有娃娃机连接 //返回所有娃娃机连接
type MSDollMachineList struct { type MSDollMachineList struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -432,198 +413,6 @@ func (x *DollMachine) GetVideoAddr() string {
return "" return ""
} }
//更新娃娃机状态
type MSUpdateDollMachineStatus 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-空闲 0-无法使用
VideoAddr string `protobuf:"bytes,3,opt,name=VideoAddr,proto3" json:"VideoAddr,omitempty"`
}
func (x *MSUpdateDollMachineStatus) Reset() {
*x = MSUpdateDollMachineStatus{}
if protoimpl.UnsafeEnabled {
mi := &file_machine_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MSUpdateDollMachineStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MSUpdateDollMachineStatus) ProtoMessage() {}
func (x *MSUpdateDollMachineStatus) ProtoReflect() protoreflect.Message {
mi := &file_machine_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 MSUpdateDollMachineStatus.ProtoReflect.Descriptor instead.
func (*MSUpdateDollMachineStatus) Descriptor() ([]byte, []int) {
return file_machine_proto_rawDescGZIP(), []int{6}
}
func (x *MSUpdateDollMachineStatus) GetId() int32 {
if x != nil {
return x.Id
}
return 0
}
func (x *MSUpdateDollMachineStatus) GetStatus() int32 {
if x != nil {
return x.Status
}
return 0
}
func (x *MSUpdateDollMachineStatus) GetVideoAddr() string {
if x != nil {
return x.VideoAddr
}
return ""
}
//获取token
type SMGetToken struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Snid int32 `protobuf:"varint,1,opt,name=Snid,proto3" json:"Snid,omitempty"`
AppId int64 `protobuf:"varint,2,opt,name=AppId,proto3" json:"AppId,omitempty"`
ServerSecret string `protobuf:"bytes,3,opt,name=ServerSecret,proto3" json:"ServerSecret,omitempty"`
}
func (x *SMGetToken) Reset() {
*x = SMGetToken{}
if protoimpl.UnsafeEnabled {
mi := &file_machine_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SMGetToken) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SMGetToken) ProtoMessage() {}
func (x *SMGetToken) ProtoReflect() protoreflect.Message {
mi := &file_machine_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 SMGetToken.ProtoReflect.Descriptor instead.
func (*SMGetToken) Descriptor() ([]byte, []int) {
return file_machine_proto_rawDescGZIP(), []int{7}
}
func (x *SMGetToken) GetSnid() int32 {
if x != nil {
return x.Snid
}
return 0
}
func (x *SMGetToken) GetAppId() int64 {
if x != nil {
return x.AppId
}
return 0
}
func (x *SMGetToken) GetServerSecret() string {
if x != nil {
return x.ServerSecret
}
return ""
}
//返回token
type MSSendToken struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Snid int32 `protobuf:"varint,1,opt,name=Snid,proto3" json:"Snid,omitempty"`
Appid int64 `protobuf:"varint,2,opt,name=Appid,proto3" json:"Appid,omitempty"`
Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"`
}
func (x *MSSendToken) Reset() {
*x = MSSendToken{}
if protoimpl.UnsafeEnabled {
mi := &file_machine_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MSSendToken) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MSSendToken) ProtoMessage() {}
func (x *MSSendToken) ProtoReflect() protoreflect.Message {
mi := &file_machine_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 MSSendToken.ProtoReflect.Descriptor instead.
func (*MSSendToken) Descriptor() ([]byte, []int) {
return file_machine_proto_rawDescGZIP(), []int{8}
}
func (x *MSSendToken) GetSnid() int32 {
if x != nil {
return x.Snid
}
return 0
}
func (x *MSSendToken) GetAppid() int64 {
if x != nil {
return x.Appid
}
return 0
}
func (x *MSSendToken) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
var File_machine_proto protoreflect.FileDescriptor var File_machine_proto protoreflect.FileDescriptor
var file_machine_proto_rawDesc = []byte{ var file_machine_proto_rawDesc = []byte{
@ -640,61 +429,36 @@ var file_machine_proto_rawDesc = []byte{
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x0e, 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, 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, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e,
0x69, 0x64, 0x22, 0x70, 0x0a, 0x1a, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x64, 0x22, 0x4f, 0x0a, 0x11, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68,
0x69, 0x6e, 0x65, 0x6f, 0x50, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x69, 0x6e, 0x65, 0x47, 0x72, 0x61, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18,
0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49,
0x53, 0x6e, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52,
0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x65, 0x73,
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6c, 0x74, 0x22, 0x3d, 0x0a, 0x11, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63,
0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
0x70, 0x65, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x11, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65,
0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x2e, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61,
0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x74, 0x61, 0x22, 0x3b, 0x0a, 0x0b, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e,
0x65, 0x2e, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49,
0x61, 0x74, 0x61, 0x22, 0x3b, 0x0a, 0x0b, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02,
0x6e, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x2a,
0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x18, 0xd5, 0x01, 0x0a, 0x13, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x50,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x22, 0x61, 0x0a, 0x19, 0x4d, 0x53, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x6c, 0x6c, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5a,
0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x53, 0x4d, 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65,
0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x64, 0x10, 0xa0, 0x9c, 0x01, 0x12, 0x20, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x41, 0x64, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72,
0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x41, 0x61, 0x74, 0x65, 0x10, 0xa1, 0x9c, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x64, 0x64, 0x72, 0x22, 0x5a, 0x0a, 0x0a, 0x53, 0x4d, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x47,
0x6e, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x72, 0x61, 0x62, 0x10, 0xa2, 0x9c, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x18, 0x02, 0x54, 0x5f, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x47,
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x53, 0x72, 0x61, 0x62, 0x10, 0xa3, 0x9c, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x54, 0x5f, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c,
0x09, 0x52, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x69, 0x73, 0x74, 0x10, 0xa4, 0x9c, 0x01, 0x42, 0x27, 0x5a, 0x25, 0x6d, 0x6f, 0x6e, 0x67, 0x6f,
0x4d, 0x0a, 0x0b, 0x4d, 0x53, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x12, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f,
0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65,
0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x03, 0x52, 0x05, 0x41, 0x70, 0x70, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2a, 0xb9,
0x02, 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, 0x4c, 0x69,
0x73, 0x74, 0x10, 0xa3, 0x9c, 0x01, 0x12, 0x26, 0x0a, 0x20, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x4d, 0x53, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63,
0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x10, 0xa4, 0x9c, 0x01, 0x12, 0x27,
0x0a, 0x21, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d,
0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x6f, 0x50, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x10, 0xa5, 0x9c, 0x01, 0x12, 0x17, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x53, 0x4d, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xa6, 0x9c, 0x01,
0x12, 0x18, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x53, 0x53, 0x65, 0x6e,
0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xa7, 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 ( var (
@ -710,18 +474,15 @@ func file_machine_proto_rawDescGZIP() []byte {
} }
var file_machine_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_machine_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_machine_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_machine_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_machine_proto_goTypes = []interface{}{ var file_machine_proto_goTypes = []interface{}{
(DollMachinePacketID)(0), // 0: machine.DollMachinePacketID (DollMachinePacketID)(0), // 0: machine.DollMachinePacketID
(*SMGameLinkSucceed)(nil), // 1: machine.SMGameLinkSucceed (*SMGameLinkSucceed)(nil), // 1: machine.SMGameLinkSucceed
(*SMDollMachineoPerate)(nil), // 2: machine.SMDollMachineoPerate (*SMDollMachineoPerate)(nil), // 2: machine.SMDollMachineoPerate
(*SMDollMachineGrab)(nil), // 3: machine.SMDollMachineGrab (*SMDollMachineGrab)(nil), // 3: machine.SMDollMachineGrab
(*MSDollMachineoPerateResult)(nil), // 4: machine.MSDollMachineoPerateResult (*MSDollMachineGrab)(nil), // 4: machine.MSDollMachineGrab
(*MSDollMachineList)(nil), // 5: machine.MSDollMachineList (*MSDollMachineList)(nil), // 5: machine.MSDollMachineList
(*DollMachine)(nil), // 6: machine.DollMachine (*DollMachine)(nil), // 6: machine.DollMachine
(*MSUpdateDollMachineStatus)(nil), // 7: machine.MSUpdateDollMachineStatus
(*SMGetToken)(nil), // 8: machine.SMGetToken
(*MSSendToken)(nil), // 9: machine.MSSendToken
} }
var file_machine_proto_depIdxs = []int32{ var file_machine_proto_depIdxs = []int32{
6, // 0: machine.MSDollMachineList.data:type_name -> machine.DollMachine 6, // 0: machine.MSDollMachineList.data:type_name -> machine.DollMachine
@ -775,7 +536,7 @@ func file_machine_proto_init() {
} }
} }
file_machine_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_machine_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MSDollMachineoPerateResult); i { switch v := v.(*MSDollMachineGrab); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -810,42 +571,6 @@ func file_machine_proto_init() {
return nil return nil
} }
} }
file_machine_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MSUpdateDollMachineStatus); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_machine_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SMGetToken); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_machine_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MSSendToken); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@ -853,7 +578,7 @@ func file_machine_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_machine_proto_rawDesc, RawDescriptor: file_machine_proto_rawDesc,
NumEnums: 1, NumEnums: 1,
NumMessages: 9, NumMessages: 6,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -10,19 +10,14 @@ enum DollMachinePacketID {
PACKET_SMGameLinkSucceed = 20000; PACKET_SMGameLinkSucceed = 20000;
PACKET_SMDollMachinePerate = 20001; PACKET_SMDollMachinePerate = 20001;
PACKET_SMDollMachineGrab = 20002; PACKET_SMDollMachineGrab = 20002;
PACKET_MSDollMachineList = 20003; PACKET_MSDollMachineGrab = 20003;
PACKET_MSUpdateDollMachineStatus = 20004; PACKET_MSDollMachineList = 20004;
PACKET_MSDollMachineoPerateResult = 20005;
PACKET_SMGetToken = 20006;
PACKET_MSSendToken = 20007;
} }
// //
//PACKET_SMDollMachinePerate
message SMGameLinkSucceed{ message SMGameLinkSucceed{
} }
// //
//PACKET_SMDollMachinePerate
message SMDollMachineoPerate{ message SMDollMachineoPerate{
int32 Snid = 1; int32 Snid = 1;
int32 Id = 2; // int32 Id = 2; //
@ -36,15 +31,13 @@ message SMDollMachineGrab{
int32 Snid = 3; int32 Snid = 3;
} }
//PACKET_MSDollMachineoPerateResult //
message MSDollMachineoPerateResult{ message MSDollMachineGrab{
int32 Snid = 1; int32 Snid = 1;
int32 Id = 2; // int32 Id = 2; //
int32 Result = 3;// 1- 0- int32 Result = 3;//1-
int32 TypeId = 4;//1 2
} }
// //
message MSDollMachineList{ message MSDollMachineList{
repeated DollMachine data = 1; repeated DollMachine data = 1;
@ -53,21 +46,3 @@ message DollMachine{
int32 Id = 1; int32 Id = 1;
string VideoAddr = 2; string VideoAddr = 2;
} }
//
message MSUpdateDollMachineStatus{
int32 Id = 1;
int32 Status = 2; //1- 0-使
string VideoAddr = 3;
}
//token
message SMGetToken{
int32 Snid = 1;
int64 AppId = 2;
string ServerSecret = 3;
}
//token
message MSSendToken{
int32 Snid = 1;
int64 Appid = 2;
string Token = 3;
}

View File

@ -8193,134 +8193,6 @@ func (x *GuideConfig) GetSkip() int32 {
return 0 return 0
} }
//娃娃机配置视频
// etcd /game/machine_config
type MachineConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台
Info []*MachineInfo `protobuf:"bytes,2,rep,name=Info,proto3" json:"Info,omitempty"`
}
func (x *MachineConfig) Reset() {
*x = MachineConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[86]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MachineConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MachineConfig) ProtoMessage() {}
func (x *MachineConfig) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[86]
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 MachineConfig.ProtoReflect.Descriptor instead.
func (*MachineConfig) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{86}
}
func (x *MachineConfig) GetPlatform() string {
if x != nil {
return x.Platform
}
return ""
}
func (x *MachineConfig) GetInfo() []*MachineInfo {
if x != nil {
return x.Info
}
return nil
}
type MachineInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MachineId int32 `protobuf:"varint,1,opt,name=MachineId,proto3" json:"MachineId,omitempty"` //娃娃机Id
AppId int64 `protobuf:"varint,2,opt,name=AppId,proto3" json:"AppId,omitempty"`
ServerSecret string `protobuf:"bytes,3,opt,name=ServerSecret,proto3" json:"ServerSecret,omitempty"`
StreamId string `protobuf:"bytes,4,opt,name=StreamId,proto3" json:"StreamId,omitempty"`
}
func (x *MachineInfo) Reset() {
*x = MachineInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[87]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MachineInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MachineInfo) ProtoMessage() {}
func (x *MachineInfo) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[87]
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 MachineInfo.ProtoReflect.Descriptor instead.
func (*MachineInfo) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{87}
}
func (x *MachineInfo) GetMachineId() int32 {
if x != nil {
return x.MachineId
}
return 0
}
func (x *MachineInfo) GetAppId() int64 {
if x != nil {
return x.AppId
}
return 0
}
func (x *MachineInfo) GetServerSecret() string {
if x != nil {
return x.ServerSecret
}
return ""
}
func (x *MachineInfo) GetStreamId() string {
if x != nil {
return x.StreamId
}
return ""
}
// etcd /game/match_audience // etcd /game/match_audience
type MatchAudience struct { type MatchAudience struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -8335,7 +8207,7 @@ type MatchAudience struct {
func (x *MatchAudience) Reset() { func (x *MatchAudience) Reset() {
*x = MatchAudience{} *x = MatchAudience{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[88] mi := &file_common_proto_msgTypes[86]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -8348,7 +8220,7 @@ func (x *MatchAudience) String() string {
func (*MatchAudience) ProtoMessage() {} func (*MatchAudience) ProtoMessage() {}
func (x *MatchAudience) ProtoReflect() protoreflect.Message { func (x *MatchAudience) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[88] mi := &file_common_proto_msgTypes[86]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -8361,7 +8233,7 @@ func (x *MatchAudience) ProtoReflect() protoreflect.Message {
// Deprecated: Use MatchAudience.ProtoReflect.Descriptor instead. // Deprecated: Use MatchAudience.ProtoReflect.Descriptor instead.
func (*MatchAudience) Descriptor() ([]byte, []int) { func (*MatchAudience) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{88} return file_common_proto_rawDescGZIP(), []int{86}
} }
func (x *MatchAudience) GetPlatform() string { func (x *MatchAudience) GetPlatform() string {
@ -8399,7 +8271,7 @@ type SpiritConfig struct {
func (x *SpiritConfig) Reset() { func (x *SpiritConfig) Reset() {
*x = SpiritConfig{} *x = SpiritConfig{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[89] mi := &file_common_proto_msgTypes[87]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -8412,7 +8284,7 @@ func (x *SpiritConfig) String() string {
func (*SpiritConfig) ProtoMessage() {} func (*SpiritConfig) ProtoMessage() {}
func (x *SpiritConfig) ProtoReflect() protoreflect.Message { func (x *SpiritConfig) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[89] mi := &file_common_proto_msgTypes[87]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -8425,7 +8297,7 @@ func (x *SpiritConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use SpiritConfig.ProtoReflect.Descriptor instead. // Deprecated: Use SpiritConfig.ProtoReflect.Descriptor instead.
func (*SpiritConfig) Descriptor() ([]byte, []int) { func (*SpiritConfig) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{89} return file_common_proto_rawDescGZIP(), []int{87}
} }
func (x *SpiritConfig) GetPlatform() string { func (x *SpiritConfig) GetPlatform() string {
@ -8465,7 +8337,7 @@ type RoomType struct {
func (x *RoomType) Reset() { func (x *RoomType) Reset() {
*x = RoomType{} *x = RoomType{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[90] mi := &file_common_proto_msgTypes[88]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -8478,7 +8350,7 @@ func (x *RoomType) String() string {
func (*RoomType) ProtoMessage() {} func (*RoomType) ProtoMessage() {}
func (x *RoomType) ProtoReflect() protoreflect.Message { func (x *RoomType) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[90] mi := &file_common_proto_msgTypes[88]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -8491,7 +8363,7 @@ func (x *RoomType) ProtoReflect() protoreflect.Message {
// Deprecated: Use RoomType.ProtoReflect.Descriptor instead. // Deprecated: Use RoomType.ProtoReflect.Descriptor instead.
func (*RoomType) Descriptor() ([]byte, []int) { func (*RoomType) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{90} return file_common_proto_rawDescGZIP(), []int{88}
} }
func (x *RoomType) GetPlatform() string { func (x *RoomType) GetPlatform() string {
@ -8556,7 +8428,7 @@ type RoomConfig struct {
func (x *RoomConfig) Reset() { func (x *RoomConfig) Reset() {
*x = RoomConfig{} *x = RoomConfig{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[91] mi := &file_common_proto_msgTypes[89]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -8569,7 +8441,7 @@ func (x *RoomConfig) String() string {
func (*RoomConfig) ProtoMessage() {} func (*RoomConfig) ProtoMessage() {}
func (x *RoomConfig) ProtoReflect() protoreflect.Message { func (x *RoomConfig) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[91] mi := &file_common_proto_msgTypes[89]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -8582,7 +8454,7 @@ func (x *RoomConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use RoomConfig.ProtoReflect.Descriptor instead. // Deprecated: Use RoomConfig.ProtoReflect.Descriptor instead.
func (*RoomConfig) Descriptor() ([]byte, []int) { func (*RoomConfig) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{91} return file_common_proto_rawDescGZIP(), []int{89}
} }
func (x *RoomConfig) GetPlatform() string { func (x *RoomConfig) GetPlatform() string {
@ -9994,70 +9866,56 @@ var file_common_proto_rawDesc = []byte{
0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66,
0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x02, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6b, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6b, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x04, 0x53, 0x6b, 0x69, 0x70, 0x22, 0x54, 0x0a, 0x0d, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x05, 0x52, 0x04, 0x53, 0x6b, 0x69, 0x70, 0x22, 0x4f, 0x0a, 0x0d, 0x4d, 0x61, 0x74, 0x63, 0x68,
0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x12, 0x27, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x73, 0x18, 0x03,
0x69, 0x6e, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x81, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x54, 0x73, 0x22, 0x4c, 0x0a, 0x0c, 0x53, 0x70, 0x69, 0x72,
0x0a, 0x0b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74,
0x09, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74,
0x52, 0x09, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x70, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x41, 0x70, 0x70, 0x49, 0x52, 0x02, 0x4f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28,
0x64, 0x12, 0x22, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x22, 0x72, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01,
0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49,
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49,
0x64, 0x22, 0x4f, 0x0a, 0x0d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e,
0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12,
0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e,
0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
0x54, 0x73, 0x22, 0x4c, 0x0a, 0x0c, 0x53, 0x70, 0x69, 0x72, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e,
0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x12, 0x10, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x12,
0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61,
0x22, 0x72, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01,
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x28, 0x05, 0x52, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x22, 0xcc, 0x03, 0x0a, 0x0a, 0x52,
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61,
0x4f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x6f, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
0x72, 0x74, 0x49, 0x64, 0x22, 0xcc, 0x03, 0x0a, 0x0a, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f,
0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x52, 0x6f, 0x6f,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x18,
0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a,
0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x77, 0x65,
0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x43,
0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x12, 0x6f, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x08, 0x20,
0x16, 0x0a, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x74, 0x65,
0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x18, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x24, 0x0a,
0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x0d, 0x4f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x09,
0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x4f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e,
0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x49,
0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65,
0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x4f, 0x6e, 0x43, 0x68, 0x61, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x03,
0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x28, 0x05, 0x52, 0x05, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x6c, 0x61,
0x4f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x79, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x50, 0x6c,
0x0a, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x4e, 0x65, 0x65, 0x64, 0x50,
0x05, 0x52, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x4e,
0x05, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x52, 0x6f, 0x65, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x43,
0x75, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43,
0x18, 0x0c, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x75, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65,
0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x4e, 0x65, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x0a,
0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x4e, 0x65, 0x65, 0x64, 0x50, 0x61, 0x73, 0x08, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x52, 0x49, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52,
0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x08, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x52, 0x49, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e,
0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70,
0x52, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x55, 0x52, 0x49, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x49, 0x6d, 0x61, 0x67, 0x65,
0x55, 0x52, 0x49, 0x42, 0x26, 0x5a, 0x24, 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, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
} }
var ( var (
@ -10072,7 +9930,7 @@ func file_common_proto_rawDescGZIP() []byte {
return file_common_proto_rawDescData return file_common_proto_rawDescData
} }
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 102) var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 100)
var file_common_proto_goTypes = []interface{}{ var file_common_proto_goTypes = []interface{}{
(*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting (*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting
(*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting (*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting
@ -10160,38 +10018,36 @@ var file_common_proto_goTypes = []interface{}{
(*AwardLogInfo)(nil), // 83: webapi.AwardLogInfo (*AwardLogInfo)(nil), // 83: webapi.AwardLogInfo
(*AnnouncerLogInfo)(nil), // 84: webapi.AnnouncerLogInfo (*AnnouncerLogInfo)(nil), // 84: webapi.AnnouncerLogInfo
(*GuideConfig)(nil), // 85: webapi.GuideConfig (*GuideConfig)(nil), // 85: webapi.GuideConfig
(*MachineConfig)(nil), // 86: webapi.MachineConfig (*MatchAudience)(nil), // 86: webapi.MatchAudience
(*MachineInfo)(nil), // 87: webapi.MachineInfo (*SpiritConfig)(nil), // 87: webapi.SpiritConfig
(*MatchAudience)(nil), // 88: webapi.MatchAudience (*RoomType)(nil), // 88: webapi.RoomType
(*SpiritConfig)(nil), // 89: webapi.SpiritConfig (*RoomConfig)(nil), // 89: webapi.RoomConfig
(*RoomType)(nil), // 90: webapi.RoomType nil, // 90: webapi.Platform.BindTelRewardEntry
(*RoomConfig)(nil), // 91: webapi.RoomConfig nil, // 91: webapi.PlayerData.RankScoreEntry
nil, // 92: webapi.Platform.BindTelRewardEntry nil, // 92: webapi.ItemShop.AwardEntry
nil, // 93: webapi.PlayerData.RankScoreEntry nil, // 93: webapi.VIPcfg.AwardEntry
nil, // 94: webapi.ItemShop.AwardEntry nil, // 94: webapi.VIPcfg.Privilege1Entry
nil, // 95: webapi.VIPcfg.AwardEntry nil, // 95: webapi.VIPcfg.Privilege7Entry
nil, // 96: webapi.VIPcfg.Privilege1Entry nil, // 96: webapi.VIPcfg.Privilege9Entry
nil, // 97: webapi.VIPcfg.Privilege7Entry nil, // 97: webapi.ActInviteConfig.PayScoreEntry
nil, // 98: webapi.VIPcfg.Privilege9Entry nil, // 98: webapi.SkinLevel.UpItemEntry
nil, // 99: webapi.ActInviteConfig.PayScoreEntry nil, // 99: webapi.SkinItem.UnlockParamEntry
nil, // 100: webapi.SkinLevel.UpItemEntry (*server.DB_GameFree)(nil), // 100: server.DB_GameFree
nil, // 101: webapi.SkinItem.UnlockParamEntry (*server.DB_GameItem)(nil), // 101: server.DB_GameItem
(*server.DB_GameFree)(nil), // 102: server.DB_GameFree
(*server.DB_GameItem)(nil), // 103: server.DB_GameItem
} }
var file_common_proto_depIdxs = []int32{ var file_common_proto_depIdxs = []int32{
2, // 0: webapi.Platform.Leaderboard:type_name -> webapi.RankSwitch 2, // 0: webapi.Platform.Leaderboard:type_name -> webapi.RankSwitch
3, // 1: webapi.Platform.ClubConfig:type_name -> webapi.ClubConfig 3, // 1: webapi.Platform.ClubConfig:type_name -> webapi.ClubConfig
4, // 2: webapi.Platform.ThirdGameMerchant:type_name -> webapi.ThirdGame 4, // 2: webapi.Platform.ThirdGameMerchant:type_name -> webapi.ThirdGame
92, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry 90, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus 6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus
102, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree 100, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
8, // 6: webapi.PlatformGameConfig.DbGameFrees:type_name -> webapi.GameFree 8, // 6: webapi.PlatformGameConfig.DbGameFrees:type_name -> webapi.GameFree
0, // 7: webapi.PlatformDbConfig.Mysql:type_name -> webapi.MysqlDbSetting 0, // 7: webapi.PlatformDbConfig.Mysql:type_name -> webapi.MysqlDbSetting
1, // 8: webapi.PlatformDbConfig.MongoDb:type_name -> webapi.MongoDbSetting 1, // 8: webapi.PlatformDbConfig.MongoDb:type_name -> webapi.MongoDbSetting
1, // 9: webapi.PlatformDbConfig.MongoDbLog:type_name -> webapi.MongoDbSetting 1, // 9: webapi.PlatformDbConfig.MongoDbLog:type_name -> webapi.MongoDbSetting
102, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree 100, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
93, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry 91, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
32, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo 32, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo
14, // 13: webapi.PlayerData.RoleUnlockList:type_name -> webapi.ModInfo 14, // 13: webapi.PlayerData.RoleUnlockList:type_name -> webapi.ModInfo
14, // 14: webapi.PlayerData.PetUnlockList:type_name -> webapi.ModInfo 14, // 14: webapi.PlayerData.PetUnlockList:type_name -> webapi.ModInfo
@ -10204,7 +10060,7 @@ var file_common_proto_depIdxs = []int32{
32, // 21: webapi.ExchangeShop.Items:type_name -> webapi.ItemInfo 32, // 21: webapi.ExchangeShop.Items:type_name -> webapi.ItemInfo
25, // 22: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop 25, // 22: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop
29, // 23: webapi.ExchangeShopList.Weight:type_name -> webapi.ShopWeight 29, // 23: webapi.ExchangeShopList.Weight:type_name -> webapi.ShopWeight
94, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry 92, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
30, // 25: webapi.ItemShopList.List:type_name -> webapi.ItemShop 30, // 25: webapi.ItemShopList.List:type_name -> webapi.ItemShop
32, // 26: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo 32, // 26: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo
33, // 27: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward 33, // 27: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward
@ -10225,14 +10081,14 @@ var file_common_proto_depIdxs = []int32{
38, // 42: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate 38, // 42: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate
48, // 43: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree 48, // 43: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree
48, // 44: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree 48, // 44: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree
95, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry 93, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
96, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry 94, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry
97, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry 95, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
98, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry 96, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry
51, // 49: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg 51, // 49: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg
38, // 50: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate 38, // 50: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate
55, // 51: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig 55, // 51: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig
99, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry 97, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
62, // 53: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward 62, // 53: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward
62, // 54: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward 62, // 54: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward
62, // 55: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward 62, // 55: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward
@ -10249,25 +10105,24 @@ var file_common_proto_depIdxs = []int32{
69, // 66: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo 69, // 66: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo
70, // 67: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers 70, // 67: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers
72, // 68: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData 72, // 68: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData
103, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem 101, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
32, // 70: webapi.RankAwardInfo.Item:type_name -> webapi.ItemInfo 32, // 70: webapi.RankAwardInfo.Item:type_name -> webapi.ItemInfo
75, // 71: webapi.RankTypeInfo.Award:type_name -> webapi.RankAwardInfo 75, // 71: webapi.RankTypeInfo.Award:type_name -> webapi.RankAwardInfo
76, // 72: webapi.RankTypeConfig.Info:type_name -> webapi.RankTypeInfo 76, // 72: webapi.RankTypeConfig.Info:type_name -> webapi.RankTypeInfo
100, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry 98, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
101, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry 99, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
78, // 75: webapi.SkinItem.Levels:type_name -> webapi.SkinLevel 78, // 75: webapi.SkinItem.Levels:type_name -> webapi.SkinLevel
79, // 76: webapi.SkinConfig.Items:type_name -> webapi.SkinItem 79, // 76: webapi.SkinConfig.Items:type_name -> webapi.SkinItem
82, // 77: webapi.AwardLogConfig.AwardLog:type_name -> webapi.AwardLogData 82, // 77: webapi.AwardLogConfig.AwardLog:type_name -> webapi.AwardLogData
84, // 78: webapi.AwardLogConfig.AnnouncerLog:type_name -> webapi.AnnouncerLogInfo 84, // 78: webapi.AwardLogConfig.AnnouncerLog:type_name -> webapi.AnnouncerLogInfo
83, // 79: webapi.AwardLogData.AwardLog:type_name -> webapi.AwardLogInfo 83, // 79: webapi.AwardLogData.AwardLog:type_name -> webapi.AwardLogInfo
87, // 80: webapi.MachineConfig.Info:type_name -> webapi.MachineInfo 32, // 80: webapi.RoomConfig.Cost:type_name -> webapi.ItemInfo
32, // 81: webapi.RoomConfig.Cost:type_name -> webapi.ItemInfo 32, // 81: webapi.RoomConfig.Reward:type_name -> webapi.ItemInfo
32, // 82: webapi.RoomConfig.Reward:type_name -> webapi.ItemInfo 82, // [82:82] is the sub-list for method output_type
83, // [83:83] is the sub-list for method output_type 82, // [82:82] is the sub-list for method input_type
83, // [83:83] is the sub-list for method input_type 82, // [82:82] is the sub-list for extension type_name
83, // [83:83] is the sub-list for extension type_name 82, // [82:82] is the sub-list for extension extendee
83, // [83:83] is the sub-list for extension extendee 0, // [0:82] is the sub-list for field type_name
0, // [0:83] is the sub-list for field type_name
} }
func init() { file_common_proto_init() } func init() { file_common_proto_init() }
@ -11309,30 +11164,6 @@ func file_common_proto_init() {
} }
} }
file_common_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { file_common_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MachineConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MachineInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MatchAudience); i { switch v := v.(*MatchAudience); i {
case 0: case 0:
return &v.state return &v.state
@ -11344,7 +11175,7 @@ func file_common_proto_init() {
return nil return nil
} }
} }
file_common_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { file_common_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SpiritConfig); i { switch v := v.(*SpiritConfig); i {
case 0: case 0:
return &v.state return &v.state
@ -11356,7 +11187,7 @@ func file_common_proto_init() {
return nil return nil
} }
} }
file_common_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { file_common_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RoomType); i { switch v := v.(*RoomType); i {
case 0: case 0:
return &v.state return &v.state
@ -11368,7 +11199,7 @@ func file_common_proto_init() {
return nil return nil
} }
} }
file_common_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { file_common_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RoomConfig); i { switch v := v.(*RoomConfig); i {
case 0: case 0:
return &v.state return &v.state
@ -11387,7 +11218,7 @@ func file_common_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_proto_rawDesc, RawDescriptor: file_common_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 102, NumMessages: 100,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -899,18 +899,6 @@ message GuideConfig {
int32 Skip = 3; // 1 2 int32 Skip = 3; // 1 2
} }
//
// etcd /game/machine_config
message MachineConfig{
string Platform = 1; //
repeated MachineInfo Info = 2;
}
message MachineInfo{
int32 MachineId = 1; //Id
int64 AppId = 2;
string ServerSecret = 3;
string StreamId = 4;
}
// etcd /game/match_audience // etcd /game/match_audience
message MatchAudience { message MatchAudience {
string Platform = 1; // string Platform = 1; //