update worldtask
This commit is contained in:
parent
64a50c4f57
commit
fd0580d4da
@ -93,7 +93,14 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
|||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(nextTaskConf.Completetask) == 1 && nextTaskConf.Completetask[0] == 0 {
|
||||||
|
userTask.CondiIds = []int32{}
|
||||||
|
} else {
|
||||||
for _, condiId := range nextTaskConf.Completetask {
|
for _, condiId := range nextTaskConf.Completetask {
|
||||||
|
if condiId == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if m, err := this.module.service.GetModule(comm.ModuleRtask); err == nil {
|
if m, err := this.module.service.GetModule(comm.ModuleRtask); err == nil {
|
||||||
iwt, ok := m.(comm.IRtask)
|
iwt, ok := m.(comm.IRtask)
|
||||||
if ok {
|
if ok {
|
||||||
@ -104,6 +111,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//设置当前进行的任务
|
//设置当前进行的任务
|
||||||
userTask.CurrentTaskIds[curTaskConf.Group] = &pb.Worldtask{
|
userTask.CurrentTaskIds[curTaskConf.Group] = &pb.Worldtask{
|
||||||
TaskId: nextTaskId,
|
TaskId: nextTaskId,
|
||||||
|
@ -97,6 +97,8 @@ func (this *ModelWorldtask) finishTask(groupId, taskId int32, task *pb.DBWorldta
|
|||||||
update["lastTaskIds"] = task.LastTaskIds
|
update["lastTaskIds"] = task.LastTaskIds
|
||||||
update["deliverNpc"] = 1
|
update["deliverNpc"] = 1
|
||||||
update["condiIds"] = []int32{}
|
update["condiIds"] = []int32{}
|
||||||
|
update["npcStatus"] = 0
|
||||||
|
update["deliverNpc"] = 0
|
||||||
if err := this.Change(task.Uid, update); err != nil {
|
if err := this.Change(task.Uid, update); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user