每日挑战不显示每日buff信息

This commit is contained in:
xiekaidong 2023-06-12 09:46:51 +08:00
parent f848e7b5bc
commit 225fa8ad1f
3 changed files with 13 additions and 3 deletions

View File

@ -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

View File

@ -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)

View File

@ -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