From 8c779f826c7cdc466b0eef903d7a38b7afc483d1 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Wed, 31 May 2023 16:04:46 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/battle/component/battle_unit_comp.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua index db0157af..ca66668f 100644 --- a/lua/app/module/battle/component/battle_unit_comp.lua +++ b/lua/app/module/battle/component/battle_unit_comp.lua @@ -1408,14 +1408,15 @@ function BattleUnitComp:onSkillTakeEffect(skill, isFinalBlock, validEffectIdx) end function BattleUnitComp:judgeSkillEffectCondition(skill, index) - if not skill or skill:haveBuffCondition() then + if not skill or not skill:haveBuffCondition() then return true end - local buffConditionIndex, conditionRel = skill:getBuffConditionRel(index) - if not buffConditionIndex then + local rel = skill:getBuffConditionRel(index) + if not rel then return true end + local buffConditionIndex, conditionRel = rel[1], rel[2] local buffConditions = skill:getBuffCondition(buffConditionIndex) return BATTLE_SKILL_CONDITION_HANDLE.judgeSkillEffectCondition(buffConditions, conditionRel, self.battleController)