上传任务修复
This commit is contained in:
parent
14d1702f96
commit
1bdaa38367
@ -209,13 +209,21 @@ func (this *ModelWorldtask) taskFinishPush(session comm.IUserSession, userTask *
|
|||||||
this.moduleWorldtask.Debug("nextTaskIds", log.Field{Key: "nextTaskIds", Value: nextTaskIds})
|
this.moduleWorldtask.Debug("nextTaskIds", log.Field{Key: "nextTaskIds", Value: nextTaskIds})
|
||||||
|
|
||||||
nextTask := make(map[int32]*pb.Worldtasks)
|
nextTask := make(map[int32]*pb.Worldtasks)
|
||||||
for _, next := range nextTaskIds {
|
if len(nextTask) > 0 {
|
||||||
ut := this.updateCurrentTaskCond(session.GetUserId(), u.Lv, userTask, curTaskConf.Key, next)
|
for _, next := range nextTaskIds {
|
||||||
if ut != nil {
|
ut := this.updateCurrentTaskCond(session.GetUserId(), u.Lv, userTask, curTaskConf.Key, next)
|
||||||
for k, v := range ut.CurrentTasks {
|
if ut != nil {
|
||||||
nextTask[k] = v
|
for k, v := range ut.CurrentTasks {
|
||||||
|
nextTask[k] = v
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
nwt, ok := userTask.CurrentTasks[curTaskConf.Group]
|
||||||
|
if ok {
|
||||||
|
// 删除
|
||||||
|
delete(nwt.TaskMap, curTaskConf.Key)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if nextTaskIds == nil {
|
if nextTaskIds == nil {
|
||||||
@ -231,6 +239,7 @@ func (this *ModelWorldtask) taskFinishPush(session comm.IUserSession, userTask *
|
|||||||
userTask.Chapters = make(map[int32]int32)
|
userTask.Chapters = make(map[int32]int32)
|
||||||
}
|
}
|
||||||
userTask.Chapters[curTaskConf.Group] = 1 //已解锁待领取
|
userTask.Chapters[curTaskConf.Group] = 1 //已解锁待领取
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
update := map[string]interface{}{
|
update := map[string]interface{}{
|
||||||
|
Loading…
Reference in New Issue
Block a user