From e0290d8e43601632d6cda7fe8fb185518cd934c7 Mon Sep 17 00:00:00 2001 From: liuzujun <307836273@qq.com> Date: Tue, 8 Sep 2020 20:07:52 +0800 Subject: [PATCH] 修改引导, 抽卡阶段奖励修改 --- src/actions/HangAction.lua | 8 +++++++- src/actions/HeroAction.lua | 23 +++++++++++------------ src/csvdata | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/actions/HangAction.lua b/src/actions/HangAction.lua index 1811452..9ecb82d 100644 --- a/src/actions/HangAction.lua +++ b/src/actions/HangAction.lua @@ -258,6 +258,7 @@ function _M.endBattleRpc(agent, data) role:finishGuide(5) elseif carbonId == 10102 then role:finishGuide(8) + role:saveGuide(9, 2) elseif carbonId == 10103 then role:finishGuide(9) elseif carbonId == 10220 then @@ -272,8 +273,13 @@ function _M.endBattleRpc(agent, data) end local nextCarbonId = role:getNextCarbonId(carbonId) -- 设置挂机关卡 - if hangInfo.carbonId < nextCarbonId then + if isWin and hangInfo.carbonId < nextCarbonId then hangInfo.carbonId = nextCarbonId + local cfg = csvdb["idle_battleCsv"][nextCarbonId] + if cfg then + hangInfo.bossTime = skynet.timex() + cfg.idle_time + print(hangInfo.bossTime) + end end role:updateProperty({field = "hangInfo", value = hangInfo}) diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index 10cf120..e805f65 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -902,19 +902,18 @@ function _M.drawHeroRpc(agent, data) if drawCardReward == "" then local id = math.randWeight(csvdb["build_giftCsv"], "pool_1") - local r = {} + local r,change = {} local itemData = csvdb["itemCsv"][id] - if itemData.type == ItemType.Hero and role:isHaveHero(itemData.id - ItemStartId.Hero) then - local fragId = itemData.id - ItemStartId.Hero - local heroData = csvdb["unitCsv"][fragId] - local count = globalCsv.draw_unit_tofragment[heroData.rare] - role:award({[fragId] = count}, {log = {desc = "drawHeroExtraReward"}}) - r = {id = fragId, count = count, from = id, fcount = 1} - else - role:award({[id] = 1}, {log = {desc = "drawHeroExtraReward"}}) - r = {id = id, count = 1} - end - SendPacket(actionCodes.Hero_drawHeroExtraRewardNtf, MsgPack.pack({reward = r})) + --if itemData.type == ItemType.Hero and role:isHaveHero(itemData.id - ItemStartId.Hero) then + -- local fragId = itemData.id - ItemStartId.Hero + -- local heroData = csvdb["unitCsv"][fragId] + -- local count = globalCsv.draw_unit_tofragment[heroData.rare] + -- r, change = role:award({[fragId] = count}, {log = {desc = "drawHeroExtraReward"}}) + -- --r = {id = fragId, count = count, from = id, fcount = 1} + --else + r, change = role:award({[id] = 1}, {log = {desc = "drawHeroExtraReward"}}) + --end + SendPacket(actionCodes.Hero_drawHeroExtraRewardNtf, MsgPack.pack(role:packReward(r, change))) elseif drawCardReward and drawCardReward ~= "" then role:award(drawCardReward, {log = {desc = "drawHeroExtraReward", int1 = oldVal, int2 = newVal}}) SendPacket(actionCodes.Hero_drawHeroExtraRewardNtf, MsgPack.pack({reward = drawCardReward:toNumMap()})) diff --git a/src/csvdata b/src/csvdata index 83f6f08..2cd316b 160000 --- a/src/csvdata +++ b/src/csvdata @@ -1 +1 @@ -Subproject commit 83f6f0899e2213de748df05480e7292f87a86eb6 +Subproject commit 2cd316b4df0f855713b9457114a97714df4d55f1 -- libgit2 0.21.2