bug修复

This commit is contained in:
xiekaidong 2023-07-21 10:00:13 +08:00
parent 52dd2b1336
commit e85f2ba4f2

View File

@ -330,10 +330,10 @@ function DungeonArmorEntity:formatTaskByController(battleBaseController, chapter
return taskProgress return taskProgress
end end
function DungeonArmorEntity:getTaskDesc(chapterId, taskId, progress) function DungeonArmorEntity:getTaskDesc(taskId, progress)
local config = ConfigManager:getConfig("task_dungeon_armor")[taskId] local config = ConfigManager:getConfig("task_dungeon_armor")[taskId]
if not config then if not config then
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_7), self:getPassedMaxId() >= chapterId return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_7)
end end
local desc = I18N:getConfig("task_dungeon_armor")[taskId].desc local desc = I18N:getConfig("task_dungeon_armor")[taskId].desc
@ -355,7 +355,7 @@ function DungeonArmorEntity:getTaskDesc(chapterId, taskId, progress)
color = "#49FF49" color = "#49FF49"
end end
local progressStr = string.format("<color=%s>(%s/%s)</color>", color, progress, taskNum) local progressStr = string.format("<color=%s>(%s/%s)</color>", color, progress, taskNum)
return desc .. progressStr, over return desc .. progressStr
end end
function DungeonArmorEntity:getTaskDescByIndex(chapterId, index, battleBaseController, taskProgress) function DungeonArmorEntity:getTaskDescByIndex(chapterId, index, battleBaseController, taskProgress)
@ -374,7 +374,8 @@ function DungeonArmorEntity:getTaskDescByIndex(chapterId, index, battleBaseContr
return GConst.EMPTY_STRING return GConst.EMPTY_STRING
end end
return self:getTaskDesc(chapterId, taskId, taskProgress[taskId]) local over = self:getStarDone(chapterId, index)
return self:getTaskDesc(taskId, taskProgress[taskId]), over
end end
return DungeonArmorEntity return DungeonArmorEntity