fix bug
This commit is contained in:
parent
2a3786dcb8
commit
98efb8b71e
@ -112,7 +112,7 @@ function BattleBaseController:refreshWave()
|
|||||||
if not self.battleUI then
|
if not self.battleUI then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.battleUI:refreshWave(self:getWaveIndex())
|
self.battleUI:refreshWave(self:getWaveIndex(), nil, nil, self.maxWaveIndex)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBaseController:canRevive()
|
function BattleBaseController:canRevive()
|
||||||
@ -3310,11 +3310,11 @@ function BattleBaseController:onBattleEnd(noRevive)
|
|||||||
if self.victory then
|
if self.victory then
|
||||||
self.atkTeam:playWinAction()
|
self.atkTeam:playWinAction()
|
||||||
end
|
end
|
||||||
local time = 1
|
local time = 0.5
|
||||||
if noRevive then
|
if not self.victory and noRevive then
|
||||||
time = 0
|
time = 0
|
||||||
elseif self.victory then
|
elseif self.victory then
|
||||||
time = 2
|
time = 1
|
||||||
end
|
end
|
||||||
self.battleEndSid = ModuleManager.BattleManager:performWithDelayGlobal(function()
|
self.battleEndSid = ModuleManager.BattleManager:performWithDelayGlobal(function()
|
||||||
if self.battleUI then
|
if self.battleUI then
|
||||||
|
|||||||
@ -102,6 +102,7 @@ function GiftCell:refresh(info, period)
|
|||||||
self.claimBtnTxBlue:setAnchoredPositionX(0)
|
self.claimBtnTxBlue:setAnchoredPositionX(0)
|
||||||
self.claimBtnTx:setVisible(false)
|
self.claimBtnTx:setVisible(false)
|
||||||
self.claimBtnTxGray:setVisible(false)
|
self.claimBtnTxGray:setVisible(false)
|
||||||
|
self.claimBtn:addRedPoint(67, 28, 0.9)
|
||||||
elseif info.cfg.item_cost then -- 道具购买
|
elseif info.cfg.item_cost then -- 道具购买
|
||||||
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
|
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
|
||||||
self.claimBtnIcon:setSprite(GFunc.getIconRes(info.cfg.item_cost[1].id))
|
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.claimBtnTxBlue:setVisible(false)
|
||||||
self.claimBtnNumTx:setText(info.cfg.item_cost[1].num)
|
self.claimBtnNumTx:setText(info.cfg.item_cost[1].num)
|
||||||
GFunc.centerImgAndTx(self.claimBtnIcon, self.claimBtnNumTx, 0, nil, -6)
|
GFunc.centerImgAndTx(self.claimBtnIcon, self.claimBtnNumTx, 0, nil, -6)
|
||||||
|
self.claimBtn:removeRedPoint()
|
||||||
elseif info.cfg.recharge_id == nil then -- 广告
|
elseif info.cfg.recharge_id == nil then -- 广告
|
||||||
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_1")
|
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_1")
|
||||||
self.claimBtnAdImg:setActive(true)
|
self.claimBtnAdImg:setActive(true)
|
||||||
@ -124,6 +126,7 @@ function GiftCell:refresh(info, period)
|
|||||||
self.claimBtnTxBlue:setVisible(true)
|
self.claimBtnTxBlue:setVisible(true)
|
||||||
self.claimBtnTx:setVisible(false)
|
self.claimBtnTx:setVisible(false)
|
||||||
self.claimBtnTxGray:setVisible(false)
|
self.claimBtnTxGray:setVisible(false)
|
||||||
|
self.claimBtn:addRedPoint(67, 28, 0.9)
|
||||||
elseif info.cfg.recharge_id then -- 付费购买
|
elseif info.cfg.recharge_id then -- 付费购买
|
||||||
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
|
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
|
||||||
self.claimBtnAdImg:setActive(false)
|
self.claimBtnAdImg:setActive(false)
|
||||||
@ -135,6 +138,7 @@ function GiftCell:refresh(info, period)
|
|||||||
self.claimBtnTx:setVisible(true)
|
self.claimBtnTx:setVisible(true)
|
||||||
self.claimBtnTxGray:setVisible(false)
|
self.claimBtnTxGray:setVisible(false)
|
||||||
self.claimBtnTxBlue:setVisible(false)
|
self.claimBtnTxBlue:setVisible(false)
|
||||||
|
self.claimBtn:removeRedPoint()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -484,11 +484,11 @@ function BattleUI:refreshLv()
|
|||||||
self.lastLv = lv
|
self.lastLv = lv
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleUI:refreshWave(wave, iconAtlas, iconName)
|
function BattleUI:refreshWave(wave, iconAtlas, iconName, maxWave)
|
||||||
local uiMap = self.root:genAllChildren()
|
local uiMap = self.root:genAllChildren()
|
||||||
local icon = uiMap["battle_ui.top_node.wave_icon"]
|
local icon = uiMap["battle_ui.top_node.wave_icon"]
|
||||||
local desc = uiMap["battle_ui.top_node.wave_desc"]
|
local desc = uiMap["battle_ui.top_node.wave_desc"]
|
||||||
desc:setText(wave)
|
desc:setText(wave .. "/" .. (maxWave or wave))
|
||||||
GFunc.centerImgAndTx(icon, desc, 10)
|
GFunc.centerImgAndTx(icon, desc, 10)
|
||||||
|
|
||||||
iconAtlas = iconAtlas or GConst.ATLAS_PATH.BATTLE
|
iconAtlas = iconAtlas or GConst.ATLAS_PATH.BATTLE
|
||||||
|
|||||||
@ -285,6 +285,12 @@ function SummonMainUI:refreshSummonBtn()
|
|||||||
self.btnSummonFree:setActive(freeCount > 0)
|
self.btnSummonFree:setActive(freeCount > 0)
|
||||||
self.btnSummonOne: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 itemCost = DataManager.SummonData:getSummonItemCost(self.page)
|
||||||
local costId = itemCost.id
|
local costId = itemCost.id
|
||||||
local hadNum = DataManager.BagData.ItemData:getItemNumById(costId)
|
local hadNum = DataManager.BagData.ItemData:getItemNumById(costId)
|
||||||
|
|||||||
@ -235,7 +235,7 @@ function HeroData:getAllHeroesSort(formationType, elementType)
|
|||||||
end
|
end
|
||||||
local result = {}
|
local result = {}
|
||||||
for id, v in pairs(HeroCfg) do
|
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})
|
table.insert(result, {cfgId = id, sort = id, elementType = v.position})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user