Compare commits
2 Commits
4c633216c6
...
d439182012
Author | SHA1 | Date | |
---|---|---|---|
d439182012 | |||
dcef2d09e3 |
@ -132,7 +132,7 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
|
||||
a.module.ModuleBuried.ActiveCondition(uid, curTaskConf.Completetask...)
|
||||
|
||||
//判断是否要结束任务
|
||||
if ((len(curTaskConf.Completetask) == 1 && curTaskConf.Completetask[0] == 0) || len(curTaskConf.Completetask) == 0) &&
|
||||
if ((len(curTaskConf.Completetask) >= 1 && curTaskConf.Completetask[0] == 0) || len(curTaskConf.Completetask) == 0) &&
|
||||
curTaskConf.DeliverNpc == 0 {
|
||||
a.sendMsg(session, WorldtaskSubtypeAccept, rsp)
|
||||
//结束任务
|
||||
|
@ -34,7 +34,7 @@ func (this *apiComp) CompleteCondi(session comm.IUserSession, req *pb.WorldtaskC
|
||||
}
|
||||
return
|
||||
}
|
||||
if (len(curTaskConf.Completetask) == 1 && curTaskConf.Completetask[0] == 0) ||
|
||||
if (len(curTaskConf.Completetask) >= 1 && curTaskConf.Completetask[0] == 0) ||
|
||||
len(curTaskConf.Completetask) == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_WorldtaskNoProcess,
|
||||
|
@ -59,7 +59,7 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.WorldtaskMineReq) (
|
||||
}
|
||||
return
|
||||
}
|
||||
if (len(cfg.Completetask) == 1 && cfg.Completetask[0] > 0) &&
|
||||
if (len(cfg.Completetask) >= 1 && cfg.Completetask[0] > 0) &&
|
||||
len(cfg.Completetask) > 0 {
|
||||
condIds = append(condIds, cfg.Completetask...)
|
||||
condMap[k] = cfg.Completetask
|
||||
|
@ -155,8 +155,6 @@ func (this *Worldtask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) {
|
||||
var currentTasks []*pb.CurrentTask
|
||||
for _, tasks := range taskConds {
|
||||
for _, t := range tasks {
|
||||
// for _, cond := range t.Conds {
|
||||
// if cond.State == pb.BuriedItemFinishState_buried_finish {
|
||||
curTaskConf, err := this.configure.getWorldtaskById(t.TaskId)
|
||||
if err != nil || curTaskConf == nil {
|
||||
return
|
||||
@ -166,8 +164,6 @@ func (this *Worldtask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) {
|
||||
this.modelWorldtask.taskFinishPush(session, userTask, curTaskConf)
|
||||
}
|
||||
currentTasks = append(currentTasks, t)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@ -398,7 +394,7 @@ func (this *Worldtask) GetWorldTaskBy(session comm.IUserSession, groupId int32)
|
||||
}
|
||||
|
||||
//判断是否要结束任务
|
||||
if ((len(curTaskConf.Completetask) == 1 && curTaskConf.Completetask[0] == 0) ||
|
||||
if ((len(curTaskConf.Completetask) >= 1 && curTaskConf.Completetask[0] == 0) ||
|
||||
len(curTaskConf.Completetask) == 0) &&
|
||||
curTaskConf.DeliverNpc == 0 {
|
||||
//结束任务
|
||||
|
Loading…
Reference in New Issue
Block a user