From 0c164c1a2eee662a79e8c14bc2b8134787001bb0 Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Sat, 8 Mar 2025 00:13:33 +0100 Subject: [PATCH] (fix/BT2) UnitAura could pass no unit resulting in nil error --- WeakAuras/BuffTrigger2.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WeakAuras/BuffTrigger2.lua b/WeakAuras/BuffTrigger2.lua index 92ea89e..cd904b4 100644 --- a/WeakAuras/BuffTrigger2.lua +++ b/WeakAuras/BuffTrigger2.lua @@ -1725,7 +1725,7 @@ local function UnitToUnitType(unit) end end -local function ScanUnit(time, unit, unitAuraUpdateInfo) +local function ScanUnit(time, unit) ScanGroupUnit(time, matchDataChanged, UnitToUnitType(unit), unit) end @@ -1891,7 +1891,7 @@ local function EventHandler(frame, event, arg1, arg2, ...) if not exists then tinsert(unitsToRemove, unit) else - ScanGroupUnit(time, matchDataChanged, "group", unit, nil) + ScanGroupUnit(time, matchDataChanged, "group", unit) end end ScanGroupRoleScanFunc(matchDataChanged) @@ -1903,7 +1903,7 @@ local function EventHandler(frame, event, arg1, arg2, ...) if arg1 == "player" then ScanGroupUnit(time, matchDataChanged, nil, "vehicle") end - elseif event == "UNIT_AURA" then + elseif event == "UNIT_AURA" and arg1 then ScanUnit(time, arg1) elseif event == "PLAYER_ENTERING_WORLD" then for unit in pairs(matchData) do