Merge branches 'dev' and 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev

This commit is contained in:
liwei1dao 2023-06-15 21:05:17 +08:00
commit e6ecb1e31d

View File

@ -92,9 +92,13 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
} else { } else {
task.NpcStatus = 1 task.NpcStatus = 1
for _, cid := range curTaskConf.Completetask { for _, cid := range curTaskConf.Completetask {
task.Conds = append(task.Conds, &pb.ConIProgress{ for _, cond := range task.Conds {
Conid: cid, if cid != cond.Conid {
}) task.Conds = append(task.Conds, &pb.ConIProgress{
Conid: cid,
})
}
}
} }
} }
break break
@ -110,9 +114,13 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
} }
for _, cid := range curTaskConf.Completetask { for _, cid := range curTaskConf.Completetask {
task.Conds = append(task.Conds, &pb.ConIProgress{ for _, cond := range task.Conds {
Conid: cid, if cid != cond.Conid {
}) task.Conds = append(task.Conds, &pb.ConIProgress{
Conid: cid,
})
}
}
} }
tasks.TaskMap[task.TaskId] = task tasks.TaskMap[task.TaskId] = task
} }
@ -127,9 +135,13 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
NpcStatus: 1, //接取 NpcStatus: 1, //接取
} }
for _, cid := range curTaskConf.Completetask { for _, cid := range curTaskConf.Completetask {
task.Conds = append(task.Conds, &pb.ConIProgress{ for _, cond := range task.Conds {
Conid: cid, if cid != cond.Conid {
}) task.Conds = append(task.Conds, &pb.ConIProgress{
Conid: cid,
})
}
}
} }
tasks.TaskMap[req.TaskId] = task tasks.TaskMap[req.TaskId] = task
myWorldtask.CurrentTasks[curTaskConf.Group] = tasks myWorldtask.CurrentTasks[curTaskConf.Group] = tasks