Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
43342582a6
@ -39,9 +39,9 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChalleng
|
||||
return
|
||||
}
|
||||
|
||||
if v, ok := pagoda.Data[req.Cid]; !ok {
|
||||
if v, ok := pagoda.Data[conf.Tab]; !ok {
|
||||
if conf.LayerNum == 1 {
|
||||
pagoda.Data[req.Cid] = 0
|
||||
pagoda.Data[conf.Tab] = 0
|
||||
} else {
|
||||
code = pb.ErrorCode_PagodaLevlErr // 挑战关卡数据不匹配
|
||||
return
|
||||
|
@ -47,9 +47,9 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
|
||||
return
|
||||
}
|
||||
|
||||
if v, ok := pagoda.Data[req.Cid]; !ok {
|
||||
if v, ok := pagoda.Data[conf.Tab]; !ok {
|
||||
if conf.LayerNum == 1 {
|
||||
pagoda.Data[req.Cid] = 0
|
||||
pagoda.Data[conf.Tab] = 0
|
||||
} else {
|
||||
code = pb.ErrorCode_PagodaLevlErr // 挑战关卡数据不匹配
|
||||
return
|
||||
@ -86,7 +86,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
|
||||
}
|
||||
}
|
||||
|
||||
pagoda.Data[req.Cid] += 1
|
||||
pagoda.Data[conf.Tab] += 1
|
||||
|
||||
mapData["pagodaId"] = pagoda.PagodaId
|
||||
mapData["type"] = pagoda.Type
|
||||
|
@ -221,7 +221,7 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
|
||||
nextProficiency := this.module.configure.GetSmithyProficileData(req.ReelId, stove.Data[req.ReelId].Lv+1)
|
||||
if nextProficiency != nil && nextProficiency.Proficiency <= stove.Data[req.ReelId].Value { // 提升熟练度
|
||||
stove.Data[req.ReelId].Lv += 1
|
||||
stove.Data[req.ReelId].Value = 0
|
||||
|
||||
// 校验是否解锁了新的图纸
|
||||
if nextProficiency.Type == comm.SmithyReelType3 {
|
||||
stove.Data[nextProficiency.Value1] = &pb.Mastery{
|
||||
|
@ -203,9 +203,6 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
//判断是否配置了通知module
|
||||
if len(curTaskConf.Module) == 0 {
|
||||
// 发奖
|
||||
if code = this.module.DispenseRes(session, curTaskConf.Reword, true); code != pb.ErrorCode_Success {
|
||||
this.module.Error("资源发放",
|
||||
@ -216,7 +213,8 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
log.Field{Key: "code", Value: code},
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
||||
//判断是否配置了通知module
|
||||
for _, m := range curTaskConf.Module {
|
||||
i, err := this.service.GetModule(core.M_Modules(m))
|
||||
if err != nil {
|
||||
@ -228,7 +226,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
ic.TaskComplete(session, req.TaskId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//判断任务是否已完成
|
||||
|
@ -273,10 +273,8 @@ func (this *ModelWorldtask) taskFinish(session comm.IUserSession, groupId, taskI
|
||||
return
|
||||
}
|
||||
|
||||
//判断是否配置了通知module
|
||||
if len(curTaskConf.Module) == 0 {
|
||||
this.moduleWorldtask.DispenseRes(session, curTaskConf.Reword, true)
|
||||
} else {
|
||||
//判断是否配置了通知module
|
||||
for _, m := range curTaskConf.Module {
|
||||
i, err := this.service.GetModule(core.M_Modules(m))
|
||||
if err != nil {
|
||||
@ -288,5 +286,5 @@ func (this *ModelWorldtask) taskFinish(session comm.IUserSession, groupId, taskI
|
||||
ic.TaskComplete(session, taskId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user