errdata
This commit is contained in:
parent
bc2a0b8a43
commit
7644cb48ec
@ -51,13 +51,15 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.WorldtaskMineReq) (
|
|||||||
for k, v := range myWorldtask.CurrentTask {
|
for k, v := range myWorldtask.CurrentTask {
|
||||||
cfg, err := this.module.configure.getWorldtaskById(v.TaskId)
|
cfg, err := this.module.configure.getWorldtaskById(v.TaskId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
errdata = &pb.ErrorData{
|
||||||
data.Title = code.ToString()
|
Code: pb.ErrorCode_ConfigNoFound,
|
||||||
data.Message = err.Error()
|
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ((len(cfg.Completetask) == 1 && cfg.Completetask[0] > 0) &&
|
if (len(cfg.Completetask) == 1 && cfg.Completetask[0] > 0) &&
|
||||||
len(cfg.Completetask) > 0) {
|
len(cfg.Completetask) > 0 {
|
||||||
condIds = append(condIds, cfg.Completetask...)
|
condIds = append(condIds, cfg.Completetask...)
|
||||||
condMap[k] = cfg.Completetask
|
condMap[k] = cfg.Completetask
|
||||||
}
|
}
|
||||||
@ -67,9 +69,11 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.WorldtaskMineReq) (
|
|||||||
|
|
||||||
conds, err := this.module.ModuleBuried.CheckCondition(uid, condIds...)
|
conds, err := this.module.ModuleBuried.CheckCondition(uid, condIds...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ExternalModule
|
errdata = &pb.ErrorData{
|
||||||
data.Title = code.ToString()
|
Code: pb.ErrorCode_ExternalModule,
|
||||||
data.Message = comm.NewExternalModuleErr("buried", "CheckCondition", condIds).Error()
|
Title: pb.ErrorCode_ExternalModule.ToString(),
|
||||||
|
Message: comm.NewExternalModuleErr("buried", "CheckCondition", condIds).Error(),
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user