Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
b68fb48295
@ -20,6 +20,7 @@ func (this *apiComp) TaskChapteReward(session comm.IUserSession, req *pb.Mainlin
|
||||
conf *cfg.GameMainChapterData
|
||||
|
||||
award []*pb.UserAtno
|
||||
ok bool
|
||||
err error
|
||||
)
|
||||
if errdata = this.TaskChapteRewardCheck(session, req); errdata != nil {
|
||||
@ -52,10 +53,11 @@ func (this *apiComp) TaskChapteReward(session comm.IUserSession, req *pb.Mainlin
|
||||
return
|
||||
}
|
||||
if taskids := this.module.configure.getgroupTasks(req.Chapteid); len(taskids) > 0 {
|
||||
tids := make([]int32, 0)
|
||||
for _, v := range taskids {
|
||||
if _, progress, err := this.module.ModuleBuried.CheckCondition(session, v.Taskid); err == nil {
|
||||
for _, v := range progress {
|
||||
if v.State == pb.BuriedItemFinishState_buried_unfinish {
|
||||
tids = append(tids, v.Taskid)
|
||||
}
|
||||
if ok, _, _ = this.module.ModuleBuried.CheckCondition(session, tids...); !ok {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
@ -63,16 +65,6 @@ func (this *apiComp) TaskChapteReward(session comm.IUserSession, req *pb.Mainlin
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ExternalModule,
|
||||
Title: pb.ErrorCode_ExternalModule.ToString(),
|
||||
Message: comm.NewExternalModuleErr("Buried", "CheckCondition", v.Taskid).Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
} else { // 配置出错
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
|
Loading…
Reference in New Issue
Block a user