Commit d19b2af368487ba948531573110f6e719d79bbb3

Authored by liuzujun
1 parent b021e351

活动免费礼包判断活动是否开启

Showing 2 changed files with 8 additions and 1 deletions   Show diff stats
src/actions/StoreAction.lua
@@ -232,6 +232,13 @@ function _M.getFreeChestRpc(agent, data) @@ -232,6 +232,13 @@ function _M.getFreeChestRpc(agent, data)
232 local config = csvdb["shop_rechargeCsv"][id] 232 local config = csvdb["shop_rechargeCsv"][id]
233 if not config then return end 233 if not config then return end
234 234
  235 + --判断是否是活动商品
  236 + if config.activity_id ~= 0 then
  237 + local actCfg = csvdb["activity_ctrlCsv"][config.activity_id]
  238 + if not actCfg then return 2 end
  239 + if not role.activity:isOpenById(config.activity_id, "ActShopGoods") then return 3 end
  240 + end
  241 +
235 local rechargeRecord = role.storeData:getProperty("payR") 242 local rechargeRecord = role.storeData:getProperty("payR")
236 local getCount = (rechargeRecord[id] or 0) 243 local getCount = (rechargeRecord[id] or 0)
237 if getCount >= config.limit then 244 if getCount >= config.limit then
1 -Subproject commit 516f9d34ccb5dfc9a5fd40c251f3229e5a4651e6 1 +Subproject commit c820a5807bf24a342c40fcbb5def8a31899cc664