This commit is contained in:
meixiongfeng 2023-09-28 16:29:27 +08:00
commit cc16e92dbd

View File

@ -223,7 +223,11 @@ func (this *ModelUser) computeLevel(change *pb.UserResChangedPush) (lvchange boo
res int64
)
rewards = make([]*cfg.Gameatn, 0)
for nextLvConf = this.module.configure.GetPlayerlvConf(curLv + 1); nextLvConf != nil; {
for {
nextLvConf = this.module.configure.GetPlayerlvConf(curLv + 1)
if nextLvConf == nil {
break
}
if curExp >= int64(nextLvConf.Exp) {
curExp = curExp - int64(nextLvConf.Exp)
curLv++