From ab6427c18c4190322d268014ea010022ec0f16fb Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 7 Jan 2025 16:00:01 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=8E=A8=E5=B8=81=E6=9C=BA=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocol/doc.md | 4 + protocol/pushcoin/pushcoin.pb.go | 1156 ++++++++++++++++++++++++++++++ protocol/pushcoin/pushcoin.proto | 103 +++ 3 files changed, 1263 insertions(+) create mode 100644 protocol/pushcoin/pushcoin.pb.go create mode 100644 protocol/pushcoin/pushcoin.proto diff --git a/protocol/doc.md b/protocol/doc.md index e8d8f01..7d605b1 100644 --- a/protocol/doc.md +++ b/protocol/doc.md @@ -193,5 +193,9 @@ - 5660~5669 +### pushcoin.proto + +- 5670~5679 + ### game.proto(玩家离开) - 8000~8099 \ No newline at end of file diff --git a/protocol/pushcoin/pushcoin.pb.go b/protocol/pushcoin/pushcoin.pb.go new file mode 100644 index 0000000..c6219d5 --- /dev/null +++ b/protocol/pushcoin/pushcoin.pb.go @@ -0,0 +1,1156 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1-devel +// protoc v3.19.4 +// source: protocol/pushcoin/pushcoin.proto + +package pushcoin + +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) +) + +// 5670~5679 +type PushCoinPacketID int32 + +const ( + PushCoinPacketID_PACKET_PushCoin_ZERO PushCoinPacketID = 0 // 弃用消息号 + PushCoinPacketID_PACKET_SCPushCoinRoomInfo PushCoinPacketID = 5670 // 房间信息 + PushCoinPacketID_PACKET_SCPushCoinRoomState PushCoinPacketID = 5671 // 房间状态 + PushCoinPacketID_PACKET_CSPushCoinPlayerOp PushCoinPacketID = 5672 // 玩家操作 + PushCoinPacketID_PACKET_SCPushCoinPlayerOp PushCoinPacketID = 5673 // 玩家操作返回 +) + +// Enum value maps for PushCoinPacketID. +var ( + PushCoinPacketID_name = map[int32]string{ + 0: "PACKET_PushCoin_ZERO", + 5670: "PACKET_SCPushCoinRoomInfo", + 5671: "PACKET_SCPushCoinRoomState", + 5672: "PACKET_CSPushCoinPlayerOp", + 5673: "PACKET_SCPushCoinPlayerOp", + } + PushCoinPacketID_value = map[string]int32{ + "PACKET_PushCoin_ZERO": 0, + "PACKET_SCPushCoinRoomInfo": 5670, + "PACKET_SCPushCoinRoomState": 5671, + "PACKET_CSPushCoinPlayerOp": 5672, + "PACKET_SCPushCoinPlayerOp": 5673, + } +) + +func (x PushCoinPacketID) Enum() *PushCoinPacketID { + p := new(PushCoinPacketID) + *p = x + return p +} + +func (x PushCoinPacketID) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PushCoinPacketID) Descriptor() protoreflect.EnumDescriptor { + return file_protocol_pushcoin_pushcoin_proto_enumTypes[0].Descriptor() +} + +func (PushCoinPacketID) Type() protoreflect.EnumType { + return &file_protocol_pushcoin_pushcoin_proto_enumTypes[0] +} + +func (x PushCoinPacketID) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PushCoinPacketID.Descriptor instead. +func (PushCoinPacketID) EnumDescriptor() ([]byte, []int) { + return file_protocol_pushcoin_pushcoin_proto_rawDescGZIP(), []int{0} +} + +type OpCodes int32 + +const ( + OpCodes_OP_Zero OpCodes = 0 + OpCodes_OP_Bet OpCodes = 1 // 下注 [下注金额] + OpCodes_OP_Gain OpCodes = 2 // 得分 [得分金额] + OpCodes_OP_Shake OpCodes = 3 // 震动 [消耗次数] + OpCodes_OP_Refresh OpCodes = 4 // 刷新 [桌面金额] + OpCodes_OP_Exchange OpCodes = 5 // 兑换 [兑换id] + OpCodes_OP_Draw OpCodes = 6 // 抽奖 [抽奖id] +) + +// Enum value maps for OpCodes. +var ( + OpCodes_name = map[int32]string{ + 0: "OP_Zero", + 1: "OP_Bet", + 2: "OP_Gain", + 3: "OP_Shake", + 4: "OP_Refresh", + 5: "OP_Exchange", + 6: "OP_Draw", + } + OpCodes_value = map[string]int32{ + "OP_Zero": 0, + "OP_Bet": 1, + "OP_Gain": 2, + "OP_Shake": 3, + "OP_Refresh": 4, + "OP_Exchange": 5, + "OP_Draw": 6, + } +) + +func (x OpCodes) Enum() *OpCodes { + p := new(OpCodes) + *p = x + return p +} + +func (x OpCodes) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OpCodes) Descriptor() protoreflect.EnumDescriptor { + return file_protocol_pushcoin_pushcoin_proto_enumTypes[1].Descriptor() +} + +func (OpCodes) Type() protoreflect.EnumType { + return &file_protocol_pushcoin_pushcoin_proto_enumTypes[1] +} + +func (x OpCodes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OpCodes.Descriptor instead. +func (OpCodes) EnumDescriptor() ([]byte, []int) { + return file_protocol_pushcoin_pushcoin_proto_rawDescGZIP(), []int{1} +} + +type OpResultCode int32 + +const ( + OpResultCode_OPRC_Success OpResultCode = 0 //成功 + OpResultCode_OPRC_Error OpResultCode = 1 //失败 +) + +// Enum value maps for OpResultCode. +var ( + OpResultCode_name = map[int32]string{ + 0: "OPRC_Success", + 1: "OPRC_Error", + } + OpResultCode_value = map[string]int32{ + "OPRC_Success": 0, + "OPRC_Error": 1, + } +) + +func (x OpResultCode) Enum() *OpResultCode { + p := new(OpResultCode) + *p = x + return p +} + +func (x OpResultCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OpResultCode) Descriptor() protoreflect.EnumDescriptor { + return file_protocol_pushcoin_pushcoin_proto_enumTypes[2].Descriptor() +} + +func (OpResultCode) Type() protoreflect.EnumType { + return &file_protocol_pushcoin_pushcoin_proto_enumTypes[2] +} + +func (x OpResultCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OpResultCode.Descriptor instead. +func (OpResultCode) EnumDescriptor() ([]byte, []int) { + return file_protocol_pushcoin_pushcoin_proto_rawDescGZIP(), []int{2} +} + +//房间信息 +//PACKET_SCPushCoinRoomInfo +type SCPushCoinRoomInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RoomId int32 `protobuf:"varint,1,opt,name=RoomId,proto3" json:"RoomId,omitempty"` //房间id + GameId int32 `protobuf:"varint,2,opt,name=GameId,proto3" json:"GameId,omitempty"` //游戏id + RoomMode int32 `protobuf:"varint,3,opt,name=RoomMode,proto3" json:"RoomMode,omitempty"` //游戏模式 + Params []int32 `protobuf:"varint,4,rep,packed,name=Params,proto3" json:"Params,omitempty"` //规则参数 + State int32 `protobuf:"varint,5,opt,name=State,proto3" json:"State,omitempty"` //房间当前状态 + TimeOut int32 `protobuf:"varint,6,opt,name=TimeOut,proto3" json:"TimeOut,omitempty"` //等待剩余时间 单位:秒 + Players []*PushCoinPlayerData `protobuf:"bytes,7,rep,name=Players,proto3" json:"Players,omitempty"` //房间内的玩家信息 + ExchangeList []*ExchangeInfo `protobuf:"bytes,8,rep,name=ExchangeList,proto3" json:"ExchangeList,omitempty"` //兑换信息 + DrawList []*DrawInfo `protobuf:"bytes,9,rep,name=DrawList,proto3" json:"DrawList,omitempty"` //抽奖信息 +} + +func (x *SCPushCoinRoomInfo) Reset() { + *x = SCPushCoinRoomInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_pushcoin_pushcoin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCPushCoinRoomInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCPushCoinRoomInfo) ProtoMessage() {} + +func (x *SCPushCoinRoomInfo) ProtoReflect() protoreflect.Message { + mi := &file_protocol_pushcoin_pushcoin_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 SCPushCoinRoomInfo.ProtoReflect.Descriptor instead. +func (*SCPushCoinRoomInfo) Descriptor() ([]byte, []int) { + return file_protocol_pushcoin_pushcoin_proto_rawDescGZIP(), []int{0} +} + +func (x *SCPushCoinRoomInfo) GetRoomId() int32 { + if x != nil { + return x.RoomId + } + return 0 +} + +func (x *SCPushCoinRoomInfo) GetGameId() int32 { + if x != nil { + return x.GameId + } + return 0 +} + +func (x *SCPushCoinRoomInfo) GetRoomMode() int32 { + if x != nil { + return x.RoomMode + } + return 0 +} + +func (x *SCPushCoinRoomInfo) GetParams() []int32 { + if x != nil { + return x.Params + } + return nil +} + +func (x *SCPushCoinRoomInfo) GetState() int32 { + if x != nil { + return x.State + } + return 0 +} + +func (x *SCPushCoinRoomInfo) GetTimeOut() int32 { + if x != nil { + return x.TimeOut + } + return 0 +} + +func (x *SCPushCoinRoomInfo) GetPlayers() []*PushCoinPlayerData { + if x != nil { + return x.Players + } + return nil +} + +func (x *SCPushCoinRoomInfo) GetExchangeList() []*ExchangeInfo { + if x != nil { + return x.ExchangeList + } + return nil +} + +func (x *SCPushCoinRoomInfo) GetDrawList() []*DrawInfo { + if x != nil { + return x.DrawList + } + return nil +} + +type ItemInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ItemId int32 `protobuf:"varint,1,opt,name=ItemId,proto3" json:"ItemId,omitempty"` //道具id + ItemNum int32 `protobuf:"varint,2,opt,name=ItemNum,proto3" json:"ItemNum,omitempty"` //道具数量 +} + +func (x *ItemInfo) Reset() { + *x = ItemInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_pushcoin_pushcoin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ItemInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ItemInfo) ProtoMessage() {} + +func (x *ItemInfo) ProtoReflect() protoreflect.Message { + mi := &file_protocol_pushcoin_pushcoin_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 ItemInfo.ProtoReflect.Descriptor instead. +func (*ItemInfo) Descriptor() ([]byte, []int) { + return file_protocol_pushcoin_pushcoin_proto_rawDescGZIP(), []int{1} +} + +func (x *ItemInfo) GetItemId() int32 { + if x != nil { + return x.ItemId + } + return 0 +} + +func (x *ItemInfo) GetItemNum() int32 { + if x != nil { + return x.ItemNum + } + return 0 +} + +type ExchangeInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` //兑换id + Cost []*ItemInfo `protobuf:"bytes,2,rep,name=Cost,proto3" json:"Cost,omitempty"` //消耗道具 + Gain []*ItemInfo `protobuf:"bytes,3,rep,name=Gain,proto3" json:"Gain,omitempty"` //获得道具 + ShakeTimes int32 `protobuf:"varint,4,opt,name=ShakeTimes,proto3" json:"ShakeTimes,omitempty"` //获得震动次数 +} + +func (x *ExchangeInfo) Reset() { + *x = ExchangeInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_pushcoin_pushcoin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExchangeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExchangeInfo) ProtoMessage() {} + +func (x *ExchangeInfo) ProtoReflect() protoreflect.Message { + mi := &file_protocol_pushcoin_pushcoin_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 ExchangeInfo.ProtoReflect.Descriptor instead. +func (*ExchangeInfo) Descriptor() ([]byte, []int) { + return file_protocol_pushcoin_pushcoin_proto_rawDescGZIP(), []int{2} +} + +func (x *ExchangeInfo) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *ExchangeInfo) GetCost() []*ItemInfo { + if x != nil { + return x.Cost + } + return nil +} + +func (x *ExchangeInfo) GetGain() []*ItemInfo { + if x != nil { + return x.Gain + } + return nil +} + +func (x *ExchangeInfo) GetShakeTimes() int32 { + if x != nil { + return x.ShakeTimes + } + return 0 +} + +type DrawInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` //抽奖id + ItemId int32 `protobuf:"varint,2,opt,name=ItemId,proto3" json:"ItemId,omitempty"` //道具id + ItemNum int32 `protobuf:"varint,3,opt,name=ItemNum,proto3" json:"ItemNum,omitempty"` //道具数量 + Coin int64 `protobuf:"varint,4,opt,name=Coin,proto3" json:"Coin,omitempty"` //价值 +} + +func (x *DrawInfo) Reset() { + *x = DrawInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_pushcoin_pushcoin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DrawInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DrawInfo) ProtoMessage() {} + +func (x *DrawInfo) ProtoReflect() protoreflect.Message { + mi := &file_protocol_pushcoin_pushcoin_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 DrawInfo.ProtoReflect.Descriptor instead. +func (*DrawInfo) Descriptor() ([]byte, []int) { + return file_protocol_pushcoin_pushcoin_proto_rawDescGZIP(), []int{3} +} + +func (x *DrawInfo) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *DrawInfo) GetItemId() int32 { + if x != nil { + return x.ItemId + } + return 0 +} + +func (x *DrawInfo) GetItemNum() int32 { + if x != nil { + return x.ItemNum + } + return 0 +} + +func (x *DrawInfo) GetCoin() int64 { + if x != nil { + return x.Coin + } + return 0 +} + +type PushCoinPlayerData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` //名字 + SnId int32 `protobuf:"varint,2,opt,name=SnId,proto3" json:"SnId,omitempty"` //账号 + Head int32 `protobuf:"varint,3,opt,name=Head,proto3" json:"Head,omitempty"` //头像 + Sex int32 `protobuf:"varint,4,opt,name=Sex,proto3" json:"Sex,omitempty"` //性别 + Coin int64 `protobuf:"varint,5,opt,name=Coin,proto3" json:"Coin,omitempty"` //金币 + Flag int32 `protobuf:"varint,6,opt,name=Flag,proto3" json:"Flag,omitempty"` //二进制标记 第一位:是否掉线(0:在线 1:掉线) 第二位:是否准备(0:未准备 1:已准备) + Params []string `protobuf:"bytes,7,rep,name=Params,proto3" json:"Params,omitempty"` //其他数据 如:ip 等 + VIP int32 `protobuf:"varint,8,opt,name=VIP,proto3" json:"VIP,omitempty"` + RoleId int32 `protobuf:"varint,9,opt,name=RoleId,proto3" json:"RoleId,omitempty"` //使用中的角色id + Level int64 `protobuf:"varint,10,opt,name=Level,proto3" json:"Level,omitempty"` //玩家等级 + Exp int64 `protobuf:"varint,11,opt,name=Exp,proto3" json:"Exp,omitempty"` //玩家经验 + SkinId int32 `protobuf:"varint,12,opt,name=SkinId,proto3" json:"SkinId,omitempty"` //皮肤id + ShakeTimes int32 `protobuf:"varint,13,opt,name=ShakeTimes,proto3" json:"ShakeTimes,omitempty"` //可震动次数 + BaseCoin int64 `protobuf:"varint,14,opt,name=BaseCoin,proto3" json:"BaseCoin,omitempty"` //当前底分(单次投币金额) + PowerLine int64 `protobuf:"varint,15,opt,name=PowerLine,proto3" json:"PowerLine,omitempty"` // 当前能量值 + PowerLineMax int64 `protobuf:"varint,16,opt,name=PowerLineMax,proto3" json:"PowerLineMax,omitempty"` // 能量值上限 + RefreshTimes int64 `protobuf:"varint,17,opt,name=RefreshTimes,proto3" json:"RefreshTimes,omitempty"` // 刷新次数 +} + +func (x *PushCoinPlayerData) Reset() { + *x = PushCoinPlayerData{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_pushcoin_pushcoin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushCoinPlayerData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushCoinPlayerData) ProtoMessage() {} + +func (x *PushCoinPlayerData) ProtoReflect() protoreflect.Message { + mi := &file_protocol_pushcoin_pushcoin_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 PushCoinPlayerData.ProtoReflect.Descriptor instead. +func (*PushCoinPlayerData) Descriptor() ([]byte, []int) { + return file_protocol_pushcoin_pushcoin_proto_rawDescGZIP(), []int{4} +} + +func (x *PushCoinPlayerData) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PushCoinPlayerData) GetSnId() int32 { + if x != nil { + return x.SnId + } + return 0 +} + +func (x *PushCoinPlayerData) GetHead() int32 { + if x != nil { + return x.Head + } + return 0 +} + +func (x *PushCoinPlayerData) GetSex() int32 { + if x != nil { + return x.Sex + } + return 0 +} + +func (x *PushCoinPlayerData) GetCoin() int64 { + if x != nil { + return x.Coin + } + return 0 +} + +func (x *PushCoinPlayerData) GetFlag() int32 { + if x != nil { + return x.Flag + } + return 0 +} + +func (x *PushCoinPlayerData) GetParams() []string { + if x != nil { + return x.Params + } + return nil +} + +func (x *PushCoinPlayerData) GetVIP() int32 { + if x != nil { + return x.VIP + } + return 0 +} + +func (x *PushCoinPlayerData) GetRoleId() int32 { + if x != nil { + return x.RoleId + } + return 0 +} + +func (x *PushCoinPlayerData) GetLevel() int64 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *PushCoinPlayerData) GetExp() int64 { + if x != nil { + return x.Exp + } + return 0 +} + +func (x *PushCoinPlayerData) GetSkinId() int32 { + if x != nil { + return x.SkinId + } + return 0 +} + +func (x *PushCoinPlayerData) GetShakeTimes() int32 { + if x != nil { + return x.ShakeTimes + } + return 0 +} + +func (x *PushCoinPlayerData) GetBaseCoin() int64 { + if x != nil { + return x.BaseCoin + } + return 0 +} + +func (x *PushCoinPlayerData) GetPowerLine() int64 { + if x != nil { + return x.PowerLine + } + return 0 +} + +func (x *PushCoinPlayerData) GetPowerLineMax() int64 { + if x != nil { + return x.PowerLineMax + } + return 0 +} + +func (x *PushCoinPlayerData) GetRefreshTimes() int64 { + if x != nil { + return x.RefreshTimes + } + return 0 +} + +//房间状态 +//PACKET_SCPushCoinRoomState +type SCPushCoinRoomState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State int32 `protobuf:"varint,1,opt,name=State,proto3" json:"State,omitempty"` //房间当前状态 + SubState int32 `protobuf:"varint,2,opt,name=SubState,proto3" json:"SubState,omitempty"` //房间当前子状态 + Params []int32 `protobuf:"varint,3,rep,packed,name=Params,proto3" json:"Params,omitempty"` //状态参数 +} + +func (x *SCPushCoinRoomState) Reset() { + *x = SCPushCoinRoomState{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_pushcoin_pushcoin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCPushCoinRoomState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCPushCoinRoomState) ProtoMessage() {} + +func (x *SCPushCoinRoomState) ProtoReflect() protoreflect.Message { + mi := &file_protocol_pushcoin_pushcoin_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SCPushCoinRoomState.ProtoReflect.Descriptor instead. +func (*SCPushCoinRoomState) Descriptor() ([]byte, []int) { + return file_protocol_pushcoin_pushcoin_proto_rawDescGZIP(), []int{5} +} + +func (x *SCPushCoinRoomState) GetState() int32 { + if x != nil { + return x.State + } + return 0 +} + +func (x *SCPushCoinRoomState) GetSubState() int32 { + if x != nil { + return x.SubState + } + return 0 +} + +func (x *SCPushCoinRoomState) GetParams() []int32 { + if x != nil { + return x.Params + } + return nil +} + +//玩家操作 +//PACKET_CSPushCoinPlayerOp +type CSPushCoinPlayerOp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OpCode OpCodes `protobuf:"varint,1,opt,name=OpCode,proto3,enum=pushcoin.OpCodes" json:"OpCode,omitempty"` + OpParam []int64 `protobuf:"varint,2,rep,packed,name=OpParam,proto3" json:"OpParam,omitempty"` +} + +func (x *CSPushCoinPlayerOp) Reset() { + *x = CSPushCoinPlayerOp{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_pushcoin_pushcoin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CSPushCoinPlayerOp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CSPushCoinPlayerOp) ProtoMessage() {} + +func (x *CSPushCoinPlayerOp) ProtoReflect() protoreflect.Message { + mi := &file_protocol_pushcoin_pushcoin_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 CSPushCoinPlayerOp.ProtoReflect.Descriptor instead. +func (*CSPushCoinPlayerOp) Descriptor() ([]byte, []int) { + return file_protocol_pushcoin_pushcoin_proto_rawDescGZIP(), []int{6} +} + +func (x *CSPushCoinPlayerOp) GetOpCode() OpCodes { + if x != nil { + return x.OpCode + } + return OpCodes_OP_Zero +} + +func (x *CSPushCoinPlayerOp) GetOpParam() []int64 { + if x != nil { + return x.OpParam + } + return nil +} + +//PACKET_SCPushCoinPlayerOp +type SCPushCoinPlayerOp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OpRetCode OpResultCode `protobuf:"varint,1,opt,name=OpRetCode,proto3,enum=pushcoin.OpResultCode" json:"OpRetCode,omitempty"` + OpCode OpCodes `protobuf:"varint,2,opt,name=OpCode,proto3,enum=pushcoin.OpCodes" json:"OpCode,omitempty"` + Exchange *ExchangeInfo `protobuf:"bytes,3,opt,name=Exchange,proto3" json:"Exchange,omitempty"` // 兑换信息,加到背包 + Draw *DrawInfo `protobuf:"bytes,4,opt,name=Draw,proto3" json:"Draw,omitempty"` // 抽奖信息,掉落到桌面 +} + +func (x *SCPushCoinPlayerOp) Reset() { + *x = SCPushCoinPlayerOp{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_pushcoin_pushcoin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCPushCoinPlayerOp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCPushCoinPlayerOp) ProtoMessage() {} + +func (x *SCPushCoinPlayerOp) ProtoReflect() protoreflect.Message { + mi := &file_protocol_pushcoin_pushcoin_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 SCPushCoinPlayerOp.ProtoReflect.Descriptor instead. +func (*SCPushCoinPlayerOp) Descriptor() ([]byte, []int) { + return file_protocol_pushcoin_pushcoin_proto_rawDescGZIP(), []int{7} +} + +func (x *SCPushCoinPlayerOp) GetOpRetCode() OpResultCode { + if x != nil { + return x.OpRetCode + } + return OpResultCode_OPRC_Success +} + +func (x *SCPushCoinPlayerOp) GetOpCode() OpCodes { + if x != nil { + return x.OpCode + } + return OpCodes_OP_Zero +} + +func (x *SCPushCoinPlayerOp) GetExchange() *ExchangeInfo { + if x != nil { + return x.Exchange + } + return nil +} + +func (x *SCPushCoinPlayerOp) GetDraw() *DrawInfo { + if x != nil { + return x.Draw + } + return nil +} + +var File_protocol_pushcoin_pushcoin_proto protoreflect.FileDescriptor + +var file_protocol_pushcoin_pushcoin_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, + 0x6f, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x08, 0x70, 0x75, 0x73, 0x68, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0xcc, 0x02, 0x0a, + 0x12, 0x53, 0x43, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x47, + 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x61, 0x6d, + 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, + 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x63, + 0x6f, 0x69, 0x6e, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, + 0x3a, 0x0a, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x63, 0x6f, 0x69, 0x6e, + 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x45, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x08, 0x44, + 0x72, 0x61, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x70, 0x75, 0x73, 0x68, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x08, 0x44, 0x72, 0x61, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3c, 0x0a, 0x08, 0x49, + 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x0c, 0x45, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x04, 0x43, 0x6f, + 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x63, + 0x6f, 0x69, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x43, 0x6f, + 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x47, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x47, 0x61, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x68, + 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, + 0x53, 0x68, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x08, 0x44, 0x72, + 0x61, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0xae, 0x03, 0x0a, + 0x12, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x48, + 0x65, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x48, 0x65, 0x61, 0x64, 0x12, + 0x10, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x53, 0x65, + 0x78, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x10, 0x0a, 0x03, 0x56, 0x49, 0x50, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x56, 0x49, 0x50, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x45, 0x78, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, + 0x45, 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x6b, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x53, + 0x68, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x53, 0x68, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x42, + 0x61, 0x73, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x42, + 0x61, 0x73, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x6f, 0x77, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x50, 0x6f, 0x77, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x65, 0x4d, 0x61, 0x78, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x50, 0x6f, 0x77, + 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x78, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x22, 0x5f, 0x0a, + 0x13, 0x53, 0x43, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x75, + 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x53, 0x75, + 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x59, + 0x0a, 0x12, 0x43, 0x53, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x4f, 0x70, 0x12, 0x29, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x63, 0x6f, 0x69, 0x6e, 0x2e, + 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x4f, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, + 0x52, 0x07, 0x4f, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x22, 0xd1, 0x01, 0x0a, 0x12, 0x53, 0x43, + 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, + 0x12, 0x34, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x4f, + 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, + 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x63, 0x6f, 0x69, + 0x6e, 0x2e, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x32, 0x0a, 0x08, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x45, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x45, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x44, 0x72, 0x61, 0x77, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x44, + 0x72, 0x61, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x44, 0x72, 0x61, 0x77, 0x2a, 0xad, 0x01, + 0x0a, 0x10, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x49, 0x44, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x50, 0x75, 0x73, + 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x19, + 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, + 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xa6, 0x2c, 0x12, 0x1f, 0x0a, 0x1a, + 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, + 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0xa7, 0x2c, 0x12, 0x1e, 0x0a, + 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, + 0x69, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x10, 0xa8, 0x2c, 0x12, 0x1e, 0x0a, + 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, + 0x69, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x10, 0xa9, 0x2c, 0x2a, 0x6b, 0x0a, + 0x07, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x5f, 0x5a, + 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x50, 0x5f, 0x42, 0x65, 0x74, 0x10, + 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x5f, 0x47, 0x61, 0x69, 0x6e, 0x10, 0x02, 0x12, 0x0c, + 0x0a, 0x08, 0x4f, 0x50, 0x5f, 0x53, 0x68, 0x61, 0x6b, 0x65, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, + 0x4f, 0x50, 0x5f, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, + 0x4f, 0x50, 0x5f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0x05, 0x12, 0x0b, 0x0a, + 0x07, 0x4f, 0x50, 0x5f, 0x44, 0x72, 0x61, 0x77, 0x10, 0x06, 0x2a, 0x30, 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, 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, 0x70, 0x75, + 0x73, 0x68, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_protocol_pushcoin_pushcoin_proto_rawDescOnce sync.Once + file_protocol_pushcoin_pushcoin_proto_rawDescData = file_protocol_pushcoin_pushcoin_proto_rawDesc +) + +func file_protocol_pushcoin_pushcoin_proto_rawDescGZIP() []byte { + file_protocol_pushcoin_pushcoin_proto_rawDescOnce.Do(func() { + file_protocol_pushcoin_pushcoin_proto_rawDescData = protoimpl.X.CompressGZIP(file_protocol_pushcoin_pushcoin_proto_rawDescData) + }) + return file_protocol_pushcoin_pushcoin_proto_rawDescData +} + +var file_protocol_pushcoin_pushcoin_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_protocol_pushcoin_pushcoin_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_protocol_pushcoin_pushcoin_proto_goTypes = []interface{}{ + (PushCoinPacketID)(0), // 0: pushcoin.PushCoinPacketID + (OpCodes)(0), // 1: pushcoin.OpCodes + (OpResultCode)(0), // 2: pushcoin.OpResultCode + (*SCPushCoinRoomInfo)(nil), // 3: pushcoin.SCPushCoinRoomInfo + (*ItemInfo)(nil), // 4: pushcoin.ItemInfo + (*ExchangeInfo)(nil), // 5: pushcoin.ExchangeInfo + (*DrawInfo)(nil), // 6: pushcoin.DrawInfo + (*PushCoinPlayerData)(nil), // 7: pushcoin.PushCoinPlayerData + (*SCPushCoinRoomState)(nil), // 8: pushcoin.SCPushCoinRoomState + (*CSPushCoinPlayerOp)(nil), // 9: pushcoin.CSPushCoinPlayerOp + (*SCPushCoinPlayerOp)(nil), // 10: pushcoin.SCPushCoinPlayerOp +} +var file_protocol_pushcoin_pushcoin_proto_depIdxs = []int32{ + 7, // 0: pushcoin.SCPushCoinRoomInfo.Players:type_name -> pushcoin.PushCoinPlayerData + 5, // 1: pushcoin.SCPushCoinRoomInfo.ExchangeList:type_name -> pushcoin.ExchangeInfo + 6, // 2: pushcoin.SCPushCoinRoomInfo.DrawList:type_name -> pushcoin.DrawInfo + 4, // 3: pushcoin.ExchangeInfo.Cost:type_name -> pushcoin.ItemInfo + 4, // 4: pushcoin.ExchangeInfo.Gain:type_name -> pushcoin.ItemInfo + 1, // 5: pushcoin.CSPushCoinPlayerOp.OpCode:type_name -> pushcoin.OpCodes + 2, // 6: pushcoin.SCPushCoinPlayerOp.OpRetCode:type_name -> pushcoin.OpResultCode + 1, // 7: pushcoin.SCPushCoinPlayerOp.OpCode:type_name -> pushcoin.OpCodes + 5, // 8: pushcoin.SCPushCoinPlayerOp.Exchange:type_name -> pushcoin.ExchangeInfo + 6, // 9: pushcoin.SCPushCoinPlayerOp.Draw:type_name -> pushcoin.DrawInfo + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_protocol_pushcoin_pushcoin_proto_init() } +func file_protocol_pushcoin_pushcoin_proto_init() { + if File_protocol_pushcoin_pushcoin_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_protocol_pushcoin_pushcoin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCPushCoinRoomInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_pushcoin_pushcoin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ItemInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_pushcoin_pushcoin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExchangeInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_pushcoin_pushcoin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DrawInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_pushcoin_pushcoin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushCoinPlayerData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_pushcoin_pushcoin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCPushCoinRoomState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_pushcoin_pushcoin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CSPushCoinPlayerOp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_pushcoin_pushcoin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SCPushCoinPlayerOp); 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_protocol_pushcoin_pushcoin_proto_rawDesc, + NumEnums: 3, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_protocol_pushcoin_pushcoin_proto_goTypes, + DependencyIndexes: file_protocol_pushcoin_pushcoin_proto_depIdxs, + EnumInfos: file_protocol_pushcoin_pushcoin_proto_enumTypes, + MessageInfos: file_protocol_pushcoin_pushcoin_proto_msgTypes, + }.Build() + File_protocol_pushcoin_pushcoin_proto = out.File + file_protocol_pushcoin_pushcoin_proto_rawDesc = nil + file_protocol_pushcoin_pushcoin_proto_goTypes = nil + file_protocol_pushcoin_pushcoin_proto_depIdxs = nil +} diff --git a/protocol/pushcoin/pushcoin.proto b/protocol/pushcoin/pushcoin.proto new file mode 100644 index 0000000..0bb87bf --- /dev/null +++ b/protocol/pushcoin/pushcoin.proto @@ -0,0 +1,103 @@ +syntax = "proto3"; +package pushcoin; +option go_package = "mongo.games.com/game/protocol/pushcoin"; + +// 5670~5679 +enum PushCoinPacketID { + PACKET_PushCoin_ZERO = 0;// 弃用消息号 + PACKET_SCPushCoinRoomInfo = 5670; // 房间信息 + PACKET_SCPushCoinRoomState = 5671; // 房间状态 + PACKET_CSPushCoinPlayerOp = 5672; // 玩家操作 + PACKET_SCPushCoinPlayerOp = 5673; // 玩家操作返回 +} + +//房间信息 +//PACKET_SCPushCoinRoomInfo +message SCPushCoinRoomInfo { + int32 RoomId = 1; //房间id + int32 GameId = 2; //游戏id + int32 RoomMode = 3; //游戏模式 + repeated int32 Params = 4; //规则参数 + int32 State = 5; //房间当前状态 + int32 TimeOut = 6; //等待剩余时间 单位:秒 + repeated PushCoinPlayerData Players = 7; //房间内的玩家信息 + repeated ExchangeInfo ExchangeList = 8; //兑换信息 + repeated DrawInfo DrawList = 9; //抽奖信息 +} + +message ItemInfo{ + int32 ItemId = 1; //道具id + int32 ItemNum = 2; //道具数量 +} + +message ExchangeInfo{ + int32 Id = 1; //兑换id + repeated ItemInfo Cost = 2; //消耗道具 + repeated ItemInfo Gain = 3; //获得道具 + int32 ShakeTimes = 4; //获得震动次数 +} + +message DrawInfo{ + int32 Id = 1; //抽奖id + int32 ItemId = 2; //道具id + int32 ItemNum = 3; //道具数量 + int64 Coin = 4; //价值 +} + +message PushCoinPlayerData { + string Name = 1; //名字 + int32 SnId = 2; //账号 + int32 Head = 3; //头像 + int32 Sex = 4; //性别 + int64 Coin = 5; //金币 + int32 Flag = 6; //二进制标记 第一位:是否掉线(0:在线 1:掉线) 第二位:是否准备(0:未准备 1:已准备) + repeated string Params = 7; //其他数据 如:ip 等 + int32 VIP = 8; + int32 RoleId = 9; //使用中的角色id + int64 Level = 10; //玩家等级 + int64 Exp = 11; //玩家经验 + int32 SkinId = 12; //皮肤id + int32 ShakeTimes = 13; //可震动次数 + int64 BaseCoin = 14; //当前底分(单次投币金额) + int64 PowerLine = 15; // 当前能量值 + int64 PowerLineMax = 16; // 能量值上限 + int64 RefreshTimes = 17; // 刷新次数 +} + +//房间状态 +//PACKET_SCPushCoinRoomState +message SCPushCoinRoomState { + int32 State = 1; //房间当前状态 + int32 SubState = 2; //房间当前子状态 + repeated int32 Params = 3; //状态参数 +} + +//玩家操作 +//PACKET_CSPushCoinPlayerOp +message CSPushCoinPlayerOp { + OpCodes OpCode = 1; + repeated int64 OpParam = 2; +} + +enum OpCodes { + OP_Zero = 0; + OP_Bet = 1; // 下注 [下注金额] + OP_Gain = 2; // 得分 [得分金额] + OP_Shake = 3; // 震动 [消耗次数] + OP_Refresh = 4; // 刷新 [桌面金额] + OP_Exchange = 5; // 兑换 [兑换id] + OP_Draw = 6; // 抽奖 [抽奖id] +} + +enum OpResultCode { + OPRC_Success = 0; //成功 + OPRC_Error = 1; //失败 +} + +//PACKET_SCPushCoinPlayerOp +message SCPushCoinPlayerOp { + OpResultCode OpRetCode = 1; + OpCodes OpCode = 2; + ExchangeInfo Exchange = 3; // 兑换信息,加到背包 + DrawInfo Draw = 4; // 抽奖信息,掉落到桌面 +} \ No newline at end of file