This commit is contained in:
puxuan 2025-11-07 17:42:29 +08:00
parent 2a3786dcb8
commit 98efb8b71e
5 changed files with 17 additions and 7 deletions

View File

@ -112,7 +112,7 @@ function BattleBaseController:refreshWave()
if not self.battleUI then
return
end
self.battleUI:refreshWave(self:getWaveIndex())
self.battleUI:refreshWave(self:getWaveIndex(), nil, nil, self.maxWaveIndex)
end
function BattleBaseController:canRevive()
@ -3310,11 +3310,11 @@ function BattleBaseController:onBattleEnd(noRevive)
if self.victory then
self.atkTeam:playWinAction()
end
local time = 1
if noRevive then
local time = 0.5
if not self.victory and noRevive then
time = 0
elseif self.victory then
time = 2
time = 1
end
self.battleEndSid = ModuleManager.BattleManager:performWithDelayGlobal(function()
if self.battleUI then

View File

@ -102,6 +102,7 @@ function GiftCell:refresh(info, period)
self.claimBtnTxBlue:setAnchoredPositionX(0)
self.claimBtnTx:setVisible(false)
self.claimBtnTxGray:setVisible(false)
self.claimBtn:addRedPoint(67, 28, 0.9)
elseif info.cfg.item_cost then -- 道具购买
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
self.claimBtnIcon:setSprite(GFunc.getIconRes(info.cfg.item_cost[1].id))
@ -113,6 +114,7 @@ function GiftCell:refresh(info, period)
self.claimBtnTxBlue:setVisible(false)
self.claimBtnNumTx:setText(info.cfg.item_cost[1].num)
GFunc.centerImgAndTx(self.claimBtnIcon, self.claimBtnNumTx, 0, nil, -6)
self.claimBtn:removeRedPoint()
elseif info.cfg.recharge_id == nil then -- 广告
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_1")
self.claimBtnAdImg:setActive(true)
@ -124,6 +126,7 @@ function GiftCell:refresh(info, period)
self.claimBtnTxBlue:setVisible(true)
self.claimBtnTx:setVisible(false)
self.claimBtnTxGray:setVisible(false)
self.claimBtn:addRedPoint(67, 28, 0.9)
elseif info.cfg.recharge_id then -- 付费购买
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
self.claimBtnAdImg:setActive(false)
@ -135,6 +138,7 @@ function GiftCell:refresh(info, period)
self.claimBtnTx:setVisible(true)
self.claimBtnTxGray:setVisible(false)
self.claimBtnTxBlue:setVisible(false)
self.claimBtn:removeRedPoint()
end
end

View File

@ -484,11 +484,11 @@ function BattleUI:refreshLv()
self.lastLv = lv
end
function BattleUI:refreshWave(wave, iconAtlas, iconName)
function BattleUI:refreshWave(wave, iconAtlas, iconName, maxWave)
local uiMap = self.root:genAllChildren()
local icon = uiMap["battle_ui.top_node.wave_icon"]
local desc = uiMap["battle_ui.top_node.wave_desc"]
desc:setText(wave)
desc:setText(wave .. "/" .. (maxWave or wave))
GFunc.centerImgAndTx(icon, desc, 10)
iconAtlas = iconAtlas or GConst.ATLAS_PATH.BATTLE

View File

@ -285,6 +285,12 @@ function SummonMainUI:refreshSummonBtn()
self.btnSummonFree:setActive(freeCount > 0)
self.btnSummonOne:setActive(freeCount <= 0)
if adCount > 0 then
self.btnSummonAd:addRedPoint(90, 16, 1)
else
self.btnSummonAd:removeRedPoint()
end
local itemCost = DataManager.SummonData:getSummonItemCost(self.page)
local costId = itemCost.id
local hadNum = DataManager.BagData.ItemData:getItemNumById(costId)

View File

@ -235,7 +235,7 @@ function HeroData:getAllHeroesSort(formationType, elementType)
end
local result = {}
for id, v in pairs(HeroCfg) do
if not elementType or elementType == 0 or elementType == v.position then
if (not elementType or elementType == 0 or elementType == v.position) and (not v.lock_show or self:getHeroIsActive(id)) then
table.insert(result, {cfgId = id, sort = id, elementType = v.position})
end
end