diff --git a/lua/app/module/chapter/chapter_manager.lua b/lua/app/module/chapter/chapter_manager.lua index b17813c5..88399cc2 100644 --- a/lua/app/module/chapter/chapter_manager.lua +++ b/lua/app/module/chapter/chapter_manager.lua @@ -105,11 +105,6 @@ function ChapterManager:endFightFinish(result) -- 处理金猪,要在章节更新之后 DataManager.GoldPigData:addGoldPigCount() - if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.DAILY_CHALLENGE, true) and not DataManager.DailyChallengeData:isOpen() then - -- 满足配置开启条件,请求挑战数据 - ModuleManager.DailyChallengeManager:onResetState() - end - local newMaxChapter = DataManager.ChapterData:getNewChapterId() if maxChapter ~= newMaxChapter then local data = {} @@ -121,6 +116,8 @@ function ChapterManager:endFightFinish(result) end -- 新章节通关,尝试解锁新功能 DataManager:tryOpenModules() + -- 更新每日挑战数据 + ModuleManager.DailyChallengeManager:onResetState() -- 章节通关 标记可弹出章节礼包 DataManager.ShopData:markPopUpGiftForActChapterStore(maxChapter) ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_PASS_CHAPTER) diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index 0da3cb6a..0b513e88 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -167,6 +167,7 @@ end function MainComp:refresh() self:refreshStageFormaion() + self:refreshChallenge() end function MainComp:getCurModuleType() diff --git a/lua/app/userdata/daily_challenge/daily_challenge_data.lua b/lua/app/userdata/daily_challenge/daily_challenge_data.lua index 2a9702df..b5ea5ad4 100644 --- a/lua/app/userdata/daily_challenge/daily_challenge_data.lua +++ b/lua/app/userdata/daily_challenge/daily_challenge_data.lua @@ -40,12 +40,6 @@ function DailyChallengeData:isOpen() if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.DAILY_CHALLENGE, true) then return false end - if self.tasks == nil then - return false - end - if self.buffIds == nil then - return false - end return true end