From f4ef82e141f2cd28efefc6469b66dd12c71794ab Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Thu, 20 Apr 2023 21:52:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E8=A7=A3=E9=94=81=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/userdata/chapter/chapter_data.lua | 2 +- lua/app/userdata/hero/hero_entity.lua | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/app/userdata/chapter/chapter_data.lua b/lua/app/userdata/chapter/chapter_data.lua index f3ab7d93..aef458c4 100644 --- a/lua/app/userdata/chapter/chapter_data.lua +++ b/lua/app/userdata/chapter/chapter_data.lua @@ -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 diff --git a/lua/app/userdata/hero/hero_entity.lua b/lua/app/userdata/hero/hero_entity.lua index 17414561..cf0f320f 100644 --- a/lua/app/userdata/hero/hero_entity.lua +++ b/lua/app/userdata/hero/hero_entity.lua @@ -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()