Commit dae24d5a084baf28eae8d6ca63e9357bde5098ef

Authored by 熊润斐
2 parents 15127116 18478207

Merge branch 'tr/develop' into tr/bugfix-qa

src/actions/SeaportAction.lua
... ... @@ -139,6 +139,7 @@ function _M.taskRpc(agent, data)
139 139 if not TaskCsv[taskId] or not TaskCsv[taskId][level] then return 1 end
140 140  
141 141 local reward, change = {}, {}
  142 + local heroFaithMap = {}
142 143 local seaport = role:getProperty("seaport")
143 144  
144 145 local data = TaskCsv[taskId][level]
... ... @@ -211,6 +212,7 @@ function _M.taskRpc(agent, data)
211 212 if hero then
212 213 totalCoef = totalCoef + getHeroCoef(hero, data.success)
213 214 hero:addHeroFaith(data.trust)
  215 + heroFaithMap[heroId] = hero:getProperty("faith")
214 216 end
215 217 end
216 218  
... ... @@ -241,7 +243,10 @@ function _M.taskRpc(agent, data)
241 243  
242 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 250 return true
246 251 end
247 252  
... ...
src/models/RolePlugin.lua
... ... @@ -1268,7 +1268,6 @@ function RolePlugin.bind(Role)
1268 1268  
1269 1269 local carbonCsv = csvdb["idle_battleCsv"]
1270 1270 local expCarbonId = self:getProperty("hangInfo").expCarbonId
1271   - local coidCarbonId = self:getProperty("hangInfo").carbonId
1272 1271 local taskCsv = csvdb["seaport_taskCsv"]
1273 1272 local endTime = openTime0 + 86400 * 2
1274 1273 for slot, set in pairs(taskCsv) do
... ... @@ -1279,7 +1278,7 @@ function RolePlugin.bind(Role)
1279 1278 local teams = collect[slot].team
1280 1279 local time = collect[slot].time
1281 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 1283 local totalCoef = 0
1285 1284 for _, heroId in ipairs(teams:toArray(true,"=")) do
... ... @@ -1296,8 +1295,8 @@ function RolePlugin.bind(Role)
1296 1295 bigSuccess = true
1297 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 1300 local itemReward = data.item_clear_special:toNumMap()
1302 1301 itemReward[ItemId.Gold] = (itemReward[ItemId.Gold] or 0) + money
1303 1302 itemReward[ItemId.Exp] = (itemReward[ItemId.Exp] or 0) + exp
... ... @@ -1350,7 +1349,7 @@ function RolePlugin.bind(Role)
1350 1349 end
1351 1350 end)
1352 1351 result[idx] = {}
1353   - for i,v in ipairs(temp) do
  1352 + for i,v in pairs(temp) do
1354 1353 if v then
1355 1354 result[idx][i] = tonumber(v)
1356 1355 end
... ...
src/models/RoleTask.lua
... ... @@ -191,7 +191,7 @@ local AchievListener = {
191 191 [TaskType.OverOderTask] = {{14}},
192 192 [TaskType.FoodSellGold] = {{15, f("count")}},
193 193 [TaskType.DinerPopular] = {{16, f("count")}},
194   - [TaskType.TowerPass] = {{17, f("count"), f("type")}},
  194 + [TaskType.TowerPass] = {{17, f("level")}},
195 195 [TaskType.OpenBox] = {{18, f("count")}},
196 196 [TaskType.DinerLevelUp] = {{19, f("level"), f("type")}},
197 197 [TaskType.DinerTalentUp] = {{20, 1, f("type")}},
... ... @@ -493,6 +493,7 @@ function RoleTask.bind(Role)
493 493 [6] = true,
494 494 [7] = true,
495 495 [16] = true,
  496 + [17] = true,
496 497 [19] = true,
497 498 [22] = true,
498 499 [23] = true,
... ...