update req

This commit is contained in:
wh_zcy 2023-03-27 20:15:25 +08:00
parent 449c921133
commit 0421c9f00e
2 changed files with 1 additions and 25 deletions

View File

@ -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

View File

@ -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