From 9b1976665eeabc95931740b5ce6612a38f91976a Mon Sep 17 00:00:00 2001 From: chenyueqi Date: Wed, 7 Apr 2021 11:20:49 +0800 Subject: [PATCH] 使用通用检查通关关卡方法 --- src/actions/HeroAction.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index d34879a..19a8f2c 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -44,8 +44,7 @@ function _M.levelUpRpc( agent, data ) -- 通过指定关卡后才能升级英雄等级 local pass = globalCsv.unit_exp_level_pass[level + 1] if pass then - local hangPass = role:getProperty("hangPass") - if not hangPass[pass] then return 4 end + if not role:checkHangPass(pass) then return 4 end end role:costItems(cost, {log = {desc = "heroLevelUp", int1 = msg.id, int2 = hero:getProperty("type")}}) @@ -89,8 +88,7 @@ function _M.breakRpc( agent, data ) -- 通过指定关卡后才能突破英雄 local pass = globalCsv.unit_break_level_pass[breakL] if pass then - local hangPass = role:getProperty("hangPass") - if not hangPass[pass] then return 4 end + if not role:checkHangPass(pass) then return 4 end end role:costItems(cost, {log = {desc = "heroBreak", int1 = msg.id, int2 = hero:getProperty("type")}}) -- libgit2 0.21.2