Commit e0290d8e43601632d6cda7fe8fb185518cd934c7
1 parent
53b4b8bd
修改引导, 抽卡阶段奖励修改
Showing
3 changed files
with
19 additions
and
14 deletions
Show diff stats
src/actions/HangAction.lua
... | ... | @@ -258,6 +258,7 @@ function _M.endBattleRpc(agent, data) |
258 | 258 | role:finishGuide(5) |
259 | 259 | elseif carbonId == 10102 then |
260 | 260 | role:finishGuide(8) |
261 | + role:saveGuide(9, 2) | |
261 | 262 | elseif carbonId == 10103 then |
262 | 263 | role:finishGuide(9) |
263 | 264 | elseif carbonId == 10220 then |
... | ... | @@ -272,8 +273,13 @@ function _M.endBattleRpc(agent, data) |
272 | 273 | end |
273 | 274 | local nextCarbonId = role:getNextCarbonId(carbonId) |
274 | 275 | -- 设置挂机关卡 |
275 | - if hangInfo.carbonId < nextCarbonId then | |
276 | + if isWin and hangInfo.carbonId < nextCarbonId then | |
276 | 277 | hangInfo.carbonId = nextCarbonId |
278 | + local cfg = csvdb["idle_battleCsv"][nextCarbonId] | |
279 | + if cfg then | |
280 | + hangInfo.bossTime = skynet.timex() + cfg.idle_time | |
281 | + print(hangInfo.bossTime) | |
282 | + end | |
277 | 283 | end |
278 | 284 | role:updateProperty({field = "hangInfo", value = hangInfo}) |
279 | 285 | ... | ... |
src/actions/HeroAction.lua
... | ... | @@ -902,19 +902,18 @@ function _M.drawHeroRpc(agent, data) |
902 | 902 | if drawCardReward == "" then |
903 | 903 | local id = math.randWeight(csvdb["build_giftCsv"], "pool_1") |
904 | 904 | |
905 | - local r = {} | |
905 | + local r,change = {} | |
906 | 906 | local itemData = csvdb["itemCsv"][id] |
907 | - if itemData.type == ItemType.Hero and role:isHaveHero(itemData.id - ItemStartId.Hero) then | |
908 | - local fragId = itemData.id - ItemStartId.Hero | |
909 | - local heroData = csvdb["unitCsv"][fragId] | |
910 | - local count = globalCsv.draw_unit_tofragment[heroData.rare] | |
911 | - role:award({[fragId] = count}, {log = {desc = "drawHeroExtraReward"}}) | |
912 | - r = {id = fragId, count = count, from = id, fcount = 1} | |
913 | - else | |
914 | - role:award({[id] = 1}, {log = {desc = "drawHeroExtraReward"}}) | |
915 | - r = {id = id, count = 1} | |
916 | - end | |
917 | - SendPacket(actionCodes.Hero_drawHeroExtraRewardNtf, MsgPack.pack({reward = r})) | |
907 | + --if itemData.type == ItemType.Hero and role:isHaveHero(itemData.id - ItemStartId.Hero) then | |
908 | + -- local fragId = itemData.id - ItemStartId.Hero | |
909 | + -- local heroData = csvdb["unitCsv"][fragId] | |
910 | + -- local count = globalCsv.draw_unit_tofragment[heroData.rare] | |
911 | + -- r, change = role:award({[fragId] = count}, {log = {desc = "drawHeroExtraReward"}}) | |
912 | + -- --r = {id = fragId, count = count, from = id, fcount = 1} | |
913 | + --else | |
914 | + r, change = role:award({[id] = 1}, {log = {desc = "drawHeroExtraReward"}}) | |
915 | + --end | |
916 | + SendPacket(actionCodes.Hero_drawHeroExtraRewardNtf, MsgPack.pack(role:packReward(r, change))) | |
918 | 917 | elseif drawCardReward and drawCardReward ~= "" then |
919 | 918 | role:award(drawCardReward, {log = {desc = "drawHeroExtraReward", int1 = oldVal, int2 = newVal}}) |
920 | 919 | SendPacket(actionCodes.Hero_drawHeroExtraRewardNtf, MsgPack.pack({reward = drawCardReward:toNumMap()})) | ... | ... |