diff --git a/lua/app/ui/battle/battle_rune_result_ui.lua b/lua/app/ui/battle/battle_rune_result_ui.lua index 2a50ac78..bc86d883 100644 --- a/lua/app/ui/battle/battle_rune_result_ui.lua +++ b/lua/app/ui/battle/battle_rune_result_ui.lua @@ -211,8 +211,8 @@ function BattleRuneResultUI:refreshTaskNode() local condition = chapterCondition[newIndex] if condition then objs.cell:getBaseObject():setActive(true) - local taskNum = taskProgress[index] and taskProgress[index].progress - local desc = self.runeData:getConditionDesc(condition, taskNum) + local taskNum = taskProgress[newIndex] and taskProgress[newIndex].progress + local desc = self.runeData:getConditionDesc(condition) local over = false if taskProgress[newIndex] then local info = taskProgress[newIndex] diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index 68cf0675..8cd422f9 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -510,14 +510,15 @@ function BattleUI:refreshTaskNode() local atlast, iconName = runeData:getConditionIcon(condition) local taskNum = condition[3] or 0 - Logger.printTable(taskProgress) + local over = false if taskProgress[newIndex] then taskNum = taskProgress[newIndex].totalProgress - taskProgress[newIndex].progress if taskNum < 0 then taskNum = 0 end + over = taskProgress[newIndex].over end - cell:refresh(atlast, iconName, taskNum) + cell:refresh(atlast, iconName, taskNum, over) cell:addClickListener(function() ModuleManager.DungeonRuneManager:showTaskUI(self.battleController.chapterId) end) diff --git a/lua/app/ui/battle/cell/battle_task_cell.lua b/lua/app/ui/battle/cell/battle_task_cell.lua index e1969057..03b66dc1 100644 --- a/lua/app/ui/battle/cell/battle_task_cell.lua +++ b/lua/app/ui/battle/cell/battle_task_cell.lua @@ -2,18 +2,17 @@ local BattleTaskCell = class("BattleTaskCell", BaseCell) local BG = {"common_board_131", "common_board_132"} -- 紫绿 -function BattleTaskCell:refresh(iconAtlas, iconName, taskNum) +function BattleTaskCell:refresh(iconAtlas, iconName, taskNum, over) local uiMap = self:getUIMap() local bg = uiMap["battle_task_cell.bg"] local icon = uiMap["battle_task_cell.icon"] local point = uiMap["battle_task_cell.point"] local desc = uiMap["battle_task_cell.desc"] + local check = uiMap["battle_task_cell.check"] icon:setSprite(iconAtlas, iconName) - + check:setVisible(over == true) desc:setText(taskNum) self:hidePoint(not taskNum) - - self:hidePoint(false) end function BattleTaskCell:hidePoint(hide) diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_task_ui.lua b/lua/app/ui/dungeon_rune/dungeon_rune_task_ui.lua index 6bfe8a59..825213a4 100644 --- a/lua/app/ui/dungeon_rune/dungeon_rune_task_ui.lua +++ b/lua/app/ui/dungeon_rune/dungeon_rune_task_ui.lua @@ -38,7 +38,7 @@ function DungeonRuneTaskUI:_display() local condition = chapterCondition[newIndex] if condition then cell:getBaseObject():setActive(true) - local taskNum = taskProgress[index] and taskProgress[index].progress + local taskNum = taskProgress[newIndex] and taskProgress[newIndex].progress local desc = self.runeData:getConditionDesc(condition, taskNum) local over = false if taskProgress[newIndex] then