From c2ddb208b9273a98fe7d1e73d074dfd5743b8618 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Sat, 3 Jun 2023 17:46:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=B8=80=E4=B8=8B=E6=AD=BB?= =?UTF-8?q?=E4=BA=A1=E5=8F=AC=E5=94=A4=E8=A7=A6=E5=8F=91=E6=97=B6=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../battle/controller/battle_controller.lua | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index df5fe867..fd81b6a9 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -691,22 +691,22 @@ function BattleController:checkTeamIsDead(callback) local defTeam = self.battleData:getDefTeam() if not defTeam or defTeam:getIsDead() then -- 怪物死了, 直接进入刷新逻辑 - if self.waveIndex >= self.maxWaveIndex then - if callback then - callback() - end - else - self:onDefDead(function() - self.defTeam:removeAllBuff() - if self.battleData:getDefTeam():getIsDead() then - self:_findNextDefUnit() - else + self:onDefDead(function() + self.defTeam:removeAllBuff() + if self.battleData:getDefTeam():getIsDead() then + if self.waveIndex >= self.maxWaveIndex then if callback() then callback() end + else + self:_findNextDefUnit() end - end) - end + else + if callback() then + callback() + end + end + end) return true end return false