Commit 7d0fd1f3601598497971ef93345467248598ffc1
Merge branch 'cn/develop' into cn/publish/zhaolu
# Conflicts: # src/csvdata
Showing
2 changed files
with
11 additions
and
6 deletions
Show diff stats
src/actions/RoleAction.lua
| @@ -978,16 +978,21 @@ function _M.unLockStoryBookRpc(agent, data) | @@ -978,16 +978,21 @@ function _M.unLockStoryBookRpc(agent, data) | ||
| 978 | 978 | ||
| 979 | local storyId = msg.id | 979 | local storyId = msg.id |
| 980 | local storyBookData = csvdb["story_bookCsv"][storyId] | 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 | local storyStatus = role:getProperty("storyB") | 983 | local storyStatus = role:getProperty("storyB") |
| 984 | - if storyStatus[storyId] and storyStatus[storyId].s then return end --不需要解锁 | 984 | + |
| 985 | + --不需要解锁 | ||
| 986 | + if storyStatus[storyId] and storyStatus[storyId].s then | ||
| 987 | + SendPacket(actionCodes.Role_unLockStoryBookRpc, '') | ||
| 988 | + return true | ||
| 989 | + end | ||
| 985 | 990 | ||
| 986 | if storyBookData.lockItem ~= "free" then | 991 | if storyBookData.lockItem ~= "free" then |
| 987 | local cost = storyBookData.lockItem:toNumMap() | 992 | 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 | 993 | + if not cost or not next(cost) then return 2 end |
| 994 | + if not role:checkItemEnough(cost) then return 3 end -- 消耗品不足 | ||
| 995 | + if not role:costItems(cost, {log = {desc = "unlockStory", int1 = storyId}}) then return 4 end | ||
| 991 | end | 996 | end |
| 992 | 997 | ||
| 993 | -- 解锁 | 998 | -- 解锁 |