From 0f2ede8df05fb91b317feec4c448700ae402f5b0 Mon Sep 17 00:00:00 2001 From: chenyueqi Date: Wed, 17 Mar 2021 17:02:37 +0800 Subject: [PATCH] 海港贸易季委托任务奖励计算错误 --- src/actions/SeaportAction.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/actions/SeaportAction.lua b/src/actions/SeaportAction.lua index dff2bdf..db232c8 100644 --- a/src/actions/SeaportAction.lua +++ b/src/actions/SeaportAction.lua @@ -142,6 +142,12 @@ function _M.taskRpc(agent, data) local seaport = role:getProperty("seaport") local data = TaskCsv[taskId][level] + if data.phase == 2 then + local openTime = tonumber(redisproxy:hget("autoincrement_set", "seaportTime0")) or 0 + local nowTime = skynet.timex() + if nowTime < (openTime + 86400) or nowTime > (openTime + 172800) then return 9 end + end + if oper == 1 then -- 开始委托 if team == "" then return 3 end local conditions = data.condition:toTableArray(true) @@ -197,8 +203,7 @@ function _M.taskRpc(agent, data) local carbonCsv = csvdb["idle_battleCsv"] local expCarbonId = role:getProperty("hangInfo").expCarbonId - local coidCarbonId = role:getProperty("hangInfo").carbonId - if not carbonCsv[expCarbonId] or not carbonCsv[coidCarbonId] then return 7 end + if not carbonCsv[expCarbonId] then return 7 end local totalCoef = 0 for _, heroId in ipairs(collect.team:toArray(true,"=")) do @@ -215,8 +220,8 @@ function _M.taskRpc(agent, data) bigSuccess = true end - local money = math.ceil(carbonCsv[coidCarbonId].money / 5 * data.time * carbonCsv[coidCarbonId].money_clear) - local exp = math.ceil(carbonCsv[expCarbonId].exp / 5 * data.time * carbonCsv[expCarbonId].exp_clear) + local money = math.ceil(carbonCsv[expCarbonId].money / 5 * data.time * data.money_clear) + local exp = math.ceil(carbonCsv[expCarbonId].exp / 5 * data.time * data.exp_clear) local itemReward = data.item_clear_special:toNumMap() itemReward[ItemId.Gold] = (itemReward[ItemId.Gold] or 0) + money itemReward[ItemId.Exp] = (itemReward[ItemId.Exp] or 0) + exp -- libgit2 0.21.2