diff --git a/lua/app/module/task/task_manager.lua b/lua/app/module/task/task_manager.lua index 284eb754..269ea535 100644 --- a/lua/app/module/task/task_manager.lua +++ b/lua/app/module/task/task_manager.lua @@ -37,7 +37,8 @@ end function TaskManager:claimDailyTask(dailyTaskId) local parmas = { - id = dailyTaskId, + -- id = dailyTaskId, + id = 0, } self:sendMessage(ProtoMsgType.FromMsgEnum.TaskDailyRewardReq, parmas, {}, self.onDailyTaskClaim, BIReport.ITEM_GET_TYPE.TASK_DAILY_REWARD) end diff --git a/lua/app/ui/tips/reward_box.lua b/lua/app/ui/tips/reward_box.lua index 7ef1573b..8664bf2d 100644 --- a/lua/app/ui/tips/reward_box.lua +++ b/lua/app/ui/tips/reward_box.lua @@ -47,6 +47,10 @@ function RewardBox:_refreshScrollRect() self.scrollView:setSizeDelta(#self.params.rewards*CELL_WIDTH, 120) self.scrollRect:setPerLineNum(#self.params.rewards) self.scrollRect:refillCells(#self.params.rewards, true) + elseif #self.params.rewards <= 10 then + self.scrollView:setSizeDelta(CELL_NUM*CELL_WIDTH, 240) + self.scrollRect:setPerLineNum(CELL_NUM) + self.scrollRect:refillCells(#self.params.rewards, true) else self.scrollView:setSizeDelta(CELL_WIDTH*5, 314) self.scrollRect:setPerLineNum(CELL_NUM) diff --git a/lua/app/userdata/chapter/chapter_data.lua b/lua/app/userdata/chapter/chapter_data.lua index 43266edc..112091c5 100644 --- a/lua/app/userdata/chapter/chapter_data.lua +++ b/lua/app/userdata/chapter/chapter_data.lua @@ -181,7 +181,6 @@ function ChapterData:getChapterBoxCanGetInfo() local boxes = {} for i = 1, 3 do local canGet = not self:getChapterBoxRewardGot(chapterId, i) and self:boxCanGet(chapterId, i) - Logger.logHighlight("chapterId: = %s i = %s canGet = %s", chapterId, i, canGet) if canGet then table.insert(boxes, i) end @@ -233,8 +232,10 @@ function ChapterData:getChapterMaxWave(chapterId) chapterId = chapterId or self:getChapterId() if chapterId <= self.data.maxChapterId then return self:getChapterCfgMaxWave(chapterId) - else + elseif chapterId == self:getNextChapter(self.data.maxChapterId) then return self.maxWave + else + return 0 end end @@ -341,10 +342,14 @@ function ChapterData:getChapterPassed(chapterId) end function ChapterData:openBox() - for chapterId = 1, self.data.maxChapterId do + local maxChapterId = self:getNextChapter(self.data.maxChapterId) + for chapterId = 1, maxChapterId do self.data.chapterInfo[chapterId] = self.data.chapterInfo[chapterId] or {total_count = 0, index = {}, mystery_box_idx = {}} for i = 1, 3 do - self.data.chapterInfo[chapterId].index[i] = i + local canGet = not self:getChapterBoxRewardGot(chapterId, i) and self:boxCanGet(chapterId, i) + if canGet then + self.data.chapterInfo[chapterId].index[i] = i + end end end self.boxCanGetState = nil