From 0db96eb021eeae003ea1454fc435af82c592b353 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Thu, 30 Oct 2025 16:15:39 +0800 Subject: [PATCH] fix bug --- lua/app/module/dungeon/dungeon_manager.lua | 4 ++-- lua/app/ui/battle/battle_result_ui.lua | 6 ++++-- lua/app/ui/dungeon/cell/dungeon_gold_cell.lua | 12 ++++++------ lua/app/ui/dungeon/cell/dungeon_material_cell.lua | 12 ++++++------ 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/lua/app/module/dungeon/dungeon_manager.lua b/lua/app/module/dungeon/dungeon_manager.lua index 7ce26295..b78af477 100644 --- a/lua/app/module/dungeon/dungeon_manager.lua +++ b/lua/app/module/dungeon/dungeon_manager.lua @@ -166,14 +166,14 @@ function DungeonManager:sweepDungeonDaily(id) local dungeonDailyType = DataManager.DungeonDailyData:getDungeonDailyTypeByChapterId(id) if dungeonDailyType == GConst.DungeonConst.DUNGEON_DAILY_TYPE.GOLD then local remainTimes = DataManager.DungeonDailyData.GoldData:getTodayRemainTimes() - local ticketCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.DUNGEON_TICKET_1) + local ticketCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_DUNGEON_TICKET_1) if remainTimes <= 0 and ticketCount <= 0 then GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1)) return end elseif dungeonDailyType == GConst.DungeonConst.DUNGEON_DAILY_TYPE.MATERIAL then local remainTimes = DataManager.DungeonDailyData.MaterialData:getTodayRemainTimes() - local ticketCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.DUNGEON_TICKET_2) + local ticketCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_DUNGEON_TICKET_2) if remainTimes <= 0 and ticketCount <= 0 then GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1)) return diff --git a/lua/app/ui/battle/battle_result_ui.lua b/lua/app/ui/battle/battle_result_ui.lua index ec27364f..b31a773f 100644 --- a/lua/app/ui/battle/battle_result_ui.lua +++ b/lua/app/ui/battle/battle_result_ui.lua @@ -437,14 +437,16 @@ function BattleResultUI:refreshUnitInfo() local iconName = "common_dec_3" if self.battleType == GConst.BattleConst.BATTLE_TYPE.DUNGEON_GOLD then - iconName = "common_dec_15" + iconName = "common_dec_3" local round = self.remainRound or 0 self.unitTxDesc2:setText(round) self.unitTxDesc1:setText(I18N:getGlobalText(I18N.GlobalConst.ROUND_LEFT)) else self.unitTxDesc1:setText(GConst.EMPTY_STRING) end - self.unitImgBattleIcon:setSprite(GConst.ATLAS_PATH.COMMON, iconName) + self.unitImgBattleIcon:setSprite(GConst.ATLAS_PATH.COMMON, iconName, function() + self.unitImgBattleIcon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize() + end) GFunc.centerImgAndTx(self.unitImgBattleIcon, self.unitTxDesc2, 7) end diff --git a/lua/app/ui/dungeon/cell/dungeon_gold_cell.lua b/lua/app/ui/dungeon/cell/dungeon_gold_cell.lua index 4ceb9407..a4841944 100644 --- a/lua/app/ui/dungeon/cell/dungeon_gold_cell.lua +++ b/lua/app/ui/dungeon/cell/dungeon_gold_cell.lua @@ -6,12 +6,12 @@ function DungeonGoldCell:init() self.challengeBtn = uiMap["gold_cell.challenge_btn"] self.challengeBtn:addClickListener(function() if self.chapterId then - local remainTimes = DataManager.DungeonDailyData.GoldData:getTodayRemainTimes() - local ticketCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_DUNGEON_TICKET_1) - if remainTimes <= 0 and ticketCount <= 0 then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1)) - return - end + -- local remainTimes = DataManager.DungeonDailyData.GoldData:getTodayRemainTimes() + -- local ticketCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_DUNGEON_TICKET_1) + -- if remainTimes <= 0 and ticketCount <= 0 then + -- GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1)) + -- return + -- end -- ModuleManager.ChapterManager:showMainBattleEntryUI(ModuleManager.BattleManager.BATTLE_TYPE.DUNGEON,function() -- self:OnClickStrtGame() -- end, self.chapterId, false, GConst.DungeonConst.DUNGEON_DAILY_TYPE.GOLD) diff --git a/lua/app/ui/dungeon/cell/dungeon_material_cell.lua b/lua/app/ui/dungeon/cell/dungeon_material_cell.lua index dd7aa740..de66b07c 100644 --- a/lua/app/ui/dungeon/cell/dungeon_material_cell.lua +++ b/lua/app/ui/dungeon/cell/dungeon_material_cell.lua @@ -6,12 +6,12 @@ function DungeonMaterialCell:init() self.challengeBtn = uiMap["material_cell.challenge_btn"] self.challengeBtn:addClickListener(function() if self.chapterId then - local remainTimes = DataManager.DungeonDailyData.MaterialData:getTodayRemainTimes() - local ticketCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_DUNGEON_TICKET_2) - if remainTimes <= 0 and ticketCount <= 0 then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1)) - return - end + -- local remainTimes = DataManager.DungeonDailyData.MaterialData:getTodayRemainTimes() + -- local ticketCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_DUNGEON_TICKET_2) + -- if remainTimes <= 0 and ticketCount <= 0 then + -- GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1)) + -- return + -- end -- ModuleManager.ChapterManager:showMainBattleEntryUI(ModuleManager.BattleManager.BATTLE_TYPE.DUNGEON,function() -- self:OnClickStrtGame() -- end, self.chapterId, false, GConst.DungeonConst.DUNGEON_DAILY_TYPE.MATERIAL)