Commit 8a01a3ae536137e83456b4e4674f3ac1986c0d16

Authored by zhouhaihai
1 parent a1d09d22

bug

Showing 1 changed file with 8 additions and 5 deletions   Show diff stats
src/actions/RoleAction.lua
... ... @@ -320,18 +320,21 @@ function _M.storyBookRewardRpc(agent, data)
320 320 local storyBookData = csvdb["story_bookCsv"][storyId]
321 321 if not storyBookData then return end
322 322 local storyStatus = role:getProperty("storyB")
323   - if not storyStatus[id] or not storyStatus[id].s or storyStatus[id].s ~= 1 then
  323 + if not storyStatus[storyId] or not storyStatus[storyId].s or storyStatus[storyId].s ~= 1 then
324 324 return
325 325 end
326   -
327 326 -- 获取奖励
328   - storyStatus[id].s = -1
329   - self:setProperty("storyB", storyBookStatus) -- 统一写入数据库
330   - self:changeUpdates({{ type = "storyB", field = id, value = storyStatus[id] }})
  327 + storyStatus[storyId].s = -1
  328 + role:setProperty("storyB", storyBookStatus) -- 统一写入数据库
  329 + role:changeUpdates({{ type = "storyB", field = storyId, value = storyStatus[storyId] }})
331 330 local reward = role:award(storyBookData.gift)
332 331 SendPacket(actionCodes.Role_storyBookRewardRpc, MsgPack.pack({reward = reward}))
333 332 return true
334 333 end
335 334  
  335 +function _M.unLockStoryBookRpc(agent, data)
  336 +
  337 +end
  338 +
336 339  
337 340 return _M
338 341 \ No newline at end of file
... ...