|
|
@@ -350,18 +350,19 @@ function getHeroAttrs(human, bagIndex)
|
|
|
end
|
|
|
|
|
|
function checkLevelUp(human)
|
|
|
- if human.db.lv > #RoleExcel.exp then
|
|
|
+ local maxLevel = #RoleExcel.exp
|
|
|
+ if human.db.lv > maxLevel then
|
|
|
return 0
|
|
|
end
|
|
|
|
|
|
local levelUp = 0
|
|
|
while human.db.exp > 0 do
|
|
|
local needExp = 0
|
|
|
- if human.db.lv < 200 then
|
|
|
+ if human.db.lv < maxLevel then
|
|
|
needExp = RoleExcel.exp[human.db.lv + 1].exp
|
|
|
end
|
|
|
if needExp <= human.db.exp then
|
|
|
- if human.db.lv >= #RoleExcel.exp then
|
|
|
+ if human.db.lv >= maxLevel then
|
|
|
if human.db.exp > needExp then
|
|
|
human.db.exp = needExp
|
|
|
end
|