This commit is contained in:
puxuan 2025-10-29 21:21:27 +08:00
parent 29aa74f379
commit 784b56cefe
6 changed files with 32 additions and 19 deletions

View File

@ -49,22 +49,25 @@ function SummonManager:onForceSummonRsp(result)
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.FORCE_SUMMON) EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.FORCE_SUMMON)
return return
end end
DataManager.SummonData:updateSummonCount(result.reqData.id, result.reqData.times, result.reqData.free)
local newHero = {} local newHero = {}
local guarantee1 = DataManager.SummonData:getSummonWishGuarantee1(result.reqData.id) local guarantee1 = DataManager.SummonData:getSummonWishGuarantee1(result.reqData.id)
for _, reward in pairs(result.rewards) do for _, reward in pairs(result.rewards) do
local isNew = DataManager.HeroData:getHeroIsNew(reward.item.id) local cfg = ConfigManager:getConfig("item")[reward.item.id]
if isNew then if cfg.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then
table.insert(newHero, reward.item.id) local isNew = DataManager.HeroData:getHeroIsNew(reward.item.id)
end if isNew then
if guarantee1 then table.insert(newHero, reward.item.id)
if DataManager.HeroData:getHeroQlt(reward.item.id) == 5 then end
DataManager.SummonData:setSummonTrigger(result.reqData.id, true) if guarantee1 then
else if DataManager.HeroData:getHeroQlt(reward.item.id) == 5 then
DataManager.SummonData:setSummonTrigger(result.reqData.id, false) DataManager.SummonData:setSummonTrigger(result.reqData.id, true)
else
DataManager.SummonData:setSummonTrigger(result.reqData.id, false)
end
end end
end end
end end
DataManager.SummonData:updateSummonCount(result.reqData.id, result.reqData.times, result.reqData.free)
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.FORCE_SUMMON, result, newHero) EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.FORCE_SUMMON, result, newHero)
BIReport:postForceSummon(result.reqData.free, result.reqData.times, result.rewards, result.costs) BIReport:postForceSummon(result.reqData.free, result.reqData.times, result.rewards, result.costs)

View File

@ -70,15 +70,15 @@ function ArenaRankUI:onRefresh()
if rank and rank == 1 then if rank and rank == 1 then
self.txRank:setActive(false) self.txRank:setActive(false)
self.imgRank:setActive(true) self.imgRank:setActive(true)
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_1") self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_1")
elseif rank and rank == 2 then elseif rank and rank == 2 then
self.txRank:setActive(false) self.txRank:setActive(false)
self.imgRank:setActive(true) self.imgRank:setActive(true)
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_2") self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_2")
elseif rank and rank == 3 then elseif rank and rank == 3 then
self.txRank:setActive(false) self.txRank:setActive(false)
self.imgRank:setActive(true) self.imgRank:setActive(true)
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_3") self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_3")
elseif rank and rank > 0 then elseif rank and rank > 0 then
self.imgRank:setActive(false) self.imgRank:setActive(false)
self.txRank:setActive(true) self.txRank:setActive(true)

View File

@ -40,17 +40,17 @@ function ArenaRankCell:refresh(rank)
if rank == 1 then if rank == 1 then
self.txRank:setActive(false) self.txRank:setActive(false)
self.imgRank:setActive(true) self.imgRank:setActive(true)
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_1") self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_1")
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_2") self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_2")
elseif rank == 2 then elseif rank == 2 then
self.txRank:setActive(false) self.txRank:setActive(false)
self.imgRank:setActive(true) self.imgRank:setActive(true)
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_2") self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_2")
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_3") self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_3")
elseif rank == 3 then elseif rank == 3 then
self.txRank:setActive(false) self.txRank:setActive(false)
self.imgRank:setActive(true) self.imgRank:setActive(true)
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_3") self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_3")
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_4") self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_4")
else else
self.imgRank:setActive(false) self.imgRank:setActive(false)

View File

@ -378,7 +378,7 @@ function BattleResultUI:refreshRewards()
if index <= MAX_SCROLL_SHOW_COUNT and self.animRewards[index] == nil then if index <= MAX_SCROLL_SHOW_COUNT and self.animRewards[index] == nil then
self.animRewards[index] = self:showRewardAppearAnim(index, cell) self.animRewards[index] = self:showRewardAppearAnim(index, cell)
end end
cell:showRightUpIcon(index <= self.mysteryBoxIdx, GConst.ATLAS_PATH.COMMON, "common_chest_1") cell:showRightUpIcon(index <= self.mysteryBoxIdx, GConst.ATLAS_PATH.COMMON, "common_chest_2")
cell:setShowFirstTag(index <= self.firstPassIdx) cell:setShowFirstTag(index <= self.firstPassIdx)
if self.isDouble then if self.isDouble then
cell:setNumTxDouble() cell:setNumTxDouble()

View File

@ -11,6 +11,8 @@ function RewardCell:init()
self.txProb = uiMap["reward_cell.prob.tx_prob"] self.txProb = uiMap["reward_cell.prob.tx_prob"]
self.firstNode = uiMap["reward_cell.first_bg"] self.firstNode = uiMap["reward_cell.first_bg"]
self.txfirst = uiMap["reward_cell.first_bg.first_tx"] self.txfirst = uiMap["reward_cell.first_bg.first_tx"]
self.rightUpIcon = uiMap["reward_cell.right_up_icon"]
self.rightUpIcon:setActive(false)
self:setShowSelect(false) self:setShowSelect(false)
self:hideFrameAnimation() self:hideFrameAnimation()
@ -128,6 +130,14 @@ function RewardCell:hideFrameAnimation()
self.frameAni:setActive(false) self.frameAni:setActive(false)
end end
function RewardCell:showRightUpIcon(show, atlas, iconName)
self.rightUpIcon:setActive(show)
if not show then
return
end
self.rightUpIcon:setSprite(atlas, iconName)
end
function RewardCell:showMask(show, syncCheck) function RewardCell:showMask(show, syncCheck)
self.itemCell:showMask(show) self.itemCell:showMask(show)
self.equipCell:showMask(show) self.equipCell:showMask(show)

View File

@ -54,9 +54,9 @@ function FormationTips:onClose()
end end
function FormationTips:adaptWhenOverScreen(...) function FormationTips:adaptWhenOverScreen(...)
local xOffset, _ = BaseTips.adaptWhenOverScreen(self, ...) local xOffset, _ = BaseTips.adaptWhenOverScreen(self.bg, ...)
if self.arrow then if self.arrow then
self.arrow:setAnchoredPositionX(110 - xOffset) self.arrow:setAnchoredPositionX(90 - xOffset)
end end
end end