bug修复
This commit is contained in:
parent
43a27e9eba
commit
7bd781f032
@ -53,12 +53,17 @@ func GetOrderNByLv(lv int) (int, error) {
|
||||
|
||||
// 获取升级经验
|
||||
func GetLevUpExp(lv int) (int, int) {
|
||||
data, err := gamedata.GetDataByIntKey(CFG_NAME, lv)
|
||||
if err != nil {
|
||||
log.Debug("UserDataCfg GetLevUpExp lv:%v not found", lv)
|
||||
return 0, 0
|
||||
Exp := 0
|
||||
PExp := 0
|
||||
for i := 1; i <= lv; i++ {
|
||||
data, err := gamedata.GetDataByIntKey(CFG_NAME, i)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
Exp += gamedata.GetIntValue(data, "Exp")
|
||||
PExp += gamedata.GetIntValue(data, "PExp")
|
||||
}
|
||||
return gamedata.GetIntValue(data, "Exp"), gamedata.GetIntValue(data, "PExp")
|
||||
return Exp, PExp
|
||||
}
|
||||
|
||||
// 获取能量回复时间
|
||||
|
||||
Loading…
Reference in New Issue
Block a user