Commit dae24d5a084baf28eae8d6ca63e9357bde5098ef
Merge branch 'tr/develop' into tr/bugfix-qa
Showing
3 changed files
with
12 additions
and
7 deletions
Show diff stats
src/actions/SeaportAction.lua
@@ -139,6 +139,7 @@ function _M.taskRpc(agent, data) | @@ -139,6 +139,7 @@ function _M.taskRpc(agent, data) | ||
139 | if not TaskCsv[taskId] or not TaskCsv[taskId][level] then return 1 end | 139 | if not TaskCsv[taskId] or not TaskCsv[taskId][level] then return 1 end |
140 | 140 | ||
141 | local reward, change = {}, {} | 141 | local reward, change = {}, {} |
142 | + local heroFaithMap = {} | ||
142 | local seaport = role:getProperty("seaport") | 143 | local seaport = role:getProperty("seaport") |
143 | 144 | ||
144 | local data = TaskCsv[taskId][level] | 145 | local data = TaskCsv[taskId][level] |
@@ -211,6 +212,7 @@ function _M.taskRpc(agent, data) | @@ -211,6 +212,7 @@ function _M.taskRpc(agent, data) | ||
211 | if hero then | 212 | if hero then |
212 | totalCoef = totalCoef + getHeroCoef(hero, data.success) | 213 | totalCoef = totalCoef + getHeroCoef(hero, data.success) |
213 | hero:addHeroFaith(data.trust) | 214 | hero:addHeroFaith(data.trust) |
215 | + heroFaithMap[heroId] = hero:getProperty("faith") | ||
214 | end | 216 | end |
215 | end | 217 | end |
216 | 218 | ||
@@ -241,7 +243,10 @@ function _M.taskRpc(agent, data) | @@ -241,7 +243,10 @@ function _M.taskRpc(agent, data) | ||
241 | 243 | ||
242 | role:updateProperty({field = "seaport", value = seaport}) | 244 | role:updateProperty({field = "seaport", value = seaport}) |
243 | 245 | ||
244 | - SendPacket(actionCodes.Seaport_taskRpc, MsgPack.pack(role:packReward(reward, change))) | 246 | + local result = role:packReward(reward, change) |
247 | + result["heroFaith"] = heroFaithMap | ||
248 | + | ||
249 | + SendPacket(actionCodes.Seaport_taskRpc, MsgPack.pack(result)) | ||
245 | return true | 250 | return true |
246 | end | 251 | end |
247 | 252 |
src/models/RolePlugin.lua
@@ -1268,7 +1268,6 @@ function RolePlugin.bind(Role) | @@ -1268,7 +1268,6 @@ function RolePlugin.bind(Role) | ||
1268 | 1268 | ||
1269 | local carbonCsv = csvdb["idle_battleCsv"] | 1269 | local carbonCsv = csvdb["idle_battleCsv"] |
1270 | local expCarbonId = self:getProperty("hangInfo").expCarbonId | 1270 | local expCarbonId = self:getProperty("hangInfo").expCarbonId |
1271 | - local coidCarbonId = self:getProperty("hangInfo").carbonId | ||
1272 | local taskCsv = csvdb["seaport_taskCsv"] | 1271 | local taskCsv = csvdb["seaport_taskCsv"] |
1273 | local endTime = openTime0 + 86400 * 2 | 1272 | local endTime = openTime0 + 86400 * 2 |
1274 | for slot, set in pairs(taskCsv) do | 1273 | for slot, set in pairs(taskCsv) do |
@@ -1279,7 +1278,7 @@ function RolePlugin.bind(Role) | @@ -1279,7 +1278,7 @@ function RolePlugin.bind(Role) | ||
1279 | local teams = collect[slot].team | 1278 | local teams = collect[slot].team |
1280 | local time = collect[slot].time | 1279 | local time = collect[slot].time |
1281 | if time + data.time <= endTime then | 1280 | if time + data.time <= endTime then |
1282 | - if not carbonCsv[expCarbonId] or not carbonCsv[coidCarbonId] then break end | 1281 | + if not carbonCsv[expCarbonId] then break end |
1283 | 1282 | ||
1284 | local totalCoef = 0 | 1283 | local totalCoef = 0 |
1285 | for _, heroId in ipairs(teams:toArray(true,"=")) do | 1284 | for _, heroId in ipairs(teams:toArray(true,"=")) do |
@@ -1296,8 +1295,8 @@ function RolePlugin.bind(Role) | @@ -1296,8 +1295,8 @@ function RolePlugin.bind(Role) | ||
1296 | bigSuccess = true | 1295 | bigSuccess = true |
1297 | end | 1296 | end |
1298 | 1297 | ||
1299 | - local money = math.ceil(carbonCsv[coidCarbonId].money / 5 * data.time * carbonCsv[coidCarbonId].money_clear) | ||
1300 | - local exp = math.ceil(carbonCsv[expCarbonId].exp / 5 * data.time * carbonCsv[expCarbonId].exp_clear) | 1298 | + local money = math.ceil(carbonCsv[expCarbonId].money / 5 * data.time * data.money_clear) |
1299 | + local exp = math.ceil(carbonCsv[expCarbonId].exp / 5 * data.time * data.exp_clear) | ||
1301 | local itemReward = data.item_clear_special:toNumMap() | 1300 | local itemReward = data.item_clear_special:toNumMap() |
1302 | itemReward[ItemId.Gold] = (itemReward[ItemId.Gold] or 0) + money | 1301 | itemReward[ItemId.Gold] = (itemReward[ItemId.Gold] or 0) + money |
1303 | itemReward[ItemId.Exp] = (itemReward[ItemId.Exp] or 0) + exp | 1302 | itemReward[ItemId.Exp] = (itemReward[ItemId.Exp] or 0) + exp |
@@ -1350,7 +1349,7 @@ function RolePlugin.bind(Role) | @@ -1350,7 +1349,7 @@ function RolePlugin.bind(Role) | ||
1350 | end | 1349 | end |
1351 | end) | 1350 | end) |
1352 | result[idx] = {} | 1351 | result[idx] = {} |
1353 | - for i,v in ipairs(temp) do | 1352 | + for i,v in pairs(temp) do |
1354 | if v then | 1353 | if v then |
1355 | result[idx][i] = tonumber(v) | 1354 | result[idx][i] = tonumber(v) |
1356 | end | 1355 | end |
src/models/RoleTask.lua
@@ -191,7 +191,7 @@ local AchievListener = { | @@ -191,7 +191,7 @@ local AchievListener = { | ||
191 | [TaskType.OverOderTask] = {{14}}, | 191 | [TaskType.OverOderTask] = {{14}}, |
192 | [TaskType.FoodSellGold] = {{15, f("count")}}, | 192 | [TaskType.FoodSellGold] = {{15, f("count")}}, |
193 | [TaskType.DinerPopular] = {{16, f("count")}}, | 193 | [TaskType.DinerPopular] = {{16, f("count")}}, |
194 | - [TaskType.TowerPass] = {{17, f("count"), f("type")}}, | 194 | + [TaskType.TowerPass] = {{17, f("level")}}, |
195 | [TaskType.OpenBox] = {{18, f("count")}}, | 195 | [TaskType.OpenBox] = {{18, f("count")}}, |
196 | [TaskType.DinerLevelUp] = {{19, f("level"), f("type")}}, | 196 | [TaskType.DinerLevelUp] = {{19, f("level"), f("type")}}, |
197 | [TaskType.DinerTalentUp] = {{20, 1, f("type")}}, | 197 | [TaskType.DinerTalentUp] = {{20, 1, f("type")}}, |
@@ -493,6 +493,7 @@ function RoleTask.bind(Role) | @@ -493,6 +493,7 @@ function RoleTask.bind(Role) | ||
493 | [6] = true, | 493 | [6] = true, |
494 | [7] = true, | 494 | [7] = true, |
495 | [16] = true, | 495 | [16] = true, |
496 | + [17] = true, | ||
496 | [19] = true, | 497 | [19] = true, |
497 | [22] = true, | 498 | [22] = true, |
498 | [23] = true, | 499 | [23] = true, |