This commit is contained in:
liwei1dao 2023-03-31 21:48:12 +08:00
commit 43342582a6
5 changed files with 35 additions and 39 deletions

View File

@ -39,9 +39,9 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChalleng
return return
} }
if v, ok := pagoda.Data[req.Cid]; !ok { if v, ok := pagoda.Data[conf.Tab]; !ok {
if conf.LayerNum == 1 { if conf.LayerNum == 1 {
pagoda.Data[req.Cid] = 0 pagoda.Data[conf.Tab] = 0
} else { } else {
code = pb.ErrorCode_PagodaLevlErr // 挑战关卡数据不匹配 code = pb.ErrorCode_PagodaLevlErr // 挑战关卡数据不匹配
return return

View File

@ -47,9 +47,9 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
return return
} }
if v, ok := pagoda.Data[req.Cid]; !ok { if v, ok := pagoda.Data[conf.Tab]; !ok {
if conf.LayerNum == 1 { if conf.LayerNum == 1 {
pagoda.Data[req.Cid] = 0 pagoda.Data[conf.Tab] = 0
} else { } else {
code = pb.ErrorCode_PagodaLevlErr // 挑战关卡数据不匹配 code = pb.ErrorCode_PagodaLevlErr // 挑战关卡数据不匹配
return 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["pagodaId"] = pagoda.PagodaId
mapData["type"] = pagoda.Type mapData["type"] = pagoda.Type

View File

@ -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) nextProficiency := this.module.configure.GetSmithyProficileData(req.ReelId, stove.Data[req.ReelId].Lv+1)
if nextProficiency != nil && nextProficiency.Proficiency <= stove.Data[req.ReelId].Value { // 提升熟练度 if nextProficiency != nil && nextProficiency.Proficiency <= stove.Data[req.ReelId].Value { // 提升熟练度
stove.Data[req.ReelId].Lv += 1 stove.Data[req.ReelId].Lv += 1
stove.Data[req.ReelId].Value = 0
// 校验是否解锁了新的图纸 // 校验是否解锁了新的图纸
if nextProficiency.Type == comm.SmithyReelType3 { if nextProficiency.Type == comm.SmithyReelType3 {
stove.Data[nextProficiency.Value1] = &pb.Mastery{ stove.Data[nextProficiency.Value1] = &pb.Mastery{

View File

@ -203,9 +203,6 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
) )
return return
} }
//判断是否配置了通知module
if len(curTaskConf.Module) == 0 {
// 发奖 // 发奖
if code = this.module.DispenseRes(session, curTaskConf.Reword, true); code != pb.ErrorCode_Success { if code = this.module.DispenseRes(session, curTaskConf.Reword, true); code != pb.ErrorCode_Success {
this.module.Error("资源发放", this.module.Error("资源发放",
@ -216,7 +213,8 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
log.Field{Key: "code", Value: code}, log.Field{Key: "code", Value: code},
) )
} }
} else {
//判断是否配置了通知module
for _, m := range curTaskConf.Module { for _, m := range curTaskConf.Module {
i, err := this.service.GetModule(core.M_Modules(m)) i, err := this.service.GetModule(core.M_Modules(m))
if err != nil { if err != nil {
@ -228,7 +226,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
ic.TaskComplete(session, req.TaskId) ic.TaskComplete(session, req.TaskId)
} }
} }
}
} }
//判断任务是否已完成 //判断任务是否已完成

View File

@ -273,10 +273,8 @@ func (this *ModelWorldtask) taskFinish(session comm.IUserSession, groupId, taskI
return return
} }
//判断是否配置了通知module
if len(curTaskConf.Module) == 0 {
this.moduleWorldtask.DispenseRes(session, curTaskConf.Reword, true) this.moduleWorldtask.DispenseRes(session, curTaskConf.Reword, true)
} else { //判断是否配置了通知module
for _, m := range curTaskConf.Module { for _, m := range curTaskConf.Module {
i, err := this.service.GetModule(core.M_Modules(m)) i, err := this.service.GetModule(core.M_Modules(m))
if err != nil { if err != nil {
@ -288,5 +286,5 @@ func (this *ModelWorldtask) taskFinish(session comm.IUserSession, groupId, taskI
ic.TaskComplete(session, taskId) ic.TaskComplete(session, taskId)
} }
} }
}
} }