From 225fa8ad1fa4965fbc9061b68962311a62b1ce7a Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Mon, 12 Jun 2023 09:46:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E6=8C=91=E6=88=98=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=AF=8F=E6=97=A5buff=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/battle_controller_daily_challenge.lua | 1 + lua/app/ui/battle/battle_ui.lua | 6 +++--- lua/app/userdata/battle/skill/battle_buff_entity.lua | 9 +++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lua/app/module/battle/controller/battle_controller_daily_challenge.lua b/lua/app/module/battle/controller/battle_controller_daily_challenge.lua index c0051ace..f0cd8a63 100644 --- a/lua/app/module/battle/controller/battle_controller_daily_challenge.lua +++ b/lua/app/module/battle/controller/battle_controller_daily_challenge.lua @@ -35,6 +35,7 @@ function BattleControllerDailyChallenge:getBuffs() buffEntity:init(effect[1]) buffEntity:setTargetSide(cfg[buffId].obj) buffEntity:setIsCantRemove(true) + buffEntity:setNotShowIcon(true) table.insert(self.initBuffs, {buffEntity = buffEntity, effect = effect[1]}) end diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index 727fd9ab..9a558fa6 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -234,7 +234,7 @@ function BattleUI:refreshBuff(side, buffList) local index = 1 for i = 1, count do buffObj = buffList[i] - if buffObj and buffObj.buff:getIcon() then + if buffObj and buffObj.buff:getIcon() and not buffObj.buff:getNotShowIcon() then local icon = self.atkBuffIconList[index] local text = self.atkBuffTextList[index] icon:setLocalScale(1, 1, 1) @@ -262,7 +262,7 @@ function BattleUI:refreshBuff(side, buffList) local index = 1 for i = 1, count do buffObj = buffList[i] - if buffObj and buffObj.buff:getIcon() then + if buffObj and buffObj.buff:getIcon() and not buffObj.buff:getNotShowIcon() then local icon = self.defBuffIconList[index] local text = self.defBuffTextList[index] icon:setLocalScale(1, 1, 1) @@ -331,7 +331,7 @@ function BattleUI:showBuffTips(buffList, autoClose) local addY = 0 for i = 1, count do buffObj = buffList[i] - if buffObj and buffObj.buff:getIcon() then + if buffObj and buffObj.buff:getIcon() and not buffObj.buff:getNotShowIcon() then local buffTipsObj = self:getBattleBuffTipsObj(index) buffTipsObj:setLocalScale(1, 1, 1) buffTipsObj:setAnchoredPositionY(-addY) diff --git a/lua/app/userdata/battle/skill/battle_buff_entity.lua b/lua/app/userdata/battle/skill/battle_buff_entity.lua index 183e9ccf..10f8ed09 100644 --- a/lua/app/userdata/battle/skill/battle_buff_entity.lua +++ b/lua/app/userdata/battle/skill/battle_buff_entity.lua @@ -17,6 +17,7 @@ function BattleBuffEntity:init(effectParams, owner, hostSkill) self.buffInfo = ConfigManager:getConfigWithOtherKey("buff", "name")[self.name] self.buffType = self.buffInfo.buff_type self.cantRemove = false + self.notShowIcon = false end function BattleBuffEntity:setOwner(owner) @@ -115,4 +116,12 @@ function BattleBuffEntity:setIsCantRemove(cantRemove) self.cantRemove = cantRemove end +function BattleBuffEntity:getNotShowIcon() + return self.notShowIcon +end + +function BattleBuffEntity:setNotShowIcon(notShow) + self.notShowIcon = notShow +end + return BattleBuffEntity \ No newline at end of file