上传任务优化
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{}
|
tasks := map[int32][]int32{}
|
||||||
taskgroup := map[int32]int32{}
|
taskgroup := map[int32]int32{}
|
||||||
allconds := []int32{}
|
allconds := []int32{}
|
||||||
for _, cfg := range worldtaskConf.GetDataList() {
|
// for _, cfg := range worldtaskConf.GetDataList() {
|
||||||
for _, condId := range cfg.Completetask {
|
for _, group := range userTask.CurrentTasks {
|
||||||
for _, cond := range conds {
|
for _, v := range group.TaskMap {
|
||||||
if condId == cond.Conid { //&& cond.State == pb.BuriedItemFinishState_buried_finish {
|
tconfig := worldtaskConf.GetDataMap()[v.TaskId]
|
||||||
tasks[cfg.Key] = cfg.Completetask
|
for _, condId := range tconfig.Completetask {
|
||||||
taskgroup[cfg.Key] = cfg.Group
|
for _, cond := range conds {
|
||||||
allconds = append(allconds, cfg.Completetask...)
|
if condId == cond.Conid { //&& cond.State == pb.BuriedItemFinishState_buried_finish {
|
||||||
//校验任务是否是当前任务
|
tasks[tconfig.Key] = tconfig.Completetask
|
||||||
// if task, ok := userTask.CurrentTasks[cfg.Group]; ok {
|
taskgroup[tconfig.Key] = tconfig.Group
|
||||||
// tasks[cfg.Key] = cfg.Completetask
|
allconds = append(allconds, tconfig.Completetask...)
|
||||||
// var currentTasks []*pb.CurrentTask
|
break
|
||||||
// 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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
if len(allconds) == 0 {
|
if len(allconds) == 0 {
|
||||||
// this.Debug("未匹配到完成的条件")
|
// this.Debug("未匹配到完成的条件")
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user