上传等级变化属性调整
This commit is contained in:
parent
dd0e4ed581
commit
05252d6b08
@ -71,6 +71,10 @@ func (this *apiComp) AddExp(session comm.IUserSession, req *pb.ExclusiveAddExpRe
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
info.Property = make(map[int32]int32)
|
||||||
|
for _, v := range lvconf.Attribute {
|
||||||
|
info.Property[v.A] = v.N
|
||||||
|
}
|
||||||
if info.Lv >= ranconf.Lvmax { //当前阶段最大等级
|
if info.Lv >= ranconf.Lvmax { //当前阶段最大等级
|
||||||
info.Exp = lvconf.Needexp
|
info.Exp = lvconf.Needexp
|
||||||
break
|
break
|
||||||
@ -78,10 +82,6 @@ func (this *apiComp) AddExp(session comm.IUserSession, req *pb.ExclusiveAddExpRe
|
|||||||
if lvconf.Needexp <= info.Exp {
|
if lvconf.Needexp <= info.Exp {
|
||||||
info.Lv++
|
info.Lv++
|
||||||
info.Exp -= lvconf.Needexp
|
info.Exp -= lvconf.Needexp
|
||||||
info.Property = make(map[int32]int32)
|
|
||||||
for _, v := range lvconf.Attribute {
|
|
||||||
info.Property[v.A] = v.N
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user