From 38b099a0ec0ea5637c8189712cb590fe33cceb93 Mon Sep 17 00:00:00 2001 From: chenxi Date: Mon, 5 Jun 2023 10:24:26 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/global/global_const.lua | 1 + lua/app/ui/hero/hero_detail_ui.lua | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lua/app/global/global_const.lua b/lua/app/global/global_const.lua index 5093232a..2dd53259 100644 --- a/lua/app/global/global_const.lua +++ b/lua/app/global/global_const.lua @@ -183,6 +183,7 @@ GConst.ATLAS_PATH = { ICON_ITEM = "assets/arts/atlas/icon/item.asset", UI_LOGIN = "assets/arts/atlas/ui/login.asset", ICON_SKILL = "assets/arts/atlas/icon/skill.asset", + ICON_SKILL_BIG = "assets/arts/atlas/icon/skill_big.asset", ICON_HERO = "assets/arts/atlas/icon/hero.asset", ICON_HERO_2 = "assets/arts/atlas/icon/hero_2.asset", ICON_SKILL_ROGUE = "assets/arts/atlas/icon/skill_rogue.asset", diff --git a/lua/app/ui/hero/hero_detail_ui.lua b/lua/app/ui/hero/hero_detail_ui.lua index 5cbd7d9f..3ca83c33 100644 --- a/lua/app/ui/hero/hero_detail_ui.lua +++ b/lua/app/ui/hero/hero_detail_ui.lua @@ -32,16 +32,14 @@ function HeroDetailUI:_display(lvChange) uiMap["hero_detail_ui.bg.skill_desc"]:setText(ModuleManager.HeroManager:getSkillDesc(self.heroEntity:getBaseSkill())) uiMap["hero_detail_ui.bg.hp_name"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_2)) uiMap["hero_detail_ui.bg.atk_name"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_3)) - - uiMap["hero_detail_ui.bg.skill_icon"]:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(self.heroEntity:getUnlockRogueId())) - uiMap["hero_detail_ui.bg.hero_element"]:setSprite(GConst.ATLAS_PATH.HERO, ModuleManager.HeroManager:getMatchTypeIcon(self.heroEntity:getMatchType())) + uiMap["hero_detail_ui.bg.skill_node.skill_icon"]:setSprite(GConst.ATLAS_PATH.ICON_SKILL_BIG, ModuleManager.HeroManager:getSkillIcon(self.heroEntity:getBaseSkill())) local materials = self.heroEntity:getLvUpMaterials() or {} local fragmentCount = DataManager.BagData.ItemData:getItemNumById(self.heroEntity:getFragmentId()) local needFragmentCount = materials[1] or 1 - uiMap["hero_detail_ui.bg.fragment_num"]:setText(fragmentCount .. "/" .. needFragmentCount) + uiMap["hero_detail_ui.bg.fragment_bg.fragment_num"]:setText(fragmentCount .. "/" .. needFragmentCount) - local slider = uiMap["hero_detail_ui.bg.slider"] + local slider = uiMap["hero_detail_ui.bg.fragment_bg.slider"] if fragmentCount >= needFragmentCount then slider:setSprite(GConst.ATLAS_PATH.COMMON, "common_progress_1", nil, slider:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)) else @@ -82,7 +80,7 @@ function HeroDetailUI:_display(lvChange) uiMap["hero_detail_ui.bg.fragment_bg"]:setVisible(not self.heroEntity:isMaxLv()) local canLvUp = self.heroEntity:canLvUp() - uiMap["hero_detail_ui.bg.fragment_icon"]:setVisible(not canLvUp) + uiMap["hero_detail_ui.bg.fragment_bg.fragment_icon"]:setVisible(not canLvUp) local lv = self.heroEntity:getLv() local str From 5340ecd4b72904fba7e30a7fe385530953cd930c Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Mon, 5 Jun 2023 10:36:30 +0800 Subject: [PATCH 2/5] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../battle/controller/battle_controller.lua | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 1a00b015..e5017cd8 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -1339,18 +1339,24 @@ end function BattleController:generateBoard(isFirst) local boardList, _, mysteryBoxIndexMap = self:getInitBoard() if self.curBoardIndex and self.curBoardIndex >= #boardList then - self.needWaitingBoardOver = false + if isFirst then + self.needWaitingBoardOver = false + end return end if not self.battleUI then - self.needWaitingBoardOver = false + if isFirst then + self.needWaitingBoardOver = false + end return end self.curBoardIndex = (self.curBoardIndex or 0) + 1 if not boardList[self.curBoardIndex] then -- 容错 - self.needWaitingBoardOver = false + if isFirst then + self.needWaitingBoardOver = false + end return end local board = boardList[self.curBoardIndex].board @@ -1361,10 +1367,11 @@ function BattleController:generateBoard(isFirst) self.battleUI:switchBoard(function() self.battleData:refreshBoard(board, self:getBlockIcon()) self.battleUI:initGridCell(function() - self.needWaitingBoardOver = false + if isFirst then + self.needWaitingBoardOver = false + end end) end, function() - -- self:enterRoundBegin() end, isFirst) end From a8f727c01407a10b99a64f0ed624a6b3a27a8eed Mon Sep 17 00:00:00 2001 From: Fang Date: Mon, 5 Jun 2023 10:14:54 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E6=8C=91=E6=88=98?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E8=A7=A3=E9=94=81=E6=98=BE=E7=A4=BAfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/chapter/chapter_manager.lua | 7 ++----- lua/app/ui/main_city/component/main_comp.lua | 1 + lua/app/userdata/daily_challenge/daily_challenge_data.lua | 6 ------ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lua/app/module/chapter/chapter_manager.lua b/lua/app/module/chapter/chapter_manager.lua index b17813c5..88399cc2 100644 --- a/lua/app/module/chapter/chapter_manager.lua +++ b/lua/app/module/chapter/chapter_manager.lua @@ -105,11 +105,6 @@ function ChapterManager:endFightFinish(result) -- 处理金猪,要在章节更新之后 DataManager.GoldPigData:addGoldPigCount() - if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.DAILY_CHALLENGE, true) and not DataManager.DailyChallengeData:isOpen() then - -- 满足配置开启条件,请求挑战数据 - ModuleManager.DailyChallengeManager:onResetState() - end - local newMaxChapter = DataManager.ChapterData:getNewChapterId() if maxChapter ~= newMaxChapter then local data = {} @@ -121,6 +116,8 @@ function ChapterManager:endFightFinish(result) end -- 新章节通关,尝试解锁新功能 DataManager:tryOpenModules() + -- 更新每日挑战数据 + ModuleManager.DailyChallengeManager:onResetState() -- 章节通关 标记可弹出章节礼包 DataManager.ShopData:markPopUpGiftForActChapterStore(maxChapter) ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_PASS_CHAPTER) diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index 0da3cb6a..0b513e88 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -167,6 +167,7 @@ end function MainComp:refresh() self:refreshStageFormaion() + self:refreshChallenge() end function MainComp:getCurModuleType() diff --git a/lua/app/userdata/daily_challenge/daily_challenge_data.lua b/lua/app/userdata/daily_challenge/daily_challenge_data.lua index 2a9702df..b5ea5ad4 100644 --- a/lua/app/userdata/daily_challenge/daily_challenge_data.lua +++ b/lua/app/userdata/daily_challenge/daily_challenge_data.lua @@ -40,12 +40,6 @@ function DailyChallengeData:isOpen() if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.DAILY_CHALLENGE, true) then return false end - if self.tasks == nil then - return false - end - if self.buffIds == nil then - return false - end return true end From 827c282c62a8f497314e4816bc7bfcdfd7033172 Mon Sep 17 00:00:00 2001 From: Fang Date: Mon, 5 Jun 2023 10:41:10 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E9=A6=96=E6=AC=A1=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E6=AF=8F=E6=97=A5=E6=8C=91=E6=88=98=E6=9C=AA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=BC=B9=E7=AA=97fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/local_data.lua | 9 +++++++++ .../daily_challenge/daily_challenge_task_ui.lua | 1 + lua/app/ui/main_city/component/main_comp.lua | 3 +++ .../daily_challenge/daily_challenge_data.lua | 16 ++++++++++++++++ 4 files changed, 29 insertions(+) diff --git a/lua/app/common/local_data.lua b/lua/app/common/local_data.lua index 616238b6..e64880d5 100644 --- a/lua/app/common/local_data.lua +++ b/lua/app/common/local_data.lua @@ -27,6 +27,7 @@ local LOCAL_DATA_KEY = { LAST_LOGIN_TIME = "LAST_LOGIN_TIME", GATE = "GATE", BOUNTY_POP_TIME = "BOUNTY_POP_TIME", + CHALLENGE_TASK_POP_TIME = "CHALLENGE_TASK_POP_TIME", } LocalData.KEYS = LOCAL_DATA_KEY @@ -345,4 +346,12 @@ function LocalData:getBountyPopTime() return self:getInt(LOCAL_DATA_KEY.BOUNTY_POP_TIME, 0) end +function LocalData:setChallengeTaskPopTime(time) + self:setInt(LOCAL_DATA_KEY.CHALLENGE_TASK_POP_TIME, time) +end + +function LocalData:getChallengeTaskPopTime() + return self:getInt(LOCAL_DATA_KEY.CHALLENGE_TASK_POP_TIME, 0) +end + return LocalData \ No newline at end of file diff --git a/lua/app/ui/daily_challenge/daily_challenge_task_ui.lua b/lua/app/ui/daily_challenge/daily_challenge_task_ui.lua index 2f6755d5..85adb485 100644 --- a/lua/app/ui/daily_challenge/daily_challenge_task_ui.lua +++ b/lua/app/ui/daily_challenge/daily_challenge_task_ui.lua @@ -34,6 +34,7 @@ function DailyChallengeTaskUI:ctor() end function DailyChallengeTaskUI:onLoadRootComplete() + DataManager.DailyChallengeData:markPopTask() self:_display() self:_addListeners() end diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index 0b513e88..c0d561d8 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -35,6 +35,9 @@ function MainComp:refreshModule(selectModule) elseif self.curModuleType == GConst.MainCityConst.MAIN_MODULE.DAILY_CHALLENGE then -- 切换到每日挑战 EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GO_DAILY_CHALLENGE) + if DataManager.DailyChallengeData:getIsPopTask() then + ModuleManager.DailyChallengeManager:showBattleTaskUI() + end end end diff --git a/lua/app/userdata/daily_challenge/daily_challenge_data.lua b/lua/app/userdata/daily_challenge/daily_challenge_data.lua index b5ea5ad4..f64038be 100644 --- a/lua/app/userdata/daily_challenge/daily_challenge_data.lua +++ b/lua/app/userdata/daily_challenge/daily_challenge_data.lua @@ -23,6 +23,7 @@ function DailyChallengeData:init(data) self.totalFightCount = data.total_challenge_count or 0 self.todayFightCount = data.today_challenge_count or 0 self.initDay = Time:getBeginningOfServerToday() + self.popTaskTime = LocalData:getChallengeTaskPopTime() self:setDirty() end @@ -289,4 +290,19 @@ function DailyChallengeData:getIsInReset() return self.isInReset end +function DailyChallengeData:getIsPopTask() + if not self:isOpen() then + return false + end + return self.popTaskTime < Time:getBeginningOfServerToday() +end + +function DailyChallengeData:markPopTask() + if self.popTaskTime >= Time:getBeginningOfServerToday() then + return + end + self.popTaskTime = Time:getBeginningOfServerToday() + LocalData:setChallengeTaskPopTime(self.popTaskTime) +end + return DailyChallengeData \ No newline at end of file From ba52482a9508444cb41f267b07f72887f43bb05f Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Mon, 5 Jun 2023 10:46:18 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=8A=80=E8=83=BD=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E8=A7=84=E5=88=99=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/battle/controller/battle_controller_stage.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/app/module/battle/controller/battle_controller_stage.lua b/lua/app/module/battle/controller/battle_controller_stage.lua index e353fc7c..d661eb72 100644 --- a/lua/app/module/battle/controller/battle_controller_stage.lua +++ b/lua/app/module/battle/controller/battle_controller_stage.lua @@ -166,7 +166,7 @@ end function BattleControllerStage:getFixedRogueSkill() if not self.fixedRogueSkill then local config = ConfigManager:getConfig("chapter")[self.chapterId] - if config.involved_skill then + if not DataManager.ChapterData:getChapterPassed(self.chapterId) and config.involved_skill then self.fixedRogueSkill = GFunc.getTable(config.involved_skill) else self.fixedRogueSkill = {}