diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index 955e62d..a36500f 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -42,14 +42,14 @@ function _M.levelUpRpc( agent, data ) if not role:checkItemEnough(cost) then return 3 end -- 通过指定关卡后才能升级英雄等级 - --local pass = globalCsv.unit_exp_level_pass[level + 1] - --if pass then - -- if not role:checkHangPass(pass) then return 4 end - --end + local pass = globalCsv.unit_exp_level_pass[level + 1] + if pass then + if not role:checkHangPass(pass) then return 4 end + end --账号等级提升角色等级上限 - local accountLevel = role:getAccountLevel() - if level >= accountLevel then return 4 end + --local accountLevel = role:getAccountLevel() + --if level >= accountLevel then return 4 end role:costItems(cost, {log = {desc = "heroLevelUp", int1 = msg.id, int2 = hero:getProperty("type")}}) @@ -90,10 +90,10 @@ function _M.breakRpc( agent, data ) if not role:checkItemEnough(cost) then return 4 end -- 通过指定关卡后才能突破英雄 - --local pass = globalCsv.unit_break_level_pass[breakL + 1] - --if pass then - -- if not role:checkHangPass(pass) then return 4 end - --end + local pass = globalCsv.unit_break_level_pass[breakL + 1] + if pass then + if not role:checkHangPass(pass) then return 4 end + end role:costItems(cost, {log = {desc = "heroBreak", int1 = msg.id, int2 = hero:getProperty("type")}}) local oldAttr = hero:getTotalAttrs() -- libgit2 0.21.2