from retail

This commit is contained in:
NoM0Re
2025-01-11 21:04:42 +01:00
parent 794d8eef84
commit 5022fe7ffd
9 changed files with 51 additions and 26 deletions
+3 -3
View File
@@ -560,9 +560,9 @@ local function GetBuffTriggerOptions(data, triggernum)
end,
desc = function()
local value = trigger.ownOnly
if value == nil then return L["Only match auras cast by the player or his pet"]
elseif value == false then return L["Only match auras cast by people other than the player or his pet"]
else return L["Only match auras cast by the player or his pet"] end
if value == nil then return L["Only match auras cast by the player or their pet"]
elseif value == false then return L["Only match auras cast by people other than the player or their pet"]
else return L["Only match auras cast by the player or their pet"] end
end,
get = function()
local value = trigger.ownOnly
+6 -6
View File
@@ -1079,7 +1079,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
return data.anchorFrameParent or data.anchorFrameParent == nil;
end,
hidden = function()
return not IsGroupByFrame() and (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE" or IsParentDynamicGroup());
return not IsGroupByFrame() and (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE" or IsParentDynamicGroup());
end,
},
anchorFrameSpaceOne = {
@@ -1089,7 +1089,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
order = 72,
image = function() return "", 0, 0 end,
hidden = function()
return IsParentDynamicGroup() or not (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE")
return IsParentDynamicGroup() or not (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE")
end,
},
-- Input field to select frame to anchor on
@@ -1135,7 +1135,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
type = "select",
width = WeakAuras.normalWidth,
name = function()
if (data.anchorFrameType == "SCREEN") then
if (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT") then
return L["To Screen's"]
elseif (data.anchorFrameType == "PRD") then
return L["To Personal Ressource Display's"];
@@ -1152,7 +1152,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
if IsParentDynamicGroup() then
return true
end
return data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE";
return data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE";
else
return data.anchorFrameType == "MOUSE";
end
@@ -1169,7 +1169,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
if IsGroupByFrame() then
return true
end
if (data.anchorFrameType ~= "SCREEN") then
if (data.anchorFrameType ~= "SCREEN" and data.anchorFrameType ~= "UIPARENT") then
return true;
end
if (data.parent) then
@@ -1245,7 +1245,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
order = 82,
image = function() return "", 0, 0 end,
hidden = function()
return not (data.anchorFrameType ~= "SCREEN" or IsParentDynamicGroup());
return not (data.anchorFrameType ~= "SCREEN" or data.anchorFrameType ~= "UIPARENT" or IsParentDynamicGroup());
end
},
};
+9 -6
View File
@@ -185,7 +185,7 @@ end
local function RecurseDiff(ours, theirs, ignoredForDiffChecking)
local diff, seen, same = {}, {}, true
for key, ourVal in pairs(ours) do
if type(ignoredForDiffChecking) ~= table or ignoredForDiffChecking[key] ~= true then
if not (type(ignoredForDiffChecking) == "table" and ignoredForDiffChecking[key] == true) then
seen[key] = true
local theirVal = theirs[key]
if type(ourVal) == "table" and type(theirVal) == "table" then
@@ -207,7 +207,7 @@ local function RecurseDiff(ours, theirs, ignoredForDiffChecking)
end
end
for key, theirVal in pairs(theirs) do
if not seen[key] and (type(ignoredForDiffChecking) ~= table or ignoredForDiffChecking[key] ~= true) then
if not seen[key] and not (type(ignoredForDiffChecking) == "table" and ignoredForDiffChecking[key] == true) then
diff[key] = theirVal
same = false
end
@@ -230,10 +230,10 @@ local function RecurseSerial(lines, depth, chunk)
end
end
local function DebugPrintDiff(diff)
local function DebugPrintDiff(diff, id, uid)
local lines = {
"==========================",
"Diff detected: ",
string.format("Diff detected for %q (%s):", id, uid),
"{",
}
RecurseSerial(lines, 1, diff)
@@ -252,7 +252,7 @@ local function Diff(ours, theirs)
local diff = RecurseDiff(ours, theirs, ignoredForDiffChecking)
if diff then
if debug then
DebugPrintDiff(diff, ours.id, theirs.id)
DebugPrintDiff(diff, theirs.id, theirs.uid)
end
return diff
end
@@ -516,7 +516,9 @@ local function BuildUidMap(data, children, type)
end
if self.map[uid].anchorFrameFrame then
local target = self:GetIdFor(self.map[uid].anchorFrameFrame)
data.anchorFrameFrame = nil
local anchorUid = self.map[uid].anchorFrameFrame
local target = self:Contains(anchorUid) and self:GetIdFor(anchorUid)
if target then
data.anchorFrameFrame = "WeakAuras:" .. target
end
@@ -1626,6 +1628,7 @@ local methods = {
oldData.sortHybridTable = newData.sortHybridTable
oldData.uid = uid
oldData.id = matchInfo.newUidMap:GetIdFor(uid)
oldData.anchorFrameFrame = newData.anchorFrameFrame
return oldData
else
return matchInfo.newUidMap:GetPhase2Data(uid)
+2 -2
View File
@@ -199,8 +199,8 @@ local function DeleteConditionsForTriggerHandleSubChecks(checks, triggernum)
check.trigger = check.trigger - 1;
end
if (checks.checks) then
DeleteConditionsForTriggerHandleSubChecks(checks.checks, triggernum);
if (check.checks) then
DeleteConditionsForTriggerHandleSubChecks(check.checks, triggernum);
end
end
end