Commit 4c0df8d0b0de326306031defaca8bc090ebfbc95
Merge branch 'tr/bugfix-qa' into tr/bugfix
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 | 142 | local seaport = role:getProperty("seaport") |
| 143 | 143 | |
| 144 | 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 | 151 | if oper == 1 then -- 开始委托 |
| 146 | 152 | if team == "" then return 3 end |
| 147 | 153 | local conditions = data.condition:toTableArray(true) |
| ... | ... | @@ -197,8 +203,7 @@ function _M.taskRpc(agent, data) |
| 197 | 203 | |
| 198 | 204 | local carbonCsv = csvdb["idle_battleCsv"] |
| 199 | 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 | 208 | local totalCoef = 0 |
| 204 | 209 | for _, heroId in ipairs(collect.team:toArray(true,"=")) do |
| ... | ... | @@ -215,8 +220,8 @@ function _M.taskRpc(agent, data) |
| 215 | 220 | bigSuccess = true |
| 216 | 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 | 225 | local itemReward = data.item_clear_special:toNumMap() |
| 221 | 226 | itemReward[ItemId.Gold] = (itemReward[ItemId.Gold] or 0) + money |
| 222 | 227 | itemReward[ItemId.Exp] = (itemReward[ItemId.Exp] or 0) + exp | ... | ... |