From 86eaf106d591d4941151f885383a8af883ad7943 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 14 Nov 2023 10:45:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=8B=86=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E5=A5=96=E5=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/dcolor/api_singleover.go | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/modules/dcolor/api_singleover.go b/modules/dcolor/api_singleover.go index f73cdeaff..68eaaed7e 100644 --- a/modules/dcolor/api_singleover.go +++ b/modules/dcolor/api_singleover.go @@ -16,11 +16,12 @@ func (this *apiComp) SingleOverCheck(session comm.IUserSession, req *pb.DColorSi func (this *apiComp) SingleOver(session comm.IUserSession, req *pb.DColorSingleOverReq) (errdata *pb.ErrorData) { var ( - info *pb.DBDColor - score int32 - conf *cfg.GameGColorGetfractionData - tconf *cfg.GameGColortTmedecayData - err error + info *pb.DBDColor + score int32 + conf *cfg.GameGColorGetfractionData + tconf *cfg.GameGColortTmedecayData + handlenum int + err error ) if errdata = this.SingleOverCheck(session, req); errdata != nil { return @@ -32,7 +33,14 @@ func (this *apiComp) SingleOver(session comm.IUserSession, req *pb.DColorSingleO } return } - if conf, err = this.module.configure.getGameGColorGetfractionData(int32(req.Difficulty)+1, req.Repeat, len(req.Handles)-1); err != nil { + + for _, v := range req.Handles { + if v.Uid != "" { + handlenum++ + } + + } + if conf, err = this.module.configure.getGameGColorGetfractionData(int32(req.Difficulty)+1, req.Repeat, handlenum-1); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_ConfigNoFound, Message: err.Error(),