上传剧情奖励bug
This commit is contained in:
parent
2d3666e0ac
commit
47d09224a0
@ -28,6 +28,7 @@ func (this *apiComp) Complete(session comm.IUserSession, req *pb.StorylineComple
|
|||||||
ftime int64
|
ftime int64
|
||||||
ok bool
|
ok bool
|
||||||
iswin bool
|
iswin bool
|
||||||
|
isfish bool
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
if errdata = this.CompleteCheck(session, req); errdata != nil {
|
if errdata = this.CompleteCheck(session, req); errdata != nil {
|
||||||
@ -70,6 +71,10 @@ func (this *apiComp) Complete(session comm.IUserSession, req *pb.StorylineComple
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if item.Level[conf.Onlevel] != 0 {
|
||||||
|
isfish = true
|
||||||
|
}
|
||||||
|
|
||||||
//前置判断
|
//前置判断
|
||||||
if len(conf.Onlevelstory) == 2 && item.Level[conf.Onlevelstory[0]] == conf.Onlevelstory[1] {
|
if len(conf.Onlevelstory) == 2 && item.Level[conf.Onlevelstory[0]] == conf.Onlevelstory[1] {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
@ -165,6 +170,7 @@ func (this *apiComp) Complete(session comm.IUserSession, req *pb.StorylineComple
|
|||||||
item.Level[req.Level] = 1
|
item.Level[req.Level] = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !isfish {
|
||||||
if errdata = this.module.DispenseRes(session, conf.Reward, true); errdata != nil {
|
if errdata = this.module.DispenseRes(session, conf.Reward, true); errdata != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -176,7 +182,8 @@ func (this *apiComp) Complete(session comm.IUserSession, req *pb.StorylineComple
|
|||||||
N: v.N,
|
N: v.N,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
item.Level[req.Level] = 1
|
}
|
||||||
|
|
||||||
this.module.modeltask.Change(session.GetUserId(), map[string]interface{}{
|
this.module.modeltask.Change(session.GetUserId(), map[string]interface{}{
|
||||||
"item": info.Item,
|
"item": info.Item,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user