from retail

This commit is contained in:
NoM0Re
2025-01-27 03:28:33 +01:00
parent 0e761a6814
commit 8e07a6495c
32 changed files with 1450 additions and 777 deletions
+27 -14
View File
@@ -2335,19 +2335,32 @@ local function createScanFunc(trigger)
end
end
local function highestExpirationTime(bestMatch, auraMatch)
if bestMatch.expirationTime and auraMatch.expirationTime then
return auraMatch.expirationTime > bestMatch.expirationTime
end
return true
end
local function lowestExpirationTime(bestMatch, auraMatch)
if bestMatch.expirationTime and auraMatch.expirationTime then
return auraMatch.expirationTime < bestMatch.expirationTime
end
return false
end
local matchCombineFunctions = {
showHighest = function(bestMatch, auraMatch)
if bestMatch.expirationTime and auraMatch.expirationTime then
return auraMatch.expirationTime > bestMatch.expirationTime
end
return true
end,
showLowest = function(bestMatch, auraMatch)
if bestMatch.expirationTime and auraMatch.expirationTime then
return auraMatch.expirationTime < bestMatch.expirationTime
end
return false
end,
showLowestSpellId = function(bestMatch, auraMatch)
if bestMatch.spellId and auraMatch.spellId then
return auraMatch.spellId < bestMatch.spellId
end
return false
end,
showHighestSpellId = function(bestMatch, auraMatch)
if bestMatch.spellId and auraMatch.spellId then
return auraMatch.spellId > bestMatch.spellId
end
return false
end,
}
local function GreaterEqualOne(x)
return x >= 1
@@ -2503,7 +2516,7 @@ function BuffTrigger.Add(data)
remainingCheck = trigger.unit ~= "multi" and CanHaveMatchCheck(trigger) and trigger.useRem and tonumber(trigger.rem) or 0,
id = id,
triggernum = triggernum,
compareFunc = trigger.combineMode == "showHighest" and highestExpirationTime or lowestExpirationTime,
compareFunc = matchCombineFunctions[trigger.combineMode] or matchCombineFunctions["showLowest"],
unitExists = showIfInvalidUnit,
fetchTooltip = not IsSingleMissing(trigger) and trigger.unit ~= "multi" and trigger.fetchTooltip,
fetchRaidMark = trigger.unit ~= "multi" and trigger.fetchRaidMark,