周任务结构更新

This commit is contained in:
wh_zcy 2023-06-02 18:38:56 +08:00
parent 11f54ef56b
commit 20d3a6e4b6
2 changed files with 7 additions and 4 deletions

View File

@ -91,7 +91,7 @@ func (this *TaskListView) dataListener() {
for _, v := range rsp.List {
item := common.Item{
Id: cast.ToString(v.TaskId),
Text: fmt.Sprintf("%s 是否完成:%d 是否领奖:%d 进度:%d", cast.ToString(v.TaskId), v.Status, v.Received, v.Progress),
Text: fmt.Sprintf("%s 是否完成:%d 是否领奖:%d ", cast.ToString(v.TaskId), v.Status, v.Received),
}
this.itemList.AddItem(item)
}

View File

@ -74,6 +74,9 @@ func (this *ModelTask) checkTaskStatus(uid string, list []*pb.TaskData) []*pb.Ta
for _, cond := range conds {
if v.TypeId == cond.Conid {
v.Cond = cond
if cond.State == pb.BuriedItemFinishState_buried_finish {
v.Status = 1
}
}
}
}
@ -145,7 +148,7 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) *pb.DB
// 成就列表
var achieveList []*pb.TaskData
if taskTag == comm.TASK_ACHIEVE {
for _, v := range task.AchieveList {
if curTask := this.moduleTask.configure.getTaskById(v.TaskId); curTask != nil {
@ -171,12 +174,12 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) *pb.DB
}
achieveList = this.checkTaskStatus(uid, achieveList)
update["achieveList"] = achieveList
if err := this.moduleTask.modelTask.Change(uid, update); err != nil {
log.Error("err", log.Field{Key: "uid", Value: uid})
}
task.AchieveList = achieveList
}