From 784b56cefe81e166373f4541dd1791bcd92d3441 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Wed, 29 Oct 2025 21:21:27 +0800 Subject: [PATCH] fix bug --- lua/app/module/summon/summon_manager.lua | 23 +++++++++++++---------- lua/app/ui/arena/arena_rank_ui.lua | 6 +++--- lua/app/ui/arena/cell/arena_rank_cell.lua | 6 +++--- lua/app/ui/battle/battle_result_ui.lua | 2 +- lua/app/ui/common/cell/reward_cell.lua | 10 ++++++++++ lua/app/ui/tips/formation_tips.lua | 4 ++-- 6 files changed, 32 insertions(+), 19 deletions(-) diff --git a/lua/app/module/summon/summon_manager.lua b/lua/app/module/summon/summon_manager.lua index 9e2a7010..6a8fdac1 100644 --- a/lua/app/module/summon/summon_manager.lua +++ b/lua/app/module/summon/summon_manager.lua @@ -49,22 +49,25 @@ function SummonManager:onForceSummonRsp(result) EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.FORCE_SUMMON) return end - DataManager.SummonData:updateSummonCount(result.reqData.id, result.reqData.times, result.reqData.free) local newHero = {} local guarantee1 = DataManager.SummonData:getSummonWishGuarantee1(result.reqData.id) for _, reward in pairs(result.rewards) do - local isNew = DataManager.HeroData:getHeroIsNew(reward.item.id) - if isNew then - table.insert(newHero, reward.item.id) - end - if guarantee1 then - if DataManager.HeroData:getHeroQlt(reward.item.id) == 5 then - DataManager.SummonData:setSummonTrigger(result.reqData.id, true) - else - DataManager.SummonData:setSummonTrigger(result.reqData.id, false) + local cfg = ConfigManager:getConfig("item")[reward.item.id] + if cfg.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then + local isNew = DataManager.HeroData:getHeroIsNew(reward.item.id) + if isNew then + table.insert(newHero, reward.item.id) + end + if guarantee1 then + if DataManager.HeroData:getHeroQlt(reward.item.id) == 5 then + DataManager.SummonData:setSummonTrigger(result.reqData.id, true) + else + DataManager.SummonData:setSummonTrigger(result.reqData.id, false) + 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) BIReport:postForceSummon(result.reqData.free, result.reqData.times, result.rewards, result.costs) diff --git a/lua/app/ui/arena/arena_rank_ui.lua b/lua/app/ui/arena/arena_rank_ui.lua index d33d0d08..78e692ee 100644 --- a/lua/app/ui/arena/arena_rank_ui.lua +++ b/lua/app/ui/arena/arena_rank_ui.lua @@ -70,15 +70,15 @@ function ArenaRankUI:onRefresh() if rank and rank == 1 then self.txRank:setActive(false) 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 self.txRank:setActive(false) 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 self.txRank:setActive(false) 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 self.imgRank:setActive(false) self.txRank:setActive(true) diff --git a/lua/app/ui/arena/cell/arena_rank_cell.lua b/lua/app/ui/arena/cell/arena_rank_cell.lua index ab42c22c..b280491e 100644 --- a/lua/app/ui/arena/cell/arena_rank_cell.lua +++ b/lua/app/ui/arena/cell/arena_rank_cell.lua @@ -40,17 +40,17 @@ function ArenaRankCell:refresh(rank) if rank == 1 then self.txRank:setActive(false) 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") elseif rank == 2 then self.txRank:setActive(false) 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") elseif rank == 3 then self.txRank:setActive(false) 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") else self.imgRank:setActive(false) diff --git a/lua/app/ui/battle/battle_result_ui.lua b/lua/app/ui/battle/battle_result_ui.lua index e50b4de4..ec27364f 100644 --- a/lua/app/ui/battle/battle_result_ui.lua +++ b/lua/app/ui/battle/battle_result_ui.lua @@ -378,7 +378,7 @@ function BattleResultUI:refreshRewards() if index <= MAX_SCROLL_SHOW_COUNT and self.animRewards[index] == nil then self.animRewards[index] = self:showRewardAppearAnim(index, cell) 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) if self.isDouble then cell:setNumTxDouble() diff --git a/lua/app/ui/common/cell/reward_cell.lua b/lua/app/ui/common/cell/reward_cell.lua index 0ab7aacf..dbc6baed 100644 --- a/lua/app/ui/common/cell/reward_cell.lua +++ b/lua/app/ui/common/cell/reward_cell.lua @@ -11,6 +11,8 @@ function RewardCell:init() self.txProb = uiMap["reward_cell.prob.tx_prob"] self.firstNode = uiMap["reward_cell.first_bg"] 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:hideFrameAnimation() @@ -128,6 +130,14 @@ function RewardCell:hideFrameAnimation() self.frameAni:setActive(false) 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) self.itemCell:showMask(show) self.equipCell:showMask(show) diff --git a/lua/app/ui/tips/formation_tips.lua b/lua/app/ui/tips/formation_tips.lua index 9fd76e03..dfcd4a6f 100644 --- a/lua/app/ui/tips/formation_tips.lua +++ b/lua/app/ui/tips/formation_tips.lua @@ -54,9 +54,9 @@ function FormationTips:onClose() end function FormationTips:adaptWhenOverScreen(...) - local xOffset, _ = BaseTips.adaptWhenOverScreen(self, ...) + local xOffset, _ = BaseTips.adaptWhenOverScreen(self.bg, ...) if self.arrow then - self.arrow:setAnchoredPositionX(110 - xOffset) + self.arrow:setAnchoredPositionX(90 - xOffset) end end