From cec4aa73e1bd8ab2e14be795cdfb44e6173fadb7 Mon Sep 17 00:00:00 2001 From: zqj <582132116@qq.com> Date: Thu, 30 Dec 2021 19:03:21 +0800 Subject: [PATCH] fix: unLockStoryBookRpc 错误返回值 return 1 2 3 --- src/actions/RoleAction.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index 3ca82a6..70c402d 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -978,16 +978,16 @@ function _M.unLockStoryBookRpc(agent, data) local storyId = msg.id local storyBookData = csvdb["story_bookCsv"][storyId] - if not storyBookData or storyBookData.lockItem == "" then return end -- 不能解锁 + if not storyBookData or storyBookData.lockItem == "" then return 1 end -- 不能解锁 local storyStatus = role:getProperty("storyB") - if storyStatus[storyId] and storyStatus[storyId].s then return end --不需要解锁 + if storyStatus[storyId] and storyStatus[storyId].s then return 2 end --不需要解锁 if storyBookData.lockItem ~= "free" then local cost = storyBookData.lockItem:toNumMap() - if not cost or not next(cost) then return end - if not role:checkItemEnough(cost) then return end -- 消耗品不足 - if not role:costItems(cost, {log = {desc = "unlockStory", int1 = storyId}}) then return end + if not cost or not next(cost) then return 3 end + if not role:checkItemEnough(cost) then return 4 end -- 消耗品不足 + if not role:costItems(cost, {log = {desc = "unlockStory", int1 = storyId}}) then return 5 end end -- 解锁 -- libgit2 0.21.2