Commit 04c7448f2f2d0077d9accaab20ead0a116755eac
1 parent
ae9a74b5
fix rune up
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
src/actions/CarAction.lua
... | ... | @@ -107,9 +107,9 @@ function _M.runeUpRpc( agent, data ) |
107 | 107 | local runeData = runeSet[id] |
108 | 108 | if not runeData then return 5 end |
109 | 109 | |
110 | - local maxLv = #csvdb["rune_buildCsv"] | |
111 | - if level >= maxLv then return 6 end | |
112 | - local lvData = csvdb["rune_buildCsv"][level+1] | |
110 | + local maxLv = table.nums(csvdb["rune_buildCsv"])-1 | |
111 | + if level > maxLv then return 6 end | |
112 | + local lvData = csvdb["rune_buildCsv"][level] | |
113 | 113 | local cost = lvData.cost:toNumMap() |
114 | 114 | if not role:checkItemEnough(cost) then |
115 | 115 | return 7 | ... | ... |