diff --git a/lua/app/ui/dungeon/cell/dungeon_target_cell.lua b/lua/app/ui/dungeon/cell/dungeon_target_cell.lua index ea130f59..c6223a3b 100644 --- a/lua/app/ui/dungeon/cell/dungeon_target_cell.lua +++ b/lua/app/ui/dungeon/cell/dungeon_target_cell.lua @@ -38,7 +38,7 @@ function DungeonTargetCell:showWeapon() self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_19, self.dungeonId)) - if weaponData:canFightChapter(self.dungeonId) and weaponData:canFarmChapter(self.dungeonId) and remainTime > 0 then + if weaponData:canFarmChapter(self.dungeonId) and remainTime > 0 then -- 扫荡 self.isSmash = true self.timeObj:setActive(true) @@ -47,9 +47,8 @@ function DungeonTargetCell:showWeapon() self.btn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_3") self.txTime:setText(remainTime .."/" .. weaponData:getDialyFarmLimit()) self.txPowerNum:setText(GFunc.getRewardNum(weaponData:getChallengeHpCost())) - GFunc.centerImgAndTx(self.imgPowerIcon, self.txPowerNum, 3) + GFunc.centerImgAndTx(self.imgPowerIcon, self.txPowerNum, 2) self.btn:setTouchEnable(true) - elseif weaponData:canFightChapter(self.dungeonId) then -- 前往 self.timeObj:setActive(false) @@ -78,33 +77,34 @@ end function DungeonTargetCell:showArmor() local armorData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_ARMOR) - local remainTime = armorData:getRemianFarmCount() + local remainTime = armorData:getRemianFarmCount(self.dungeonId) - self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_19, self.dungeonId)) + local cfg = armorData:getConfig(self.dungeonId) + self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_20, cfg.chapter, cfg.stage)) - if armorData:canFightChapter(self.dungeonId) and armorData:canFarmChapter(self.dungeonId) and remainTime > 0 then + if armorData:canFarmChapter(self.dungeonId) and remainTime > 0 then -- 扫荡 self.isSmash = true - self.timeObj:setVisible(true) - self.powerObj:setVisible(true) + self.timeObj:setActive(true) + self.powerObj:setActive(true) self.txBtn:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH)) self.btn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_3") - self.txTime:setText(remainTime .."/" .. armorData:getDialyFarmLimit()) + self.txTime:setText(remainTime .."/" .. armorData:getDialyFarmLimit(self.dungeonId)) self.txPowerNum:setText(GFunc.getRewardNum(armorData:getChallengeHpCost())) - GFunc.centerImgAndTx(self.imgPowerIcon, self.txPowerNum, 3) + GFunc.centerImgAndTx(self.imgPowerIcon, self.txPowerNum, 2) self.btn:setTouchEnable(true) elseif armorData:canFightChapter(self.dungeonId) then -- 前往 - self.timeObj:setVisible(false) - self.powerObj:setVisible(false) + self.timeObj:setActive(false) + self.powerObj:setActive(false) self.txBtn:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_21)) self.btn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_3") self.btn:setTouchEnable(true) else -- 未开启 - self.timeObj:setVisible(false) - self.powerObj:setVisible(false) + self.timeObj:setActive(false) + self.powerObj:setActive(false) self.txBtn:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_22)) self.btn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_3") self.btn:setTouchEnable(false)