from retail

This commit is contained in:
Bunny67
2020-06-29 18:43:40 +03:00
parent 4d0cd34a33
commit ba951af876
12 changed files with 610 additions and 224 deletions
+15 -15
View File
@@ -342,12 +342,12 @@ local function UpdateMatchData(time, matchDataChanged, unit, index, filter, name
return changed or data.lastChanged == time
end
local function calculateNextCheck(triggerInfoRemaing, auraDataRemaing, auraDataExpirationTime, nextCheck)
if auraDataRemaing > 0 and auraDataRemaing >= triggerInfoRemaing then
local function calculateNextCheck(triggerInfoRemaining, auraDataRemaining, auraDataExpirationTime, nextCheck)
if auraDataRemaining > 0 and auraDataRemaining >= triggerInfoRemaining then
if not nextCheck then
return auraDataExpirationTime - triggerInfoRemaing
return auraDataExpirationTime - triggerInfoRemaining
else
return min(auraDataExpirationTime - triggerInfoRemaing, nextCheck)
return min(auraDataExpirationTime - triggerInfoRemaining, nextCheck)
end
end
return nextCheck
@@ -815,7 +815,7 @@ local function GetAllUnits(unit, allUnits)
local i = 1
local max
if unit == "boss" then
max = 4
max = MAX_BOSS_FRAMES
elseif unit == "arena" then
max = 5
else
@@ -873,7 +873,7 @@ local function TriggerInfoApplies(triggerInfo, unit)
if triggerInfo.unit == "group" and triggerInfo.groupSubType == "party" then
if IsInRaid() then
-- Filter our player/party# while in raid and keep only raid units that are correct
if unit:sub(1,4) ~= "raid" or not UnitIsUnit("player", unit) then
if not WeakAuras.multiUnitUnits.raid[unit] or not UnitIsUnit("player", unit) then
return false
end
else
@@ -884,11 +884,11 @@ local function TriggerInfoApplies(triggerInfo, unit)
end
-- Filter our player/party# while in raid
if (triggerInfo.unit == "group" and triggerInfo.groupSubType == "group" and IsInRaid() and unit:sub(1,4) ~= "raid") then
if (triggerInfo.unit == "group" and triggerInfo.groupSubType == "group" and IsInRaid() and not WeakAuras.multiUnitUnits.raid[unit]) then
return false
end
if triggerInfo.unit == "group" and triggerInfo.groupSubType == "raid" and unit:sub(1,4) ~= "raid" then
if triggerInfo.unit == "group" and triggerInfo.groupSubType == "raid" and not WeakAuras.multiUnitUnits.raid[unit] then
return false
end
@@ -1356,13 +1356,13 @@ end
local function ScanUnit(time, arg1)
if not arg1 then return end
if (arg1:sub(1,4) == "raid" and IsInRaid()) then
if (WeakAuras.multiUnitUnits.raid[arg1] and IsInRaid()) then
ScanGroupUnit(time, matchDataChanged, "group", arg1)
elseif ((arg1:sub(1,5) == "party" or arg1 == "player") and not IsInRaid()) then
elseif (WeakAuras.multiUnitUnits.party[arg1] and not IsInRaid()) then
ScanGroupUnit(time, matchDataChanged, "group", arg1)
elseif arg1:sub(1,4) == "boss" then
elseif WeakAuras.multiUnitUnits.boss[arg1] then
ScanGroupUnit(time, matchDataChanged, "boss", arg1)
elseif arg1:sub(1,5) == "arena" then
elseif WeakAuras.multiUnitUnits.arena[arg1] then
ScanGroupUnit(time, matchDataChanged, "arena", arg1)
else
ScanGroupUnit(time, matchDataChanged, nil, arg1)
@@ -1506,7 +1506,7 @@ local function EventHandler(frame, event, arg1, arg2, ...)
tinsert(unitsToRemove, unit)
end
end
elseif event == "PARTY_MEMBERS_CHANGED" or event == "RAID_ROSTER_UPDATE" then
elseif event == "PARTY_MEMBERS_CHANGED" or event == "RAID_ROSTER_UPDATE" then
local unitsToCheck = {}
for unit in GetAllUnits("group", true) do
RecheckActiveForUnitType("group", unit, deactivatedTriggerInfos)
@@ -1515,11 +1515,11 @@ local function EventHandler(frame, event, arg1, arg2, ...)
end
end
elseif event == "UNIT_FLAGS" then
if arg1:sub(1,4) == "raid" or arg1:sub(1, 5) == "party" or arg1 == "player" then
if WeakAuras.multiUnitUnits.group[arg1] then
RecheckActiveForUnitType("group", arg1, deactivatedTriggerInfos)
end
elseif event == "PLAYER_FLAGS_CHANGED" then
if arg1:sub(1,4) == "raid" or arg1:sub(1, 5) == "party" or arg1 == "player" then
if WeakAuras.multiUnitUnits.group[arg1] then
RecheckActiveForUnitType("group", arg1, deactivatedTriggerInfos)
end
elseif event == "UNIT_ENTERED_VEHICLE" or event == "UNIT_EXITED_VEHICLE" then