From 9a6d3ed3e07b7edc0b3ccc623be7a72e779648f4 Mon Sep 17 00:00:00 2001 From: zqj <582132116@qq.com> Date: Thu, 30 Dec 2021 19:07:08 +0800 Subject: [PATCH] fix: unLockStoryBookRpc 客户端重复领取,临时解决。 --- src/actions/RoleAction.lua | 13 +++++++++---- src/csvdata | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index 70c402d..c61741f 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -981,13 +981,18 @@ function _M.unLockStoryBookRpc(agent, data) if not storyBookData or storyBookData.lockItem == "" then return 1 end -- 不能解锁 local storyStatus = role:getProperty("storyB") - if storyStatus[storyId] and storyStatus[storyId].s then return 2 end --不需要解锁 + + --不需要解锁 + if storyStatus[storyId] and storyStatus[storyId].s then + SendPacket(actionCodes.Role_unLockStoryBookRpc, '') + return true + end if storyBookData.lockItem ~= "free" then local cost = storyBookData.lockItem:toNumMap() - 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 + if not cost or not next(cost) then return 2 end + if not role:checkItemEnough(cost) then return 3 end -- 消耗品不足 + if not role:costItems(cost, {log = {desc = "unlockStory", int1 = storyId}}) then return 4 end end -- 解锁 diff --git a/src/csvdata b/src/csvdata index 3fe1beb..6883d56 160000 --- a/src/csvdata +++ b/src/csvdata @@ -1 +1 @@ -Subproject commit 3fe1beb0f0efedddb79ccfac950b8eeca98f9c91 +Subproject commit 6883d567759b8f50bf1bace2d7e53e658083fa75 -- libgit2 0.21.2