From 2ab0d91b2c60a2631e7532ec4581ee1674b3fa60 Mon Sep 17 00:00:00 2001 From: zhouhaihai Date: Wed, 29 Apr 2020 16:12:23 +0800 Subject: [PATCH] 每日商店删掉 type [王宇杰] --- src/actions/StoreAction.lua | 12 ++++-------- src/models/Daily.lua | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) 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