This commit is contained in:
puxuan 2025-09-15 10:53:37 +08:00
parent 1f9283c93b
commit 2ec6c8c950
4 changed files with 14 additions and 6 deletions

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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