显示修改

This commit is contained in:
xiekaidong 2023-05-22 16:51:51 +08:00
parent 3aa34c82f8
commit b56f68d102

View File

@ -99,8 +99,8 @@ function MainComp:refreshChapter(force)
local mysteryBoxIcon = self.uiMap["main_comp.chapter.img.mystery_box_icon"]
mysteryBoxIcon:setVisible(mysteryBoxCount > 0)
if mysteryBoxCount > 0 then
local remainCount = math.max(mysteryBoxCount - DataManager.ChapterData:getChapterMysteryBoxGotCount(chapterId), 0)
self.uiMap["main_comp.chapter.img.mystery_box_icon.desc"]:setText(remainCount .. "/" .. mysteryBoxCount)
local gotCount = DataManager.ChapterData:getChapterMysteryBoxGotCount(chapterId)
self.uiMap["main_comp.chapter.img.mystery_box_icon.desc"]:setText(gotCount .. "/" .. mysteryBoxCount)
end
local rewardChapterId = DataManager.ChapterData:getIsHaveRewardsMinId()