From e801062ca8476284e8a1674433fa1dd635c0ac35 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Tue, 4 Nov 2025 18:05:03 +0800 Subject: [PATCH] fix bug --- lua/app/module/battle/controller/battle_base_controller.lua | 2 +- lua/app/ui/battle/battle_box_open_ui.lua | 1 + lua/app/ui/battle/battle_result_ui.lua | 4 ++-- lua/app/ui/common/cell/reward_cell.lua | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/app/module/battle/controller/battle_base_controller.lua b/lua/app/module/battle/controller/battle_base_controller.lua index e875a04c..2e1476c9 100644 --- a/lua/app/module/battle/controller/battle_base_controller.lua +++ b/lua/app/module/battle/controller/battle_base_controller.lua @@ -2505,7 +2505,7 @@ function BattleBaseController:getRandomSkillList(getCount, isGodSkill, excludeMa local randomSkillNewSkillPool = {} local randomSkillSkillWeight = {} for skillId, info in pairs(cfg) do - if not self:getNotInvolvedSkills()[skillId] then + if not self:getNotInvolvedSkills()[skillId] and not table.containValue(result, skillId) then if info.universal and info.universal == 1 and info.ads_deity and info.ads_deity == 1 then if not info.limit_times or self:getSkillCount(skillId) < info.limit_times then if not self.randomSkillMap[skillId] then diff --git a/lua/app/ui/battle/battle_box_open_ui.lua b/lua/app/ui/battle/battle_box_open_ui.lua index 8f7a881d..86e6ce04 100644 --- a/lua/app/ui/battle/battle_box_open_ui.lua +++ b/lua/app/ui/battle/battle_box_open_ui.lua @@ -110,6 +110,7 @@ function BattleBoxOpenUI:getDouble() self.rewardCell:showRewardNum(self.rewards.num * 2) self.okBtn:setActive(true) self.adBtn:setActive(false) + self.okBtn:setAnchoredPositionX(0) end return BattleBoxOpenUI \ No newline at end of file diff --git a/lua/app/ui/battle/battle_result_ui.lua b/lua/app/ui/battle/battle_result_ui.lua index bae17802..a5b508c0 100644 --- a/lua/app/ui/battle/battle_result_ui.lua +++ b/lua/app/ui/battle/battle_result_ui.lua @@ -155,7 +155,7 @@ function BattleResultUI:onLoadRootComplete() self:refreshArenaBoxNode() end) self:addEventListener(EventManager.CUSTOM_EVENT.BATTLE_DOUBLE_REWARD, function() - self:onReviveDouble() + self:onReceiveDouble() end) end @@ -516,7 +516,7 @@ function BattleResultUI:onGetDouble() ModuleManager.BattleManager:reqChapterDoubleReward() end -function BattleResultUI:onReviveDouble() +function BattleResultUI:onReceiveDouble() self.isDouble = true self:refreshRewards() self.doubleOkBtn:setAnchoredPositionX(0) diff --git a/lua/app/ui/common/cell/reward_cell.lua b/lua/app/ui/common/cell/reward_cell.lua index bfa3438c..1e622ddf 100644 --- a/lua/app/ui/common/cell/reward_cell.lua +++ b/lua/app/ui/common/cell/reward_cell.lua @@ -23,7 +23,7 @@ end function RewardCell:refresh(reward, mask, check) if reward.type == GConst.REWARD_TYPE.ITEM then self.id = reward.item.id - self.num = reward.item.num + self.num = reward.item.num or reward.item.count self.type = reward.type self.itemCell:setActive(true) self.equipCell:setActive(false) @@ -166,8 +166,8 @@ function RewardCell:showRewardNum(numStr) end function RewardCell:setNumTxDouble() - if self.count then - local count = self.count * 2 + if self.num then + local count = self.num * 2 if count > 100 then self:showRewardNum(GFunc.num2Str(count)) else