上传任务优化
This commit is contained in:
parent
a850b4af7a
commit
9b11b68040
@ -152,37 +152,25 @@ func (this *Worldtask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) {
|
||||
tasks := map[int32][]int32{}
|
||||
taskgroup := map[int32]int32{}
|
||||
allconds := []int32{}
|
||||
for _, cfg := range worldtaskConf.GetDataList() {
|
||||
for _, condId := range cfg.Completetask {
|
||||
for _, cond := range conds {
|
||||
if condId == cond.Conid { //&& cond.State == pb.BuriedItemFinishState_buried_finish {
|
||||
tasks[cfg.Key] = cfg.Completetask
|
||||
taskgroup[cfg.Key] = cfg.Group
|
||||
allconds = append(allconds, cfg.Completetask...)
|
||||
//校验任务是否是当前任务
|
||||
// if task, ok := userTask.CurrentTasks[cfg.Group]; ok {
|
||||
// tasks[cfg.Key] = cfg.Completetask
|
||||
// var currentTasks []*pb.CurrentTask
|
||||
// for _, t := range task.TaskMap {
|
||||
// if cfg.Key == t.TaskId {
|
||||
// finishedCondIds = append(finishedCondIds, cond)
|
||||
// currentTasks = append(currentTasks, &pb.CurrentTask{
|
||||
// GroupId: cfg.Group,
|
||||
// TaskId: cfg.Key,
|
||||
// Conds: finishedCondIds,
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// if currentTasks != nil {
|
||||
// taskConds[cfg.Group] = currentTasks
|
||||
// }
|
||||
// }
|
||||
break
|
||||
// for _, cfg := range worldtaskConf.GetDataList() {
|
||||
for _, group := range userTask.CurrentTasks {
|
||||
for _, v := range group.TaskMap {
|
||||
tconfig := worldtaskConf.GetDataMap()[v.TaskId]
|
||||
for _, condId := range tconfig.Completetask {
|
||||
for _, cond := range conds {
|
||||
if condId == cond.Conid { //&& cond.State == pb.BuriedItemFinishState_buried_finish {
|
||||
tasks[tconfig.Key] = tconfig.Completetask
|
||||
taskgroup[tconfig.Key] = tconfig.Group
|
||||
allconds = append(allconds, tconfig.Completetask...)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// }
|
||||
|
||||
if len(allconds) == 0 {
|
||||
// this.Debug("未匹配到完成的条件")
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user