(fix/BT2) UnitAura could pass no unit resulting in nil error

This commit is contained in:
NoM0Re
2025-03-08 00:13:33 +01:00
parent e1a394b54a
commit 0c164c1a2e
+3 -3
View File
@@ -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