Commit 15127116c982674e48203760dc18a5abac462d74
1 parent
8864df66
海港贸易季委托任务奖励错误
Showing
1 changed file
with
9 additions
and
4 deletions
Show diff stats
src/actions/SeaportAction.lua
| @@ -142,6 +142,12 @@ function _M.taskRpc(agent, data) | @@ -142,6 +142,12 @@ function _M.taskRpc(agent, data) | ||
| 142 | local seaport = role:getProperty("seaport") | 142 | local seaport = role:getProperty("seaport") |
| 143 | 143 | ||
| 144 | local data = TaskCsv[taskId][level] | 144 | local data = TaskCsv[taskId][level] |
| 145 | + if data.phase == 2 then | ||
| 146 | + local openTime = tonumber(redisproxy:hget("autoincrement_set", "seaportTime0")) or 0 | ||
| 147 | + local nowTime = skynet.timex() | ||
| 148 | + if nowTime < (openTime + 86400) or nowTime > (openTime + 172800) then return 9 end | ||
| 149 | + end | ||
| 150 | + | ||
| 145 | if oper == 1 then -- 开始委托 | 151 | if oper == 1 then -- 开始委托 |
| 146 | if team == "" then return 3 end | 152 | if team == "" then return 3 end |
| 147 | local conditions = data.condition:toTableArray(true) | 153 | local conditions = data.condition:toTableArray(true) |
| @@ -197,8 +203,7 @@ function _M.taskRpc(agent, data) | @@ -197,8 +203,7 @@ function _M.taskRpc(agent, data) | ||
| 197 | 203 | ||
| 198 | local carbonCsv = csvdb["idle_battleCsv"] | 204 | local carbonCsv = csvdb["idle_battleCsv"] |
| 199 | local expCarbonId = role:getProperty("hangInfo").expCarbonId | 205 | local expCarbonId = role:getProperty("hangInfo").expCarbonId |
| 200 | - local coidCarbonId = role:getProperty("hangInfo").carbonId | ||
| 201 | - if not carbonCsv[expCarbonId] or not carbonCsv[coidCarbonId] then return 7 end | 206 | + if not carbonCsv[expCarbonId] then return 7 end |
| 202 | 207 | ||
| 203 | local totalCoef = 0 | 208 | local totalCoef = 0 |
| 204 | for _, heroId in ipairs(collect.team:toArray(true,"=")) do | 209 | for _, heroId in ipairs(collect.team:toArray(true,"=")) do |
| @@ -215,8 +220,8 @@ function _M.taskRpc(agent, data) | @@ -215,8 +220,8 @@ function _M.taskRpc(agent, data) | ||
| 215 | bigSuccess = true | 220 | bigSuccess = true |
| 216 | end | 221 | end |
| 217 | 222 | ||
| 218 | - local money = math.ceil(carbonCsv[coidCarbonId].money / 5 * data.time * carbonCsv[coidCarbonId].money_clear) | ||
| 219 | - local exp = math.ceil(carbonCsv[expCarbonId].exp / 5 * data.time * carbonCsv[expCarbonId].exp_clear) | 223 | + local money = math.ceil(carbonCsv[expCarbonId].money / 5 * data.time * data.money_clear) |
| 224 | + local exp = math.ceil(carbonCsv[expCarbonId].exp / 5 * data.time * data.exp_clear) | ||
| 220 | local itemReward = data.item_clear_special:toNumMap() | 225 | local itemReward = data.item_clear_special:toNumMap() |
| 221 | itemReward[ItemId.Gold] = (itemReward[ItemId.Gold] or 0) + money | 226 | itemReward[ItemId.Gold] = (itemReward[ItemId.Gold] or 0) + money |
| 222 | itemReward[ItemId.Exp] = (itemReward[ItemId.Exp] or 0) + exp | 227 | itemReward[ItemId.Exp] = (itemReward[ItemId.Exp] or 0) + exp |