From e4647b17dcfcdd8de121f30e761c08d57f0f6077 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Mon, 24 Jul 2023 21:47:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/dungeon_armor/dungeon_armor_manager.lua | 6 ++++++ lua/app/ui/dungeon_armor/dungeon_armor_fight_ui.lua | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lua/app/module/dungeon_armor/dungeon_armor_manager.lua b/lua/app/module/dungeon_armor/dungeon_armor_manager.lua index 20b2ae75..3477702c 100644 --- a/lua/app/module/dungeon_armor/dungeon_armor_manager.lua +++ b/lua/app/module/dungeon_armor/dungeon_armor_manager.lua @@ -31,6 +31,12 @@ function DungeonArmorManager:reqFight(chapterId) return end + -- 判断次数 + if armorData:getRemianFarmCount(chapterId) <= 0 then + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1)) + return + end + -- 判断体力 if not DataManager.DungeonData:isEnoughHp(ModuleManager.MODULE_KEY.DUNGEON_ARMOR) then GFunc.showItemNotEnough(GConst.ItemConst.ITEM_ID_VIT) diff --git a/lua/app/ui/dungeon_armor/dungeon_armor_fight_ui.lua b/lua/app/ui/dungeon_armor/dungeon_armor_fight_ui.lua index 474fa80c..0c6dc813 100644 --- a/lua/app/ui/dungeon_armor/dungeon_armor_fight_ui.lua +++ b/lua/app/ui/dungeon_armor/dungeon_armor_fight_ui.lua @@ -91,7 +91,11 @@ function DungeonArmorFightUI:refreshBottom() GFunc.centerImgAndTx(vitIcon, costVit, 10) uiMap["dungeon_armor_fight_ui.bg.bg.btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE)) - uiMap["dungeon_armor_fight_ui.bg.bg.desc_2"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_17, self.armorData:getRemianFarmCount(self.chapterId))) + local str = GConst.EMPTY_STRING + if self.armorData:getStarNum(self.chapterId) > 0 then + str = I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_17, self.armorData:getRemianFarmCount(self.chapterId)) + end + uiMap["dungeon_armor_fight_ui.bg.bg.desc_2"]:setText(str) end return DungeonArmorFightUI \ No newline at end of file