from retail
This commit is contained in:
@@ -1216,9 +1216,10 @@ function Private.Modernize(data)
|
||||
data.forceEvents = nil
|
||||
end
|
||||
|
||||
if data.internalVersion < 62 then
|
||||
-- version 62 became 64 to fix a broken modernize
|
||||
if data.internalVersion < 64 then
|
||||
if data.regionType == "dynamicgroup" then
|
||||
if data.sort == "CUSTOM" and type(data.sortOn) ~= "string" then
|
||||
if data.sort == "custom" and type(data.sortOn) ~= "string" or data.sortOn == "" then
|
||||
data.sortOn = "changed"
|
||||
end
|
||||
if data.grow == "CUSTOM" and type(data.growOn) ~= "string" then
|
||||
|
||||
@@ -327,7 +327,7 @@ local sorters = {
|
||||
if #events > 0 then
|
||||
sortOn = {}
|
||||
for _, event in ipairs(events) do
|
||||
events[event] = true
|
||||
sortOn[event] = true
|
||||
end
|
||||
end
|
||||
return function(a, b)
|
||||
@@ -929,7 +929,7 @@ local growers = {
|
||||
if #events > 0 then
|
||||
growOn = {}
|
||||
for _, event in ipairs(events) do
|
||||
events[event] = true
|
||||
growOn[event] = true
|
||||
end
|
||||
end
|
||||
return function(newPositions, activeRegions)
|
||||
@@ -985,7 +985,7 @@ local function isDifferent(regionData, cache, events)
|
||||
local cachedState = cache[id][cloneId]
|
||||
for event in pairs(events) do
|
||||
if regionData.region.state[event] ~= cachedState[event] then
|
||||
cachedState[event] = regionData.region.state[event]
|
||||
cachedState[event] = state[event]
|
||||
isDifferent = true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -232,6 +232,12 @@ local function modify(parent, region, data)
|
||||
region.subRegionEvents:RemoveSubscriber("TimerTick", region)
|
||||
end
|
||||
|
||||
if FrameTick then
|
||||
region.subRegionEvents:AddSubscriber("FrameTick", region)
|
||||
else
|
||||
region.subRegionEvents:RemoveSubscriber("FrameTick", region)
|
||||
end
|
||||
|
||||
if not UpdateText then
|
||||
local textStr = data.displayText
|
||||
textStr = textStr:gsub("\\n", "\n");
|
||||
|
||||
@@ -179,6 +179,7 @@ local function modify(parent, region, parentData, data, first)
|
||||
parent.customTextFunc = nil
|
||||
end
|
||||
parent.values.custom = nil
|
||||
parent.values.lastCustomTextUpdate = nil
|
||||
end
|
||||
|
||||
local UpdateText
|
||||
@@ -202,16 +203,13 @@ local function modify(parent, region, parentData, data, first)
|
||||
end
|
||||
|
||||
local Update
|
||||
if first and parent.customTextFunc then
|
||||
if UpdateText then
|
||||
Update = function()
|
||||
parent.values.custom = Private.RunCustomTextFunc(parent, parent.customTextFunc)
|
||||
UpdateText()
|
||||
end
|
||||
else
|
||||
Update = function()
|
||||
if parent.customTextFunc and UpdateText then
|
||||
Update = function()
|
||||
if parent.values.lastCustomTextUpdate ~= GetTime() then
|
||||
parent.values.custom = Private.RunCustomTextFunc(parent, parent.customTextFunc)
|
||||
parent.values.lastCustomTextUpdate = GetTime()
|
||||
end
|
||||
UpdateText()
|
||||
end
|
||||
else
|
||||
Update = UpdateText
|
||||
@@ -224,20 +222,13 @@ local function modify(parent, region, parentData, data, first)
|
||||
|
||||
local FrameTick
|
||||
if parent.customTextFunc and parentData.customTextUpdate == "update" then
|
||||
if first then
|
||||
if Private.ContainsCustomPlaceHolder(data.text_text) then
|
||||
FrameTick = function()
|
||||
if Private.ContainsCustomPlaceHolder(data.text_text) then
|
||||
FrameTick = function()
|
||||
if parent.values.lastCustomTextUpdate ~= GetTime() then
|
||||
parent.values.custom = Private.RunCustomTextFunc(parent, parent.customTextFunc)
|
||||
UpdateText()
|
||||
parent.values.lastCustomTextUpdate = GetTime()
|
||||
end
|
||||
else
|
||||
FrameTick = function()
|
||||
parent.values.custom = Private.RunCustomTextFunc(parent, parent.customTextFunc)
|
||||
end
|
||||
end
|
||||
else
|
||||
if Private.ContainsCustomPlaceHolder(data.text_text) then
|
||||
FrameTick = UpdateText
|
||||
UpdateText()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -265,8 +256,6 @@ local function modify(parent, region, parentData, data, first)
|
||||
text:SetTextColor(region.color_anim_r or r, region.color_anim_g or g, region.color_anim_b or b, region.color_anim_a or a);
|
||||
end
|
||||
|
||||
region:Color(data.text_color[1], data.text_color[2], data.text_color[3], data.text_color[4]);
|
||||
|
||||
function region:SetTextHeight(size)
|
||||
local fontPath = SharedMedia:Fetch("font", data.text_font);
|
||||
region.text:SetFont(fontPath, size < 33 and size or 33, data.text_fontType);
|
||||
@@ -285,6 +274,9 @@ local function modify(parent, region, parentData, data, first)
|
||||
if self.TimerTick then
|
||||
parent.subRegionEvents:AddSubscriber("TimerTick", region)
|
||||
end
|
||||
if self.Update and parent.state then
|
||||
self:Update()
|
||||
end
|
||||
else
|
||||
if self.Update then
|
||||
parent.subRegionEvents:RemoveSubscriber("Update", region)
|
||||
@@ -299,8 +291,6 @@ local function modify(parent, region, parentData, data, first)
|
||||
end
|
||||
end
|
||||
|
||||
region:SetVisible(data.text_visible)
|
||||
|
||||
local selfPoint = data.text_selfPoint
|
||||
if selfPoint == "AUTO" then
|
||||
if parentData.regionType == "icon" then
|
||||
@@ -333,8 +323,6 @@ local function modify(parent, region, parentData, data, first)
|
||||
parent:AnchorSubRegion(text, "point", selfPoint, data.text_anchorPoint, self.text_anchorXOffset or 0, self.text_anchorYOffset or 0)
|
||||
end
|
||||
|
||||
region:UpdateAnchor()
|
||||
|
||||
region.SetXOffset = function(self, xOffset)
|
||||
if self.text_anchorXOffset == xOffset then
|
||||
return
|
||||
@@ -350,6 +338,10 @@ local function modify(parent, region, parentData, data, first)
|
||||
self.text_anchorYOffset = yOffset
|
||||
self:UpdateAnchor()
|
||||
end
|
||||
|
||||
region:Color(data.text_color[1], data.text_color[2], data.text_color[3], data.text_color[4]);
|
||||
region:SetVisible(data.text_visible)
|
||||
region:UpdateAnchor()
|
||||
end
|
||||
|
||||
local function addDefaultsForNewAura(data)
|
||||
|
||||
@@ -3090,7 +3090,7 @@ local function actionGlowStart(actions, frame, id)
|
||||
actions.glow_thickness,
|
||||
actions.glow_XOffset,
|
||||
actions.glow_YOffset,
|
||||
actions.glow_border,
|
||||
actions.glow_border and true or false,
|
||||
id
|
||||
)
|
||||
elseif actions.glow_type == "ACShine" then
|
||||
@@ -4408,6 +4408,7 @@ local function ValueForSymbol(symbol, region, customFunc, regionState, regionSta
|
||||
return tostring(value) or ""
|
||||
end
|
||||
end
|
||||
return ""
|
||||
else
|
||||
local value = (useHiddenStates or regionState.show) and ReplaceValuePlaceHolders(symbol, region, customFunc, regionState, formatters[symbol]);
|
||||
return value or ""
|
||||
|
||||
@@ -211,7 +211,7 @@ If the entered number is a whole number (e.g. 5), the number of affected units w
|
||||
If the entered number is a decimal (e.g. 0.5), fraction (e.g. 1/2), or percentage (e.g. 50%%), then that fraction of the %s must be affected.
|
||||
|
||||
|cFF4444FFFor example:|r
|
||||
|cFF00CC00> 0|r will trigger when any unit of type '%s' is is affected
|
||||
|cFF00CC00> 0|r will trigger when any unit of type '%s' is affected
|
||||
|cFF00CC00= 100%%|r will trigger when ever unit of type '%s' is affected
|
||||
|cFF00CC00!= 2|r will trigger when the number of units of type '%s' affected is not exactly 2
|
||||
|cFF00CC00<= 0.8|r will trigger when less than 80%% of the units of type '%s' is affected (4 of 5 party members, 8 of 10 or 20 of 25 raid members)
|
||||
|
||||
@@ -300,8 +300,6 @@ local function CreateNewGroupFromSelection(regionType, resetChildPositions)
|
||||
local oldParentData = WeakAuras.GetData(oldParent)
|
||||
if (oldParent) then
|
||||
local oldIndex = childButton:GetGroupOrder()
|
||||
print("CHILD ID", childId, "OLD PARENT", oldParent, "OLD INDEX", oldIndex)
|
||||
print("###", oldParentData.controlledChildren[oldIndex])
|
||||
|
||||
tremove(oldParentData.controlledChildren, oldIndex)
|
||||
WeakAuras.Add(oldParentData)
|
||||
|
||||
Reference in New Issue
Block a user