Compare commits

...

2 Commits

Author SHA1 Message Date
sk 196d211fff 十三张阶段时间可配置 2024-11-22 16:08:34 +08:00
sk 3840ec99a2 十三张开牌前允许加入游戏 2024-11-22 14:24:59 +08:00
7 changed files with 203 additions and 99 deletions

View File

@ -33,6 +33,7 @@ const (
ThirteenWaterPlayerOpStandup = 2 //站起标记
ThirteenWaterPlayerOpTest = 3 // test
ThirteenWaterPlayerOpReset = 4 // 重新选牌
ThirteenWaterPlayerJoin = 5 // 加入游戏
)
const (
ThirteenWaterSceneWaitTimeout = time.Second * 2 //等待倒计时
@ -44,6 +45,30 @@ const (
ThirteenWaterBilledTimeout = time.Second * 5 //结算
)
const (
TimeoutStart = iota
TimeoutSendCards
TimeoutOp
TimeoutBill
)
func GetTimeout(param []int64, index int) time.Duration {
if index >= 0 && index < len(param) {
return time.Duration(param[index]) * time.Second
}
switch index {
case TimeoutStart:
return ThirteenWaterStartTimeout
case TimeoutSendCards:
return ThirteenWaterSendCardsTimeout
case TimeoutOp:
return ThirteenWaterOptCardTimeout
case TimeoutBill:
return ThirteenWaterBilledTimeout
}
return time.Duration(-1)
}
func GetMaxCard(allGroup map[int]*Group) *Group {
var ret *Group
max := -1000

View File

@ -26,6 +26,7 @@ func (sm *SlotsMgr) Update() {
func (sm *SlotsMgr) Shutdown() {
plugin.Close()
module.UnregisteModule(sm)
}
func init() {
module.RegisteModule(SlotsMgrSington, time.Hour, 0)

View File

@ -84,6 +84,8 @@ type SceneEx struct {
testPokers []int64 // 测试牌堆
logid string
ctrlType int // 1控赢 2控输 0不控
cardsArr [][13]int
cardsGroup []map[int]*rule.Group
}
func NewThirteenWaterSceneData(s *base.Scene) *SceneEx {
@ -125,6 +127,8 @@ func (this *SceneEx) Clear() {
this.PlayerBackup = make(map[int32]*PlayerData)
this.LeaveNum = 0
this.ctrlType = 0
this.cardsArr = nil
this.cardsGroup = nil
for i := 0; i < this.GetPlayerNum(); i++ {
if this.seats[i] != nil {
@ -181,6 +185,10 @@ func (this *SceneEx) ThirteenWaterCreateRoomInfoPacket(s *base.Scene, p *base.Pl
LeaveDeduct: this.GetDBGameFree().GetLeaveDeduct(),
LeaveCombat: this.GetDBGameFree().GetLeaveCombat(),
Params: common.CopySliceInt64ToInt32(s.Params),
TimeOuts: this.GetDBGameFree().GetOtherIntParams(),
}
if len(pack.TimeOuts) > rule.TimeoutOp {
pack.TimeOuts[rule.TimeoutOp] = int64(this.GetBaiPai().Seconds())
}
// 玩家信息
for _, playerEx := range this.players {
@ -382,11 +390,17 @@ func (this *SceneEx) GetBaseScore() int64 { //游戏底分
}
func (this *SceneEx) GetBaiPai() time.Duration {
s := this.GetParam(rule.ParamBaiPai)
if this.IsSceneMode(common.SceneModePublic) {
second := rule.GetTimeout(this.GetDBGameFree().GetOtherIntParams(), rule.TimeoutOp) // 后台配置摆牌时间
if second > 0 {
return second
}
}
s := this.GetParam(rule.ParamBaiPai) // 自建房,摆牌时间
if s > 0 {
return time.Duration(s) * time.Second
}
return rule.ThirteenWaterOptCardTimeout
return rule.ThirteenWaterOptCardTimeout // 默认摆牌时间
}
func (this *SceneEx) HasLaiZi() bool {
@ -520,10 +534,9 @@ func (this *SceneEx) GetScore(player *PlayerEx) {
}
}
// 发送玩家的所有牌和所有牌型
func (this *SceneEx) SendToPlayerCards(s *base.Scene) {
func (this *SceneEx) SendToPlayerCardsBySnid(snid int32) {
for _, player := range this.players {
if player != nil && player.IsGameing() {
if player != nil && player.IsGameing() && (snid == 0 || player.SnId == snid) {
all, k := AllGroupToProto(player.allGroup)
pack := &thirteen.SCThirteenPlayerCards{
Cards: common.CopySliceIntToInt32(player.cards[:]),
@ -554,7 +567,7 @@ func (this *SceneEx) SendToPlayerCards(s *base.Scene) {
}
proto.SetDefaults(Send)
logger.Logger.Trace("SCThirteenWaterPlayerCards:", Send)
s.Broadcast(int(thirteen.TWMmoPacketID_PACKET_SCThirteenPlayerCards), Send, player.GetSid())
this.Broadcast(int(thirteen.TWMmoPacketID_PACKET_SCThirteenPlayerCards), Send, player.GetSid())
}
}
}
@ -1351,11 +1364,11 @@ func (this *SceneEx) SendHandCardOdds() {
this.poker.Init()
cardsArr := make([][13]int, this.poker.N*4)
cardsGroup := make([]map[int]*rule.Group, this.poker.N*4)
for k := range cardsArr {
cardsArr[k] = this.poker.Get13Crads()
cardsGroup[k] = this.logic.Suggest(cardsArr[k])
this.cardsArr = make([][13]int, this.poker.N*4)
this.cardsGroup = make([]map[int]*rule.Group, this.poker.N*4)
for k := range this.cardsArr {
this.cardsArr[k] = this.poker.Get13Crads()
this.cardsGroup[k] = this.logic.Suggest(this.cardsArr[k])
}
f := func(players *[]*PlayerEx) {
@ -1382,16 +1395,16 @@ func (this *SceneEx) SendHandCardOdds() {
var group map[int]*rule.Group
if p.odds > 0 {
// 拿好牌
cards = cardsArr[0]
cardsArr = cardsArr[1:]
group = cardsGroup[0]
cardsGroup = cardsGroup[1:]
cards = this.cardsArr[0]
this.cardsArr = this.cardsArr[1:]
group = this.cardsGroup[0]
this.cardsGroup = this.cardsGroup[1:]
} else {
// 拿坏牌
cards = cardsArr[len(cardsArr)-1]
cardsArr = cardsArr[:len(cardsArr)-1]
group = cardsGroup[len(cardsGroup)-1]
cardsGroup = cardsGroup[:len(cardsGroup)-1]
cards = this.cardsArr[len(this.cardsArr)-1]
this.cardsArr = this.cardsArr[:len(this.cardsArr)-1]
group = this.cardsGroup[len(this.cardsGroup)-1]
this.cardsGroup = this.cardsGroup[:len(this.cardsGroup)-1]
}
p.cards = cards
p.allGroup = group
@ -1409,7 +1422,7 @@ func (this *SceneEx) SendHandCardOdds() {
}
if isGood || isBad {
// 按从大到小排序
this.cardsSort(cardsArr, cardsGroup)
this.cardsSort(this.cardsArr, this.cardsGroup)
// 发好牌
if isGood {
@ -1431,10 +1444,10 @@ func (this *SceneEx) SendHandCardOdds() {
if v == nil || !v.IsGameing() || v.cards[0] != -1 {
continue
}
v.cards = cardsArr[0]
v.allGroup = cardsGroup[0]
cardsArr = cardsArr[1:]
cardsGroup = cardsGroup[1:]
v.cards = this.cardsArr[0]
v.allGroup = this.cardsGroup[0]
this.cardsArr = this.cardsArr[1:]
this.cardsGroup = this.cardsGroup[1:]
}
for _, player := range this.players {

View File

@ -459,6 +459,10 @@ func (this *BaseState) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, par
if !ok {
return false
}
sceneEx, ok := s.ExtraData.(*SceneEx)
if !ok {
return false
}
switch opcode {
case rule.ThirteenWaterPlayerOpStandup:
@ -482,20 +486,30 @@ func (this *BaseState) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, par
if !common.Config.IsDevMode {
return false
}
sceneEx, ok := s.ExtraData.(*SceneEx)
if !ok {
return false
}
sceneEx.testPokers = make([]int64, len(params))
copy(sceneEx.testPokers, params)
return true
case rule.ThirteenWaterPlayerJoin:
// 发牌和选牌阶段,给玩家发牌
if s.GetSceneState().GetState() == rule.ThirteenWaterSceneStateSendCards ||
(s.GetSceneState().GetState() == rule.ThirteenWaterSceneStateOptCard && int(sceneEx.GetBaiPai().Seconds())-sceneEx.GetSceneState().GetTimeout(s) > 15) {
if len(sceneEx.cardsArr) > 0 && playerEx.cards[0] == -1 {
playerEx.MarkFlag(base.PlayerState_Ready)
playerEx.UnmarkFlag(base.PlayerState_WaitNext)
playerEx.cards = sceneEx.cardsArr[0]
playerEx.allGroup = sceneEx.cardsGroup[0]
sceneEx.cardsArr = sceneEx.cardsArr[1:]
sceneEx.cardsGroup = sceneEx.cardsGroup[1:]
sceneEx.SendToPlayerCardsBySnid(p.SnId)
logger.Logger.Tracef("游戏开始后给玩家发牌, sceneId=%v, player=%v, cards=%v", s.GetSceneId(), p.SnId, playerEx.cards)
}
}
}
return false
}
func (this *BaseState) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
}
func (this *BaseState) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {}
//=====================================
// StateWait 匹配中
@ -605,7 +619,12 @@ func (this *StateStart) OnEnter(s *base.Scene) {
func (this *StateStart) OnTick(s *base.Scene) {
this.BaseState.OnTick(s)
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
if time.Now().Sub(sceneEx.StateStartTime) > rule.ThirteenWaterStartTimeout {
var second = rule.ThirteenWaterStartTimeout
sub := rule.GetTimeout(sceneEx.GetDBGameFree().GetOtherIntParams(), rule.TimeoutStart)
if sub > 0 {
second = sub
}
if time.Now().Sub(sceneEx.StateStartTime) > second {
if sceneEx.Creator != 0 && sceneEx.GetRealPlayerNum() == 0 {
sceneEx.Destroy(true)
return
@ -731,14 +750,19 @@ func (this *StateSendCard) OnEnter(s *base.Scene) {
//}
sceneEx.SendHandCardOdds()
}
sceneEx.SendToPlayerCards(s)
sceneEx.SendToPlayerCardsBySnid(0)
}
}
func (this *StateSendCard) OnTick(s *base.Scene) {
this.BaseState.OnTick(s)
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
if time.Now().Sub(sceneEx.StateStartTime) > rule.ThirteenWaterSendCardsTimeout {
var second = rule.ThirteenWaterSendCardsTimeout
sub := rule.GetTimeout(sceneEx.GetDBGameFree().GetOtherIntParams(), rule.TimeoutSendCards)
if sub > 0 {
second = sub
}
if time.Now().Sub(sceneEx.StateStartTime) > second {
if sceneEx.CheckNeedDestroy() {
s.ChangeSceneState(rule.ThirteenWaterSceneStateWait)
} else {
@ -1085,8 +1109,35 @@ func (this *StateShow) OnEnter(s *base.Scene) {
logger.Logger.Tracef("(this *StateShow) OnEnter, sceneid=%v currpos:%v", s.GetSceneId(), sceneEx.currOpPos)
sceneEx.ShowCards()
// 每人看牌5秒特殊牌型不算;
var n int
var has bool
//var n int
//var has bool
//for _, v := range sceneEx.players {
// if v != nil && v.IsGameing() && v.cardsO != nil {
// n++
// if v.cardsO.PokerType == 1 { // 有青龙
// has = true
// }
// }
//}
//n -= sceneEx.specialTypeNum
//sceneEx.specialTime = time.Second * time.Duration(n*5)
//// pk动画 2秒
//sceneEx.specialTime += time.Second * 2
//// 特殊牌型 4.5秒至尊青龙5.5秒
//if sceneEx.specialTypeNum > 0 {
// if has {
// sceneEx.specialTime += time.Millisecond * 5500
// } else {
// sceneEx.specialTime += time.Millisecond * 4500
// }
//}
sceneEx.specialTime = 0
// pk动画 2秒
sceneEx.specialTime += time.Second * 2
// 2人且有特殊牌型直接播放特殊牌型动画'
var n int // 玩家数量
var has bool // 是否有青龙
for _, v := range sceneEx.players {
if v != nil && v.IsGameing() && v.cardsO != nil {
n++
@ -1095,18 +1146,16 @@ func (this *StateShow) OnEnter(s *base.Scene) {
}
}
}
n -= sceneEx.specialTypeNum
sceneEx.specialTime = time.Second * time.Duration(n*5)
// pk动画 2秒
sceneEx.specialTime += time.Second * 2
// 特殊牌型 4.5秒至尊青龙5.5秒
if sceneEx.specialTypeNum > 0 {
if n == 2 && sceneEx.specialTypeNum > 0 {
if has {
sceneEx.specialTime += time.Millisecond * 5500
} else {
sceneEx.specialTime += time.Millisecond * 4500
}
} else {
sceneEx.specialTime = time.Second * time.Duration(5)
}
logger.Logger.Tracef("show cards: %v %v", n, sceneEx.specialTime)
if sceneEx.specialTime <= 0 {
sceneEx.specialTime = time.Second
@ -1479,7 +1528,12 @@ func (this *StateBilled) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, p
func (this *StateBilled) OnTick(s *base.Scene) {
this.BaseState.OnTick(s)
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
if time.Now().Sub(sceneEx.StateStartTime) > rule.ThirteenWaterBilledTimeout {
var second = rule.ThirteenWaterBilledTimeout
sub := rule.GetTimeout(sceneEx.GetDBGameFree().GetOtherIntParams(), rule.TimeoutBill)
if sub > 0 {
second = sub
}
if time.Now().Sub(sceneEx.StateStartTime) > second {
if sceneEx.CanStart() {
s.ChangeSceneState(rule.ThirteenWaterSceneStateStart)
} else {

2
go.mod
View File

@ -31,7 +31,6 @@ require (
go.etcd.io/etcd/client/v3 v3.5.16
go.mongodb.org/mongo-driver v1.17.1
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.35.1
gorm.io/driver/mysql v1.5.7
gorm.io/gorm v1.25.12
@ -112,6 +111,7 @@ require (
golang.org/x/time v0.7.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/grpc v1.67.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect

View File

@ -386,7 +386,7 @@ type CSThirteenPlayerOp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OpCode int32 `protobuf:"varint,1,opt,name=OpCode,proto3" json:"OpCode,omitempty"` // 1:确定牌 2站起状态 3test 4重新选牌
OpCode int32 `protobuf:"varint,1,opt,name=OpCode,proto3" json:"OpCode,omitempty"` // 1:确定牌 2站起状态 3test 4重新选牌 5加入游戏
// 确定牌时,两种参数规则,都可以
// 第一种玩家从推荐牌型中选择一个把Poker.IndexType发过来减少数据传输
// 第二种:按头墩中墩尾墩顺序把牌发过来
@ -924,6 +924,7 @@ type SCThirteenRoomInfo struct {
TotalOfGames int32 `protobuf:"varint,17,opt,name=TotalOfGames,proto3" json:"TotalOfGames,omitempty"` //总局数
LeaveDeduct int32 `protobuf:"varint,18,opt,name=LeaveDeduct,proto3" json:"LeaveDeduct,omitempty"` // 离场扣分倍数;玩家在发牌,选牌状态离场扣除指定倍数的底分
LeaveCombat int32 `protobuf:"varint,19,opt,name=LeaveCombat,proto3" json:"LeaveCombat,omitempty"` // 补偿倍数;玩家在发牌,选牌状态离场其它玩家补偿底分倍数
TimeOuts []int64 `protobuf:"varint,20,rep,packed,name=TimeOuts,proto3" json:"TimeOuts,omitempty"` // 游戏阶段超时时间,秒 0开始倒计时,1发牌,2选牌,3结算
}
func (x *SCThirteenRoomInfo) Reset() {
@ -1091,6 +1092,13 @@ func (x *SCThirteenRoomInfo) GetLeaveCombat() int32 {
return 0
}
func (x *SCThirteenRoomInfo) GetTimeOuts() []int64 {
if x != nil {
return x.TimeOuts
}
return nil
}
//房间状态更新
//PACKET_SCThirteenRoomState
type SCThirteenRoomState struct {
@ -1475,7 +1483,7 @@ var file_protocol_thirteen_thirteen_proto_rawDesc = []byte{
0x44, 0x61, 0x74, 0x61, 0x22, 0x29, 0x0a, 0x15, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65,
0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x10, 0x0a,
0x03, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x22,
0xd4, 0x04, 0x0a, 0x12, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x6f,
0xf0, 0x04, 0x0a, 0x12, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 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, 0x18,
0x0a, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
@ -1512,59 +1520,61 @@ var file_protocol_thirteen_thirteen_proto_rawDesc = []byte{
0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x44, 0x65,
0x64, 0x75, 0x63, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x43, 0x6f, 0x6d,
0x62, 0x61, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x4c, 0x65, 0x61, 0x76, 0x65,
0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x22, 0x43, 0x0a, 0x13, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72,
0x74, 0x65, 0x65, 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, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x05, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x5a, 0x0a, 0x13, 0x53,
0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x61, 0x72,
0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x41, 0x6c,
0x6c, 0x43, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74,
0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x2e, 0x50, 0x6f, 0x6b, 0x65, 0x72, 0x52, 0x08, 0x41,
0x6c, 0x6c, 0x43, 0x61, 0x72, 0x64, 0x73, 0x22, 0x68, 0x0a, 0x06, 0x42, 0x69, 0x6c, 0x6c, 0x65,
0x64, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
0x50, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x52, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f,
0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69,
0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x18,
0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x43, 0x6f, 0x69,
0x6e, 0x22, 0x42, 0x0a, 0x10, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x42,
0x69, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x09, 0x41, 0x6c, 0x6c, 0x42, 0x69, 0x6c, 0x6c,
0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x74,
0x65, 0x65, 0x6e, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x52, 0x09, 0x41, 0x6c, 0x6c, 0x42,
0x69, 0x6c, 0x6c, 0x65, 0x64, 0x22, 0x24, 0x0a, 0x0e, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74,
0x65, 0x65, 0x6e, 0x54, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x2a, 0xee, 0x02, 0x0a, 0x0d,
0x54, 0x57, 0x4d, 0x6d, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a,
0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x48, 0x49, 0x52, 0x54, 0x45, 0x45, 0x4e,
0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x6f, 0x6f, 0x6d,
0x49, 0x6e, 0x66, 0x6f, 0x10, 0xc2, 0x2b, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x43, 0x53, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79,
0x65, 0x72, 0x4f, 0x70, 0x10, 0xc3, 0x2b, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x6f, 0x6f, 0x6d,
0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0xc4, 0x2b, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x50, 0x6c, 0x61,
0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xc5, 0x2b, 0x12, 0x21, 0x0a, 0x1c, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e,
0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x10, 0xc6, 0x2b, 0x12, 0x21,
0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74,
0x65, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x61, 0x72, 0x64, 0x73, 0x10, 0xc7,
0x2b, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x68,
0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x10, 0xc8,
0x2b, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x68,
0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x61, 0x72, 0x64, 0x73, 0x10,
0xc9, 0x2b, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54,
0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0xca, 0x2b,
0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69,
0x72, 0x74, 0x65, 0x65, 0x6e, 0x54, 0x65, 0x73, 0x74, 0x10, 0xcb, 0x2b, 0x2a, 0x2f, 0x0a, 0x0c,
0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b,
0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 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, 0x74,
0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75,
0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75,
0x74, 0x73, 0x22, 0x43, 0x0a, 0x13, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 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,
0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52,
0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x5a, 0x0a, 0x13, 0x53, 0x43, 0x54, 0x68, 0x69,
0x72, 0x74, 0x65, 0x65, 0x6e, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x61, 0x72, 0x64, 0x73, 0x12, 0x16,
0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x72,
0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x74,
0x65, 0x65, 0x6e, 0x2e, 0x50, 0x6f, 0x6b, 0x65, 0x72, 0x52, 0x08, 0x41, 0x6c, 0x6c, 0x43, 0x61,
0x72, 0x64, 0x73, 0x22, 0x68, 0x0a, 0x06, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x10, 0x0a,
0x03, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x12,
0x12, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43,
0x6f, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03,
0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x1e, 0x0a,
0x0a, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0x42, 0x0a,
0x10, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x42, 0x69, 0x6c, 0x6c, 0x65,
0x64, 0x12, 0x2e, 0x0a, 0x09, 0x41, 0x6c, 0x6c, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x2e,
0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x52, 0x09, 0x41, 0x6c, 0x6c, 0x42, 0x69, 0x6c, 0x6c, 0x65,
0x64, 0x22, 0x24, 0x0a, 0x0e, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x54,
0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x2a, 0xee, 0x02, 0x0a, 0x0d, 0x54, 0x57, 0x4d, 0x6d,
0x6f, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x54, 0x48, 0x49, 0x52, 0x54, 0x45, 0x45, 0x4e, 0x5f, 0x5a, 0x45, 0x52,
0x4f, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f,
0x10, 0xc2, 0x2b, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53,
0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70,
0x10, 0xc3, 0x2b, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74,
0x65, 0x10, 0xc4, 0x2b, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x45,
0x6e, 0x74, 0x65, 0x72, 0x10, 0xc5, 0x2b, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79,
0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x10, 0xc6, 0x2b, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65, 0x6e, 0x50,
0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x61, 0x72, 0x64, 0x73, 0x10, 0xc7, 0x2b, 0x12, 0x1e, 0x0a,
0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65,
0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x10, 0xc8, 0x2b, 0x12, 0x1f, 0x0a,
0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65,
0x65, 0x6e, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x61, 0x72, 0x64, 0x73, 0x10, 0xc9, 0x2b, 0x12, 0x1c,
0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74,
0x65, 0x65, 0x6e, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0xca, 0x2b, 0x12, 0x1a, 0x0a, 0x15,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x68, 0x69, 0x72, 0x74, 0x65, 0x65,
0x6e, 0x54, 0x65, 0x73, 0x74, 0x10, 0xcb, 0x2b, 0x2a, 0x2f, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43,
0x5f, 0x53, 0x75, 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, 0x74, 0x68, 0x69, 0x72, 0x74,
0x65, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -73,7 +73,7 @@ message SCThirteenPlayerCards {
//
//PACKET_CSThirteenPlayerOp
message CSThirteenPlayerOp {
int32 OpCode = 1; // 1: 2 3test 4
int32 OpCode = 1; // 1: 2 3test 4 5
// ,
// Poker.IndexType发过来
@ -164,6 +164,7 @@ message SCThirteenRoomInfo {
int32 TotalOfGames = 17; //
int32 LeaveDeduct = 18; //
int32 LeaveCombat = 19; //
repeated int64 TimeOuts = 20; // , 0,1,2,3
}
//