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
+1 -1
View File
@@ -672,7 +672,7 @@ end
local function Tick(self)
Private.StartProfileAura(self.id)
self.values.lastCustomTextUpdate = nil
self.values.customTextUpdated = false
self.subRegionEvents:Notify("FrameTick")
Private.StopProfileAura(self.id)
end
+13 -2
View File
@@ -224,6 +224,7 @@ local function modify(parent, region, data)
local customTextFunc = nil
if containsCustomText and data.customText and data.customText ~= "" then
customTextFunc = WeakAuras.LoadFunction("return "..data.customText, data.id)
region.values.customTextUpdateThrottle = data.customTextUpdateThrottle or 0
end
function region:ConfigureTextUpdate()
@@ -242,7 +243,11 @@ local function modify(parent, region, data)
local Update
if customTextFunc and self.displayText and Private.ContainsCustomPlaceHolder(self.displayText) then
Update = function(self)
self.values.custom = Private.RunCustomTextFunc(self, customTextFunc)
if not self.values.customTextUpdated then
self.values.custom = Private.RunCustomTextFunc(self, customTextFunc)
self.values.lastCustomTextUpdate = GetTime()
self.values.customTextUpdated = true
end
UpdateText()
self:UpdateProgress()
end
@@ -267,7 +272,13 @@ local function modify(parent, region, data)
if customTextFunc and data.customTextUpdate == "update" then
if Private.ContainsCustomPlaceHolder(self.displayText) then
FrameTick = function()
self.values.custom = Private.RunCustomTextFunc(self, customTextFunc)
if not self.values.lastCustomTextUpdate
or self.values.lastCustomTextUpdate + self.values.customTextUpdateThrottle < GetTime()
then
self.values.custom = Private.RunCustomTextFunc(self, customTextFunc)
self.values.lastCustomTextUpdate = GetTime()
self.values.customTextUpdated = true
end
UpdateText()
end
end