From 0421c9f00ee5979d653ffcb17f65d2076fa4178e Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Mon, 27 Mar 2023 20:15:25 +0800 Subject: [PATCH] update req --- modules/dispatch/model_dispatch.go | 24 ------------------------ modules/worldtask/api_completetask.go | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/modules/dispatch/model_dispatch.go b/modules/dispatch/model_dispatch.go index 0c8bef5b5..8ccbeead2 100644 --- a/modules/dispatch/model_dispatch.go +++ b/modules/dispatch/model_dispatch.go @@ -138,30 +138,6 @@ func (this *modelDispatch) taskRandom(uid string, dispatch *pb.DBDispatch) (task dispatch.Nb.Lv = 1 } - // conf, err := this.module.configure.getDispatchLvConf(dispatch.Nb.Lv) - // if err != nil || conf == nil { - // return nil, err - // } - - // var items []*comm.WeightItem - // for i, v := range conf.Probability { - // items = append(items, &comm.WeightItem{Id: (i + 1), Weight: int(v)}) - // } - - // wr := comm.NewWeightedRandom(items) - // //任务类型 - // var taskType int - // if c := wr.Pick(); c != nil { - // taskType = c.Id.(int) - // } - - // confList := this.module.configure.getDispatchListConf() - // var tIds []int32 - // for _, v := range confList { - // if int(v.Type) == taskType { - // tIds = append(tIds, v.Id) - // } - // } tIds := this.getTasksWeight(uid, dispatch) if len(tIds) == 0 { return diff --git a/modules/worldtask/api_completetask.go b/modules/worldtask/api_completetask.go index 8a852ba65..f01534892 100644 --- a/modules/worldtask/api_completetask.go +++ b/modules/worldtask/api_completetask.go @@ -11,7 +11,7 @@ import ( // 任务完成条件 func (this *apiComp) CompleteCondiCheck(session comm.IUserSession, req *pb.WorldtaskCompleteCondiReq) (code pb.ErrorCode) { - if req.GroupId != 2 || req.TaskId <= 0 || req.CondiId <= 0 { + if req.GroupId <= 0 || req.TaskId <= 0 || req.CondiId <= 0 { code = *pb.ErrorCode_ReqParameterError.Enum() } return