From fed9afed6211c21100f98f7b802bae9612c9e486 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Sun, 24 Apr 2022 11:38:41 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=3D=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E9=80=89=E6=8B=A9=E9=80=BB=E8=BE=91=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=A9=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index cb0d162c03..8b489ada7e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -451,9 +451,11 @@ function BattleUtil.ChooseTarget(role, chooseId,queryType) if aaa~=nil then --LogError(aaa.position) end - aaa.isRealDead=false - arr={} - table.insert(arr,aaa) + if aaa then + aaa.isRealDead=false + arr={} + table.insert(arr,aaa) + end -- return aaa elseif chooseWeight ==16 then --(血量百分比 含不灭) BattleUtil.SortByHpFactor(arr, sort)