Commit cec4aa73e1bd8ab2e14be795cdfb44e6173fadb7
1 parent
ccac1eaa
fix: unLockStoryBookRpc 错误返回值 return 1 2 3
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
src/actions/RoleAction.lua
| ... | ... | @@ -978,16 +978,16 @@ function _M.unLockStoryBookRpc(agent, data) |
| 978 | 978 | |
| 979 | 979 | local storyId = msg.id |
| 980 | 980 | local storyBookData = csvdb["story_bookCsv"][storyId] |
| 981 | - if not storyBookData or storyBookData.lockItem == "" then return end -- 不能解锁 | |
| 981 | + if not storyBookData or storyBookData.lockItem == "" then return 1 end -- 不能解锁 | |
| 982 | 982 | |
| 983 | 983 | local storyStatus = role:getProperty("storyB") |
| 984 | - if storyStatus[storyId] and storyStatus[storyId].s then return end --不需要解锁 | |
| 984 | + if storyStatus[storyId] and storyStatus[storyId].s then return 2 end --不需要解锁 | |
| 985 | 985 | |
| 986 | 986 | if storyBookData.lockItem ~= "free" then |
| 987 | 987 | local cost = storyBookData.lockItem:toNumMap() |
| 988 | - if not cost or not next(cost) then return end | |
| 989 | - if not role:checkItemEnough(cost) then return end -- 消耗品不足 | |
| 990 | - if not role:costItems(cost, {log = {desc = "unlockStory", int1 = storyId}}) then return end | |
| 988 | + if not cost or not next(cost) then return 3 end | |
| 989 | + if not role:checkItemEnough(cost) then return 4 end -- 消耗品不足 | |
| 990 | + if not role:costItems(cost, {log = {desc = "unlockStory", int1 = storyId}}) then return 5 end | |
| 991 | 991 | end |
| 992 | 992 | |
| 993 | 993 | -- 解锁 | ... | ... |