diff --git a/gamesrv/tienlen/scenedata_tienlen.go b/gamesrv/tienlen/scenedata_tienlen.go index f5daa4b..7f2c145 100644 --- a/gamesrv/tienlen/scenedata_tienlen.go +++ b/gamesrv/tienlen/scenedata_tienlen.go @@ -1298,24 +1298,20 @@ func (this *TienLenSceneData) SendHandCardOdds() { allcs[i], allcs[j] = allcs[j], allcs[i] }) - if len(this.testPokers) > 14 { - this.testPokers = this.testPokers[:14] - } - if len(this.testPokers) < 14 { - allcs = common.DelSliceIn32s(allcs, this.testPokers[1:]) - this.testPokers = append(this.testPokers, allcs[:14-len(this.testPokers)]...) - allcs = allcs[14-len(this.testPokers):] - } - allcs = common.DelSliceIn32s(allcs, this.testPokers[1:]) + this.testPokers = append(this.testPokers, allcs...) + for _, seat := range this.seats { - if seat != nil && seat.IsGameing() { - if seat.SnId == this.testPokers[0] { - f1(seat, this.testPokers[1:]) - } else { - f1(seat, allcs[:13]) - allcs = allcs[13:] - } + if seat != nil && seat.IsGameing() && seat.SnId == this.testPokers[0] { + f1(seat, this.testPokers[1:14]) + this.testPokers = this.testPokers[14:] + break + } + } + for _, seat := range this.seats { + if seat != nil && seat.IsGameing() && seat.SnId != this.testPokers[0] { + f1(seat, allcs[:13]) + allcs = allcs[13:] } } this.testPokers = nil