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(),