上传等级变化属性调整

This commit is contained in:
liwei1dao 2024-02-29 11:19:54 +08:00
parent dd0e4ed581
commit 05252d6b08

View File

@ -71,6 +71,10 @@ func (this *apiComp) AddExp(session comm.IUserSession, req *pb.ExclusiveAddExpRe
}
return
}
info.Property = make(map[int32]int32)
for _, v := range lvconf.Attribute {
info.Property[v.A] = v.N
}
if info.Lv >= ranconf.Lvmax { //当前阶段最大等级
info.Exp = lvconf.Needexp
break
@ -78,10 +82,6 @@ func (this *apiComp) AddExp(session comm.IUserSession, req *pb.ExclusiveAddExpRe
if lvconf.Needexp <= info.Exp {
info.Lv++
info.Exp -= lvconf.Needexp
info.Property = make(map[int32]int32)
for _, v := range lvconf.Attribute {
info.Property[v.A] = v.N
}
} else {
break
}