From f2a8e2c8a4d0705c0dd17d8689e4b347fb4e9896 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 10 Nov 2023 10:36:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E6=8A=80=E5=9C=BAbug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../battle/controller/battle_controller_pvp.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/app/module/battle/controller/battle_controller_pvp.lua b/lua/app/module/battle/controller/battle_controller_pvp.lua index ef91dfb1..222ce6ff 100644 --- a/lua/app/module/battle/controller/battle_controller_pvp.lua +++ b/lua/app/module/battle/controller/battle_controller_pvp.lua @@ -217,6 +217,8 @@ function BattleControllerPVP:onFillBoardOver(...) for posId, entity in pairs(self.battleData:getGridEnties()) do if self:getPosIdInCurActionBoardRowRange(posId) and entity:getSkillId() then if entity:getSkillSide() ~= self.curActionSide then + local team = self:getSideTeam(self.curActionSide) + local unitComp = team:getMainUnit() local skillMatchType = entity:getSkillMatchType() if skillMatchType then local skillEntity = self.battleData:getSkillEntityByElement(skillMatchType, self.curActionSide) @@ -224,6 +226,15 @@ function BattleControllerPVP:onFillBoardOver(...) entity:setSkilId(skillEntity:getSkillId(), false, self.curActionSide) self.battleUI:playChangeElementSfx(posId, index) index = index + 1 + if unitComp.unitEntity then + if unitComp.unitEntity:getActiveSkillLimit() then + entity:setGridType(BattleConst.GRID_TYPE.LOCK) + else + entity:setGridType(BattleConst.GRID_TYPE.EMPTY) + end + else + entity:setGridType(BattleConst.GRID_TYPE.EMPTY) + end end end end