上传做虫子通关奖励
This commit is contained in:
parent
91a925e04f
commit
548385a562
@ -14,6 +14,8 @@ func (this *apiComp) PassLevel(session comm.IUserSession, req *pb.CatchbugsPassL
|
|||||||
var (
|
var (
|
||||||
conf *cfg.GameCatchbugStageData
|
conf *cfg.GameCatchbugStageData
|
||||||
info *pb.DBCatchBugs
|
info *pb.DBCatchBugs
|
||||||
|
card int32
|
||||||
|
ok bool
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
if errdata = this.PassLevelCheck(session, req); errdata != nil {
|
if errdata = this.PassLevelCheck(session, req); errdata != nil {
|
||||||
@ -36,6 +38,14 @@ func (this *apiComp) PassLevel(session comm.IUserSession, req *pb.CatchbugsPassL
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, v := range req.Card {
|
||||||
|
if _, ok = info.Books[v]; !ok {
|
||||||
|
card++
|
||||||
|
info.Books[v]++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
info.Integral += conf.Points
|
info.Integral += conf.Points
|
||||||
info.Accruedintegral += conf.Points
|
info.Accruedintegral += conf.Points
|
||||||
info.Level[req.Level] = true
|
info.Level[req.Level] = true
|
||||||
@ -44,6 +54,6 @@ func (this *apiComp) PassLevel(session comm.IUserSession, req *pb.CatchbugsPassL
|
|||||||
"accruedintegral": info.Accruedintegral,
|
"accruedintegral": info.Accruedintegral,
|
||||||
"level": info.Level,
|
"level": info.Level,
|
||||||
})
|
})
|
||||||
session.SendMsg(string(this.module.GetType()), "passlevel", &pb.CatchbugsPassLevelResp{Level: req.Level, Integral: info.Integral})
|
session.SendMsg(string(this.module.GetType()), "passlevel", &pb.CatchbugsPassLevelResp{Level: req.Level, Integral: info.Integral, Accruedintegral: info.Accruedintegral, Card: card})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user