From 167e1e9c1036cf8870fcd9855ee2114f108d4d05 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 19 Dec 2024 14:07:18 +0800 Subject: [PATCH] =?UTF-8?q?add:tienlen=E8=B0=83=E8=AF=95=E5=8F=91=E7=89=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/tienlen/scenedata_tienlen.go | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) 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