from retail

This commit is contained in:
Bunny67
2021-01-21 00:26:49 +03:00
parent 2994ddedbb
commit 0c4ecc60a2
7 changed files with 41 additions and 17 deletions
+2 -2
View File
@@ -412,7 +412,7 @@ local function FindBestMatchDataForUnit(time, id, triggernum, triggerInfo, unit)
end
end
end
return bestMatch, matchCount, nextCheck
return bestMatch, matchCount, stackCount, nextCheck
end
local function UpdateStateWithMatch(time, bestMatch, triggerStates, cloneId, matchCount, unitCount, maxUnitCount, matchCountPerUnit, totalStacks, affected, unaffected)
@@ -1074,8 +1074,8 @@ local function UpdateTriggerState(time, id, triggernum)
for unit, unitData in pairs(matchDataByTrigger[id][triggernum]) do
local bestMatch, countPerUnit, stacks, nextCheckForMatch = FindBestMatchDataForUnit(time, id, triggernum, triggerInfo, unit)
matchCount = matchCount + countPerUnit
totalStacks = totalStacks + (stacks or 0)
if bestMatch then
totalStacks = totalStacks + (bestMatch.stacks or 0)
unitCount = unitCount + 1
matchedUnits[unit] = true
end
+5 -3
View File
@@ -138,9 +138,11 @@ function TestForLongString(trigger, arg)
local name = arg.name;
local test;
if(trigger[name.."_operator"] == "==") then
test = "("..name.."==\""..trigger[name].."\")";
else
test = "("..name.." and "..name..":"..trigger[name.."_operator"]:format(trigger[name])..")";
test = ("(%s == %q)"):format(name, trigger[name])
elseif(trigger[name.."_operator"] == "find('%s')") then
test = "(" .. name .. " and " .. name .. string.format(":find(%q)", trigger[name]) .. ")"
elseif(trigger[name.."_operator"] == "match('%s')") then
test = "(" .. name .. " and " .. name .. string.format(":match(%q)", trigger[name]) .. ")"
end
return test;
end
+1 -1
View File
@@ -8,7 +8,7 @@ WeakAuras.halfWidth = WeakAuras.normalWidth / 2
WeakAuras.doubleWidth = WeakAuras.normalWidth * 2
local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version")
local versionString = "3.1.5"
local versionString = "3.1.8"
local buildTime = "20201210233053"
WeakAuras.versionString = versionStringFromToc
+1 -1
View File
@@ -11,7 +11,7 @@ local default = {
desaturate = false,
width = 200,
height = 200,
color = {1, 1, 1, 0.75},
color = {1, 1, 1, 1},
blendMode = "BLEND",
rotation = 0,
discrete_rotation = 0,
+1 -1
View File
@@ -1,7 +1,7 @@
## Interface: 30300
## Title: WeakAuras
## Author: The WeakAuras Team
## Version: 3.1.5
## Version: 3.1.8
## Notes: A powerful, comprehensive utility for displaying graphics and information based on buffs, debuffs, and other triggers.
## Notes-esES: Potente y completa aplicación que te permitirá mostrar por pantalla múltiples diseños, basados en beneficios, perjuicios y otros activadores.
## Notes-deDE: Ein leistungsfähiges, umfassendes Addon zur grafischen Darstellung von Informationen von Auren, Cooldowns, Timern und vielem mehr.
+30 -8
View File
@@ -261,6 +261,8 @@ function OptionsPrivate.ClearTriggerExpandState()
maxTriggerNumForExpand = 0
end
local triggerDeleteDialogOpen = false
function OptionsPrivate.AddTriggerMetaFunctions(options, data, triggernum)
options.__title = L["Trigger %s"]:format(triggernum)
options.__order = triggernum * 10
@@ -311,28 +313,48 @@ function OptionsPrivate.AddTriggerMetaFunctions(options, data, triggernum)
disabled = function()
return #data.triggers == 1
end,
func = function()
if #data.triggers > 1 then
func = function(...)
if triggerDeleteDialogOpen then
-- This function is called multiple times if multiple auras are selected
return
end
local canDelete = false
-- Since we want to handle all selected auras in one dialog, we have to iterate over GetPickedDisplay
local picked = OptionsPrivate.GetPickedDisplay()
OptionsPrivate.Private.ApplyToDataOrChildData(picked, function(childData)
if #childData.triggers > 1 and #childData.triggers >= triggernum then
canDelete = true
end
end)
if canDelete then
StaticPopupDialogs["WEAKAURAS_CONFIRM_TRIGGER_DELETE"] = {
text = L["You are about to delete a trigger. |cFFFF0000This cannot be undone!|r Would you like to continue?"],
button1 = L["Delete"],
button2 = L["Cancel"],
OnAccept = function()
tremove(data.triggers, triggernum)
DeleteConditionsForTrigger(data, triggernum)
WeakAuras.Add(data)
OptionsPrivate.RemoveCollapsed(collapsedId, "trigger", {triggernum})
WeakAuras.ClearAndUpdateOptions(data.id)
OptionsPrivate.Private.ApplyToDataOrChildData(picked, function(childData)
if #childData.triggers > 1 and #childData.triggers >= triggernum then
tremove(childData.triggers, triggernum)
DeleteConditionsForTrigger(childData, triggernum)
WeakAuras.Add(childData)
OptionsPrivate.RemoveCollapsed(collapsedId, "trigger", {triggernum})
WeakAuras.ClearAndUpdateOptions(childData.id)
end
end)
WeakAuras.FillOptions()
triggerDeleteDialogOpen = false
end,
OnCancel = function()
-- no-op
triggerDeleteDialogOpen = false
end,
showAlert = 1,
whileDead = 1,
timeout = 0,
preferredindex = STATICPOPUP_NUMDIALOGS,
}
triggerDeleteDialogOpen = true
StaticPopup_Show("WEAKAURAS_CONFIRM_TRIGGER_DELETE")
end
end
+1 -1
View File
@@ -1,7 +1,7 @@
## Interface: 30300
## Title: WeakAuras Options
## Author: The WeakAuras Team
## Version: 3.1.5
## Version: 3.1.8
## Notes: Options for WeakAuras
## Notes-esES: Opciones para WeakAuras
## Notes-deDE: Optionen für WeakAuras