bug修复

This commit is contained in:
xiekaidong 2023-06-16 11:48:57 +08:00
parent 2f3bf147d1
commit 82d6a78a6a

View File

@ -283,8 +283,12 @@ function ChapterData:getChapterPassed(chapterId)
end
function ChapterData:openBox(chapterId, index)
if not self.data.chapterInfo[chapterId] or not self.data.chapterInfo[chapterId].index then
return
if not self.data.chapterInfo[chapterId] then
self.data.chapterInfo[chapterId] = {
total_count = 0,
index = {},
mystery_box_idx = {}
}
end
for _, idx in ipairs(self.data.chapterInfo[chapterId].index) do
if idx == index then