Commit 15cba0bfbdf84f2752ba8d0aec3e141ee023156a
1 parent
f20cc9ca
修改天赋升级消耗
Showing
2 changed files
with
4 additions
and
9 deletions
Show diff stats
src/actions/HeroAction.lua
... | ... | @@ -60,8 +60,8 @@ function _M.wakeRpc(agent, data) |
60 | 60 | local typ = hero:getProperty("type") |
61 | 61 | local wakeData = csvdb["unit_wakeCsv"][hero:getProperty("wakeL")] |
62 | 62 | if not wakeData then return 3 end |
63 | - | |
64 | - local cost = {[typ] = wakeData.costFigment,[hero:getStampId()] = wakeData.costMaterial} | |
63 | + local costMaterial = wakeData.costMaterial:toArray(true,"=") | |
64 | + local cost = {[typ] = wakeData.costFigment,[globalCsv.unit_wake_cost[hero:getCamp()][costMaterial[1]]] = costMaterial[2]} | |
65 | 65 | if not role:checkItemEnough(cost) then |
66 | 66 | return 4 |
67 | 67 | end | ... | ... |
src/models/Hero.lua
... | ... | @@ -87,13 +87,8 @@ function Hero:data() |
87 | 87 | } |
88 | 88 | end |
89 | 89 | |
90 | -function Hero:getStampId() | |
91 | - local typs = { | |
92 | - [1]=50, | |
93 | - [2]=51, | |
94 | - [3]=52, | |
95 | - } | |
96 | - return typs[csvdb["unitCsv"][self:getProperty("type")].camp] | |
90 | +function Hero:getCamp() | |
91 | + return self:getProperty("type")].camp | |
97 | 92 | end |
98 | 93 | |
99 | 94 | return Hero |
100 | 95 | \ No newline at end of file | ... | ... |