Commit ad88ba140348dbd4e9d5873bd897a18ff8c3381d
1 parent
bab30666
工坊 bug
Showing
3 changed files
with
6 additions
and
4 deletions
Show diff stats
src/actions/AdvAction.lua
... | ... | @@ -337,7 +337,7 @@ function _M.workshopRpc(agent, data) |
337 | 337 | |
338 | 338 | role:costItems(cost) |
339 | 339 | advWs[id] = (advWs[id] or 0) + count |
340 | - role.dailyData:updateProperty({field = advWs, value = advWs}) | |
340 | + role.dailyData:updateProperty({field = "advWs", value = advWs}) | |
341 | 341 | local reward = role:award({[id] = count}) |
342 | 342 | SendPacket(actionCodes.Adv_workshopRpc, MsgPack.pack({reward = reward})) |
343 | 343 | return true | ... | ... |
src/adv/AdvTask.lua
src/models/RolePlugin.lua
... | ... | @@ -97,7 +97,7 @@ function RolePlugin.bind(Role) |
97 | 97 | count = 0 |
98 | 98 | end, |
99 | 99 | [ItemType.FuncOpen] = function() |
100 | - self:funcOpen(itemId) | |
100 | + self:funcOpen(itemId, count) | |
101 | 101 | end, |
102 | 102 | } |
103 | 103 | -- 对数量筛查 |
... | ... | @@ -597,7 +597,8 @@ function RolePlugin.bind(Role) |
597 | 597 | return self:getProperty("funcLv")[func] or 1 |
598 | 598 | end |
599 | 599 | |
600 | - function Role:funcOpen(func) | |
600 | + function Role:funcOpen(func, count) | |
601 | + count = count or 1 | |
601 | 602 | if csvdb["itemCsv"][func] and csvdb["itemCsv"][func].type == ItemType.FuncOpen then |
602 | 603 | local unlockData = csvdb["unlockCsv"][func] |
603 | 604 | if TypeIsFunc[unlockData.type] then |
... | ... | @@ -605,7 +606,7 @@ function RolePlugin.bind(Role) |
605 | 606 | self:changeUpdates({{type = "funcOpen", field = unlockData.type, value = 1}}) |
606 | 607 | else |
607 | 608 | local oldV = self:getFuncLv(unlockData.type) |
608 | - self:changeUpdates({{type = "funcLv", field = unlockData.type, value = oldV + 1}}) | |
609 | + self:changeUpdates({{type = "funcLv", field = unlockData.type, value = oldV + count}}) | |
609 | 610 | end |
610 | 611 | else |
611 | 612 | self:changeUpdates({{type = "funcOpen", field = func, value = 1}}) | ... | ... |