Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
490c750095
@ -103,23 +103,25 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
|||||||
if mc := iwt.CheckCondi(uid, condiId); mc != pb.ErrorCode_Success {
|
if mc := iwt.CheckCondi(uid, condiId); mc != pb.ErrorCode_Success {
|
||||||
this.module.Debug("任务完成条件不满足",
|
this.module.Debug("任务完成条件不满足",
|
||||||
log.Field{Key: "uid", Value: uid},
|
log.Field{Key: "uid", Value: uid},
|
||||||
log.Field{Key: "taskId", Value: req.TaskId},
|
log.Field{Key: "taskId", Value: nextTaskId},
|
||||||
log.Field{Key: "condiId", Value: condiId},
|
log.Field{Key: "condiId", Value: condiId},
|
||||||
)
|
)
|
||||||
rsp.CondiId = condiId
|
rsp.CondiId = condiId
|
||||||
rsp.TaskId = req.TaskId
|
rsp.TaskId = nextTaskId
|
||||||
} else {
|
} else {
|
||||||
_, ok := userTask.CurrentTask[nextTaskConf.Group]
|
nwt, ok := userTask.CurrentTask[nextTaskConf.Group]
|
||||||
if ok {
|
if ok {
|
||||||
userTask.CurrentTask[nextTaskConf.Group].CondiIds = append(userTask.CurrentTask[req.GroupId].CondiIds, condiId)
|
nwt.CondiIds = append(nwt.CondiIds, condiId)
|
||||||
} else {
|
} else {
|
||||||
condiIds := []int32{condiId}
|
condiIds := []int32{condiId}
|
||||||
userTask.CurrentTask[nextTaskConf.Group].CondiIds = condiIds
|
nwt = &pb.Worldtask{
|
||||||
|
TaskId: nextTaskId,
|
||||||
|
TaskType: nextTaskConf.Des,
|
||||||
|
CondiIds: condiIds,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
userTask.CurrentTask[nextTaskConf.Group] = nwt
|
||||||
}
|
}
|
||||||
|
|
||||||
userTask.CurrentTask[nextTaskConf.Group].TaskId = nextTaskId
|
|
||||||
userTask.CurrentTask[nextTaskConf.Group].TaskType = nextTaskConf.Des
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user