修改成就

This commit is contained in:
wh_zcy 2022-09-09 11:52:00 +08:00
parent 7b671c59b2
commit e1ee9a6c2f
2 changed files with 8 additions and 9 deletions

View File

@ -76,17 +76,16 @@ func (this *configureComp) getTaskById(taskId int32) (data *cfg.GameTaskRoundDat
}
//是否第一个成就任务
func (this *configureComp) isFirstTask(taskId int32) (ok bool) {
func (this *configureComp) isFirstTask(taskId int32) bool {
data := this.getTaskByTag(int32(comm.TASK_ACHIEVE))
for _, v := range data {
if v.IdAfter == taskId {
ok = false
if taskId == v.IdAfter {
return false
} else {
ok = true
continue
}
break
}
return
return true
}
// 上一个任务

View File

@ -74,6 +74,7 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) (newli
isFirst := this.moduleTask.configure.isFirstTask(curTask.Key)
if curTask.IdAfter == 0 && isFirst { //未领取和没有下个连续任务的
newlist = append(newlist, v)
continue
}
if isFirst && curTask.IdAfter != 0 { //连续任务的第一个任务
@ -84,13 +85,12 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) (newli
} else {
if isReceived(curTask.Key) {
newlist = append(newlist, v)
} else {
break
}
}
break
}
}
}
} else {
newlist = taskList