diff --git a/src/actions/StoreAction.lua b/src/actions/StoreAction.lua index e32aadb..b7a9428 100644 --- a/src/actions/StoreAction.lua +++ b/src/actions/StoreAction.lua @@ -49,14 +49,10 @@ function _M.dailyBuyRpc(agent , data) if math.illegalNum(count, 1, (dataSet.limit == 0 and math.huge or dataSet.limit - (dailySDC[id] or 0))) then return 1 end local cost = dataSet.cost - if dataSet.type == 0 then - local dailySDD = role.dailyData:getProperty("dailySDD") - if dailySDD[id] then -- 折扣 - cost = math.ceil(cost * (1 - dataSet.disount / 100)) - end - elseif dataSet.type == 1 then - else - return 3 + + local dailySDD = role.dailyData:getProperty("dailySDD") + if dailySDD[id] then -- 折扣 + cost = math.ceil(cost * (1 - dataSet.disount / 100)) end if not role:costDiamond({count = cost * count, log = {desc = "dailyShop", int1 = id, int2 = count}}) then diff --git a/src/models/Daily.lua b/src/models/Daily.lua index 38adb06..cf5667b 100644 --- a/src/models/Daily.lua +++ b/src/models/Daily.lua @@ -64,7 +64,7 @@ function Daily:refreshDailyData(notify) local dailySDD = {} local sddPool = {} for id, data in pairs(csvdb["shop_diamondCsv"]) do - if data.type == 0 and data.disount ~= 0 then + if data.disount ~= 0 then table.insert(sddPool, id) end end -- libgit2 0.21.2