From 594910154bf7d08d33de9d16ae051943f5b54b26 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Tue, 29 Aug 2023 21:32:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/battle/controller/battle_base_controller.lua | 1 + lua/app/ui/arena/cell/arena_grading_reward_cell.lua | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lua/app/module/battle/controller/battle_base_controller.lua b/lua/app/module/battle/controller/battle_base_controller.lua index e0ad0760..e7b7ad0c 100644 --- a/lua/app/module/battle/controller/battle_base_controller.lua +++ b/lua/app/module/battle/controller/battle_base_controller.lua @@ -223,6 +223,7 @@ function BattleBaseController:onDefDead(callback) local monsterId = self.defTeam:getMainUnit().unitEntity:getDeathSummon() if monsterId > 0 then self:generateMonsterById(monsterId, function() + self.curWaveMonsterDead = false if callback then callback() end diff --git a/lua/app/ui/arena/cell/arena_grading_reward_cell.lua b/lua/app/ui/arena/cell/arena_grading_reward_cell.lua index 9114a954..af1dda09 100644 --- a/lua/app/ui/arena/cell/arena_grading_reward_cell.lua +++ b/lua/app/ui/arena/cell/arena_grading_reward_cell.lua @@ -153,9 +153,17 @@ function ArenaGradingRewardCell:refresh(id) for idx, reward in ipairs(self.rewards) do if cfg.reward[idx] then + reward:addClickListener(nil) reward:setVisible(true) reward:refreshByConfig(cfg.reward[idx], isReceived, isReceived) reward:showLight(canGet and not isReceived, self.uiRoot) + if canGet and not isReceived then + reward:addClickListener(function() + if DataManager.ArenaData:canGetGradingReward(self.id) and not DataManager.ArenaData:isReceivedGradingReward(self.id) then + ModuleManager.ArenaManager:reqGradingReward(self.id) + end + end) + end else reward:setVisible(false) end