From 0e96d6f4c1d34df3b2fc30e7029267b840992dc0 Mon Sep 17 00:00:00 2001 From: zhouhaihai Date: Sat, 16 Jan 2021 14:40:26 +0800 Subject: [PATCH] 返还bug --- src/actions/HeroAction.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index c8497b2..5d2f315 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -663,7 +663,8 @@ function _M.getResetRewardRpc(agent, data) while stage > 0 do local curData = csvdb["unit_talent_"..heroCfgId.."Csv"][stage] - for lvl = 1, curTalentLvl - 1 do + local offset = stage == talent:getv(0,1) and curTalentLvl - 1 or #curData + for lvl = 1, offset do local talentData = curData[lvl] for itemId, count in pairs(talentData.money:toNumMap()) do reward[itemId] = (reward[itemId] or 0) + count -- libgit2 0.21.2