条件判断
This commit is contained in:
parent
a8a900523b
commit
9b0ae604f7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user