This commit is contained in:
NoM0Re
2025-08-06 01:44:29 +02:00
committed by GitHub
parent 78d681a06c
commit 727747ad1d
44 changed files with 287 additions and 167 deletions
+9 -2
View File
@@ -204,11 +204,14 @@ local function modify(parent, region, parentData, data, first)
end
if containsCustomText and parentData.customText and parentData.customText ~= "" then
parent.customTextFunc = WeakAuras.LoadFunction("return "..parentData.customText, parentData.id)
parent.values.customTextUpdateThrottle = parentData.customTextUpdateThrottle or 0
else
parent.customTextFunc = nil
parent.values.customTextUpdateThrottle = 0
end
parent.values.custom = nil
parent.values.lastCustomTextUpdate = nil
parent.values.customTextUpdated = false
end
local texts = {}
@@ -266,9 +269,10 @@ local function modify(parent, region, parentData, data, first)
local Update
if parent.customTextFunc and UpdateText then
Update = function()
if parent.values.lastCustomTextUpdate ~= GetTime() then
if not parent.values.customTextUpdated then
parent.values.custom = Private.RunCustomTextFunc(parent, parent.customTextFunc)
parent.values.lastCustomTextUpdate = GetTime()
parent.values.customTextUpdated = true
end
UpdateText()
end
@@ -286,9 +290,12 @@ local function modify(parent, region, parentData, data, first)
if parent.customTextFunc and parentData.customTextUpdate == "update" then
if Private.ContainsCustomPlaceHolder(region.text_text) then
FrameTick = function()
if parent.values.lastCustomTextUpdate ~= GetTime() then
if not parent.values.lastCustomTextUpdate
or parent.values.lastCustomTextUpdate + parent.values.customTextUpdateThrottle < GetTime()
then
parent.values.custom = Private.RunCustomTextFunc(parent, parent.customTextFunc)
parent.values.lastCustomTextUpdate = GetTime()
parent.values.customTextUpdated = true
end
UpdateText()
end