From 2ec6c8c95088ca36f6e57b86a7019e4d85e8e817 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Mon, 15 Sep 2025 10:53:37 +0800 Subject: [PATCH] fix bug --- lua/app/module/item/item_const.lua | 2 +- lua/app/ui/hero/hero_detail_ui.lua | 4 +++- lua/app/ui/summon/summon_unlock_ui.lua | 5 +++++ lua/app/userdata/chapter/chapter_data.lua | 9 +++++---- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lua/app/module/item/item_const.lua b/lua/app/module/item/item_const.lua index 583bf7f3..52b17924 100644 --- a/lua/app/module/item/item_const.lua +++ b/lua/app/module/item/item_const.lua @@ -10,7 +10,7 @@ ItemConst.ITEM_ID_BOX_LV_1 = 8 ItemConst.ITEM_ID_BOX_LV_2 = 9 ItemConst.ITEM_ID_BOX_LV_3 = 10 ItemConst.ITEM_ID_BOX_LV_4 = 11 -ItemConst.ITEM_ID_EXP = 12 +ItemConst.ITEM_ID_EXP = 4 ItemConst.ITEM_ID_BOX_KEY_LV_1 = 13 ItemConst.ITEM_ID_BOX_KEY_LV_2 = 14 ItemConst.ITEM_ID_BOX_KEY_LV_3 = 15 diff --git a/lua/app/ui/hero/hero_detail_ui.lua b/lua/app/ui/hero/hero_detail_ui.lua index c4bc9076..d7a21bc0 100644 --- a/lua/app/ui/hero/hero_detail_ui.lua +++ b/lua/app/ui/hero/hero_detail_ui.lua @@ -32,7 +32,9 @@ end function HeroDetailUI:onLoadRootComplete() local uiMap = self.root:genAllChildren() - + self.root:addClickListener(function() + self:closeUI() + end) uiMap["hero_detail_ui.common.close_btn"]:addClickListener(function() self:closeUI() end) diff --git a/lua/app/ui/summon/summon_unlock_ui.lua b/lua/app/ui/summon/summon_unlock_ui.lua index 9a67e264..a348548e 100755 --- a/lua/app/ui/summon/summon_unlock_ui.lua +++ b/lua/app/ui/summon/summon_unlock_ui.lua @@ -36,6 +36,7 @@ function SummonUnlockUI:onLoadRootComplete() self.matchImg = uiMap["summon_unlock_ui.match_tx.match_img"] self.qltBg = uiMap["summon_unlock_ui.qlt_bg"] self.qltBgTx = uiMap["summon_unlock_ui.qlt_bg.qlt_tx"] + self.uiSpine = uiMap["summon_unlock_ui.ui_spine_obj"] uiMap["summon_unlock_ui.title_bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_3)) uiMap["summon_unlock_ui.continue_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_TO_CONTINUE)) @@ -57,8 +58,12 @@ end function SummonUnlockUI:loadHero() local cfg = DataManager.HeroData:getHeroConfig(self.heroId) + local qlt = cfg.qlt - 1 SpineManager:loadHeroAsync(cfg.model_id, self.heroNode, function(spineObject) spineObject:playAnimation("idle", true) + self.uiSpine:playAnimComplete("open0" .. qlt, false, true, function() + self.uiSpine:playAnim("idle0" .. qlt, true, true) + end) end) end diff --git a/lua/app/userdata/chapter/chapter_data.lua b/lua/app/userdata/chapter/chapter_data.lua index 112091c5..8803a848 100644 --- a/lua/app/userdata/chapter/chapter_data.lua +++ b/lua/app/userdata/chapter/chapter_data.lua @@ -162,9 +162,10 @@ function ChapterData:getChapterBoxCanGet() end function ChapterData:calcChapterBoxCanGet() - for chapterId = 1, self.data.maxChapterId do + local maxChapterId = self:getNextChapter(self.data.maxChapterId) + for chapterId = 1, maxChapterId do for ii = 1, 3 do - local canGet = not self:getChapterBoxRewardGot(chapterId, ii) + local canGet = self:boxCanGet(chapterId, ii) if canGet then self.boxCanGetState = true return @@ -180,7 +181,7 @@ function ChapterData:getChapterBoxCanGetInfo() for chapterId = 1, maxChapterId do local boxes = {} for i = 1, 3 do - local canGet = not self:getChapterBoxRewardGot(chapterId, i) and self:boxCanGet(chapterId, i) + local canGet = self:boxCanGet(chapterId, i) if canGet then table.insert(boxes, i) end @@ -346,7 +347,7 @@ function ChapterData:openBox() 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 - local canGet = not self:getChapterBoxRewardGot(chapterId, i) and self:boxCanGet(chapterId, i) + local canGet = self:boxCanGet(chapterId, i) if canGet then self.data.chapterInfo[chapterId].index[i] = i end