This commit is contained in:
Bunny67
2020-06-08 21:47:02 +03:00
parent 8129729f84
commit 3b54dc21ef
3 changed files with 7 additions and 3 deletions
+2
View File
@@ -1208,6 +1208,7 @@ do
-- Note: Using UNIT_AURA in addition to COMBAT_LOG_EVENT_UNFILTERED, -- Note: Using UNIT_AURA in addition to COMBAT_LOG_EVENT_UNFILTERED,
-- because the combat log event does not contain duration information -- because the combat log event does not contain duration information
local uid = ...; local uid = ...;
if not uid then return end
local guid = UnitGUID(uid); local guid = UnitGUID(uid);
for spellName, auras in pairs(loaded_auras) do for spellName, auras in pairs(loaded_auras) do
@@ -1376,6 +1377,7 @@ frame:SetScript("OnEvent", function (frame, event, arg1, arg2, ...)
WeakAuras.ScanAuras(unit); WeakAuras.ScanAuras(unit);
end end
elseif(event == "UNIT_AURA") then elseif(event == "UNIT_AURA") then
if not arg1 then return end
if( if(
loaded_auras[arg1] loaded_auras[arg1]
or ( or (
+4 -2
View File
@@ -1300,7 +1300,7 @@ local function UpdateStates(matchDataChanged, time)
end end
local function ScanGroupUnit(time, matchDataChanged, unitType, unit) local function ScanGroupUnit(time, matchDataChanged, unitType, unit)
local unitExists = UnitExists(unit) local unitExists = UnitExists(unit) == 1 and true or false
if existingUnits[unit] ~= unitExists then if existingUnits[unit] ~= unitExists then
existingUnits[unit] = unitExists existingUnits[unit] = unitExists
@@ -1522,6 +1522,7 @@ local function EventHandler(frame, event, arg1, arg2, ...)
ScanGroupUnit(time, matchDataChanged, nil, "vehicle") ScanGroupUnit(time, matchDataChanged, nil, "vehicle")
end end
elseif event == "UNIT_AURA" then elseif event == "UNIT_AURA" then
if not arg1 then return end
ScanUnit(time, arg1) ScanUnit(time, arg1)
elseif event == "PLAYER_ENTERING_WORLD" then elseif event == "PLAYER_ENTERING_WORLD" then
for unit in pairs(matchData) do for unit in pairs(matchData) do
@@ -1700,7 +1701,7 @@ local function LoadAura(id, triggernum, triggerInfo)
tinsert(unitExistScanFunc[triggerInfo.unit][id], triggerInfo) tinsert(unitExistScanFunc[triggerInfo.unit][id], triggerInfo)
if existingUnits[triggerInfo.unit] == nil then if existingUnits[triggerInfo.unit] == nil then
existingUnits[triggerInfo.unit] = UnitExists(triggerInfo.unit) existingUnits[triggerInfo.unit] = UnitExists(triggerInfo.unit) == 1 and true or false
end end
end end
@@ -3023,6 +3024,7 @@ function BuffTrigger.HandleMultiEvent(frame, event, ...)
ReleaseUID(unit) ReleaseUID(unit)
elseif event == "UNIT_AURA" then elseif event == "UNIT_AURA" then
local unit = ... local unit = ...
if not unit then return end
local guid = UnitGUID(unit) local guid = UnitGUID(unit)
if matchDataMulti[guid] then if matchDataMulti[guid] then
CheckAurasMulti(matchDataMulti[guid], unit, "HELPFUL") CheckAurasMulti(matchDataMulti[guid], unit, "HELPFUL")
+1 -1
View File
@@ -95,7 +95,7 @@ function WeakAuras.UnitExistsFixed(unit, smart)
return false return false
end end
end end
return UnitExists(unit) return UnitExists(unit) == 1 and true or false
end end
function WeakAuras.split(input) function WeakAuras.split(input)