buff回合数等于1时也显示

This commit is contained in:
xiekaidong 2023-06-19 12:03:13 +08:00
parent c440197d57
commit ccab76a58b

View File

@ -257,7 +257,7 @@ function BattleUI:refreshBuff(side, buffList)
icon:setLocalScale(1, 1, 1)
icon:setSprite(GConst.ATLAS_PATH.ICON_BUFF, buffObj.buff:getIcon())
local round = buffObj.round
if round <= 1 or round > 9 then
if round <= 0 or round > 9 then
text:setText(GConst.EMPTY_STRING)
else
text:setText(tostring(round))
@ -285,7 +285,7 @@ function BattleUI:refreshBuff(side, buffList)
icon:setLocalScale(1, 1, 1)
icon:setSprite(GConst.ATLAS_PATH.ICON_BUFF, buffObj.buff:getIcon())
local round = buffObj.round
if round <= 1 or round > 9 then
if round <= 0 or round > 9 then
text:setText(GConst.EMPTY_STRING)
else
text:setText(tostring(round))
@ -355,7 +355,7 @@ function BattleUI:showBuffTips(buffList, autoClose)
local buffTipsObjMap = buffTipsObj:genAllChildren()
buffTipsObjMap["buff.icon"]:setSprite(GConst.ATLAS_PATH.ICON_BUFF, buffObj.buff:getIcon())
local round = buffObj.round
if round <= 1 or round > 9 then
if round <= 0 or round > 9 then
buffTipsObjMap["buff.round"]:setText(GConst.EMPTY_STRING)
else
buffTipsObjMap["buff.round"]:setText(tostring(round))