fix bug
This commit is contained in:
parent
54e59862e5
commit
2878bff888
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user