Commit 9b1976665eeabc95931740b5ce6612a38f91976a

Authored by chenyueqi
1 parent c49eac9f

使用通用检查通关关卡方法

Showing 1 changed file with 2 additions and 4 deletions   Show diff stats
src/actions/HeroAction.lua
... ... @@ -44,8 +44,7 @@ function _M.levelUpRpc( agent, data )
44 44 -- 通过指定关卡后才能升级英雄等级
45 45 local pass = globalCsv.unit_exp_level_pass[level + 1]
46 46 if pass then
47   - local hangPass = role:getProperty("hangPass")
48   - if not hangPass[pass] then return 4 end
  47 + if not role:checkHangPass(pass) then return 4 end
49 48 end
50 49  
51 50 role:costItems(cost, {log = {desc = "heroLevelUp", int1 = msg.id, int2 = hero:getProperty("type")}})
... ... @@ -89,8 +88,7 @@ function _M.breakRpc( agent, data )
89 88 -- 通过指定关卡后才能突破英雄
90 89 local pass = globalCsv.unit_break_level_pass[breakL]
91 90 if pass then
92   - local hangPass = role:getProperty("hangPass")
93   - if not hangPass[pass] then return 4 end
  91 + if not role:checkHangPass(pass) then return 4 end
94 92 end
95 93  
96 94 role:costItems(cost, {log = {desc = "heroBreak", int1 = msg.id, int2 = hero:getProperty("type")}})
... ...