diff --git a/lua/app/module/chapter/chapter_manager.lua b/lua/app/module/chapter/chapter_manager.lua index 9bfd7f81..30d5d94f 100644 --- a/lua/app/module/chapter/chapter_manager.lua +++ b/lua/app/module/chapter/chapter_manager.lua @@ -128,6 +128,7 @@ function ChapterManager:endFightFinish(result) ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.STAGE, newRewards, reqData.combatReport, mysteryBoxIdx, nil, true) DataManager.ChapterData:fightChapter(reqData.chapter_id, result.max_chapter_id, result.max_wave, reqData.mystery_box_idx) + DataManager.ChapterData:clearChapterBoxState() -- 处理金猪,要在章节更新之后 DataManager.GoldPigData:addGoldPigCount() diff --git a/lua/app/ui/daily_challenge/daily_challenge_ui.lua b/lua/app/ui/daily_challenge/daily_challenge_ui.lua index ab77d907..06404e0c 100644 --- a/lua/app/ui/daily_challenge/daily_challenge_ui.lua +++ b/lua/app/ui/daily_challenge/daily_challenge_ui.lua @@ -1,21 +1,24 @@ local DailyChallengeUI = class("DailyChallengeUI", BaseUI) --- function DailyChallengeUI:getIsOpen() --- return DataManager.DailyChallengeData:isOpen() --- end - --- function DailyChallengeUI:getEntranceName() --- return I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE) --- end - --- function DailyChallengeUI:getShowEntranceRedPoint() --- return DataManager.DailyChallengeData:isMeetChallenge() --- end - function DailyChallengeUI:isFullScreen() return false end +function DailyChallengeUI:getCurrencyParams() + if self.currencyParams == nil then + self.currencyParams = { + itemIds = { + GConst.ItemConst.ITEM_ID_GOLD, + GConst.ItemConst.ITEM_ID_GEM, + GConst.ItemConst.ITEM_ID_VIT + }, + showType = GConst.CURRENCY_TYPE.HORIZONTAL + } + end + return self.currencyParams +end + + function DailyChallengeUI:getPrefabPath() return "assets/prefabs/ui/daily_challenge/daily_challenge_ui.prefab" end @@ -45,8 +48,8 @@ function DailyChallengeUI:onLoadRootComplete() table.insert(self.taskMasks, uiMap["daily_challenge_ui.task.icon_task2.mask"]) table.insert(self.taskMasks, uiMap["daily_challenge_ui.task.icon_task3.mask"]) - self.buffObj = uiMap["daily_challenge_ui.buffs.buff.btn_buff"] - self.debuffObj = uiMap["daily_challenge_ui.buffs.debuff.btn_debuff"] + self.buffBtn = uiMap["daily_challenge_ui.buffs.buff"] + self.debuffBtn = uiMap["daily_challenge_ui.buffs.debuff"] self.bossSpine = uiMap["daily_challenge_ui.spine_node"] self.countdownTx = uiMap["daily_challenge_ui.countdown.time_tx"] @@ -172,12 +175,12 @@ end function DailyChallengeUI:refreshBuff() local buffIds = DataManager.DailyChallengeData:getTodayBuffIds() - self.buffObj:addClickListener(function() - ModuleManager.TipsManager:showDescTips(DataManager.DailyChallengeData:getBuffDesc(buffIds[1]), self.buffObj) + self.buffBtn:addClickListener(function() + ModuleManager.TipsManager:showDescTips(DataManager.DailyChallengeData:getBuffDesc(buffIds[1]), self.buffBtn) end) - self.debuffObj:addClickListener(function() - ModuleManager.TipsManager:showDescTips(DataManager.DailyChallengeData:getBuffDesc(buffIds[2]), self.debuffObj) + self.debuffBtn:addClickListener(function() + ModuleManager.TipsManager:showDescTips(DataManager.DailyChallengeData:getBuffDesc(buffIds[2]), self.debuffBtn) end) end @@ -247,9 +250,9 @@ function DailyChallengeUI:refreshDiffBtn() local chapterStage = DataManager.ChapterData:getChapterStage(diffChapter + 1) local str if cfg.max_chapter <= chapterId then - str = I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_3, chapterPage, chapterStage, "" .. I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_8) .. "") + str = I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_3, chapterPage, chapterStage, "(" .. I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_8) .. ")") else - str = I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_3, chapterPage, chapterStage, "" .. I18N:getGlobalText(I18N.GlobalConst.CHAPTER_WAVE_REAWRD_1) .. "") + str = I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_3, chapterPage, chapterStage, "(" .. I18N:getGlobalText(I18N.GlobalConst.CHAPTER_WAVE_REAWRD_1) .. ")") end self.upDiffBtnDescTx:setText(str) end diff --git a/lua/app/ui/summon/summon_unlock_ui.lua b/lua/app/ui/summon/summon_unlock_ui.lua index a348548e..5e6bffff 100755 --- a/lua/app/ui/summon/summon_unlock_ui.lua +++ b/lua/app/ui/summon/summon_unlock_ui.lua @@ -30,10 +30,10 @@ function SummonUnlockUI:onLoadRootComplete() self:checkUnlockMap() end) - self.heroNode = uiMap["summon_unlock_ui.hero_node"] + self.heroNode = uiMap["summon_unlock_ui.hero_bg.hero_node"] self.nameTx = uiMap["summon_unlock_ui.name_tx"] - self.matchTx = uiMap["summon_unlock_ui.match_tx"] - self.matchImg = uiMap["summon_unlock_ui.match_tx.match_img"] + self.matchTx = uiMap["summon_unlock_ui.match_node.match_tx"] + self.matchImg = uiMap["summon_unlock_ui.match_node.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"] @@ -48,6 +48,7 @@ function SummonUnlockUI:onRefresh() local heroEntity = DataManager.HeroData:getHeroById(self.heroId) local matchType = heroEntity:getMatchType() local qlt = heroEntity:getQlt() + self.nameTx:setText(heroEntity:getName()) self.matchTx:setText(ModuleManager.HeroManager:getMatchTypeName(matchType)) self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, ModuleManager.HeroManager:getMatchTypeIcon(matchType)) self.qltBg:setSprite(GFunc.getHeroQltImg(qlt)) diff --git a/lua/app/userdata/chapter/chapter_data.lua b/lua/app/userdata/chapter/chapter_data.lua index 8803a848..dee49b7d 100644 --- a/lua/app/userdata/chapter/chapter_data.lua +++ b/lua/app/userdata/chapter/chapter_data.lua @@ -154,6 +154,10 @@ function ChapterData:getChapterBoxNum(chapterId, index) return 1 end +function ChapterData:clearChapterBoxState() + self.boxCanGetState = nil +end + function ChapterData:getChapterBoxCanGet() if self.boxCanGetState == nil then self:calcChapterBoxCanGet()