英雄解锁逻辑

This commit is contained in:
xiekaidong 2023-04-20 21:52:01 +08:00
parent 5727821969
commit f4ef82e141
2 changed files with 6 additions and 2 deletions

View File

@ -21,7 +21,7 @@ function ChapterData:init(data, notChangeChapterId)
if not notChangeChapterId then
self.data.chapterId = data and data.chapterId or MIN_CHAPTER_ID
end
self.data.maxChapterId = 2--data and data.maxChapterId or self.data.chapterId - 1
self.data.maxChapterId = data and data.maxChapterId or self.data.chapterId - 1
self.data.chapterBoxInfo = data and data.chapterBoxInfo or {}
self.data.chapterFightInfo = data and data.chapterFightInfo or {}
end

View File

@ -161,7 +161,11 @@ function HeroEntity:canLvUp()
end
function HeroEntity:isUnlock()
return self:getUnlcokChapter() < DataManager.ChapterData:getMaxChapterId()
if self:getUnlcokChapter() <= DataManager.ChapterData:getMaxChapterId() or self:canLvUp() then
return true
end
return false
end
function HeroEntity:isActived()