from retail

This commit is contained in:
NoM0Re
2025-01-23 18:30:22 +01:00
parent 8dcb62ec81
commit e1e0744ecf
20 changed files with 433 additions and 81 deletions
+7 -5
View File
@@ -9,8 +9,6 @@ local anim_function_strings = Private.anim_function_strings;
local function noopErrorHandler() end
local frame = Private.frames["WeakAuras Main Frame"]
local function RunAnimation(key, anim, elapsed, time)
Private.StartProfileUID(anim.auraUID)
local finished = false
@@ -178,6 +176,9 @@ end
local updatingAnimations;
local last_update = GetTime();
local function UpdateAnimations()
if not updatingAnimations then
return
end
Private.StartProfileSystem("animations");
for groupUid, groupRegion in pairs(pending_controls) do
@@ -196,12 +197,15 @@ local function UpdateAnimations()
Private.StopProfileSystem("animations");
end
local frame = CreateFrame("Frame")
Private.frames["WeakAuras Animation Frame"] = frame
frame:SetScript("OnUpdate", UpdateAnimations)
function Private.RegisterGroupForPositioning(uid, region)
pending_controls[uid] = region
if not updatingAnimations then
updatingAnimations = true
last_update = GetTime()
frame:SetScript("OnUpdate", UpdateAnimations)
end
end
@@ -399,11 +403,9 @@ function Private.Animate(namespace, uid, type, anim, region, inverse, onFinished
animation.auraUID = uid
if not(updatingAnimations) then
frame:SetScript("OnUpdate", UpdateAnimations);
last_update = GetTime()
updatingAnimations = true;
end
RunAnimation(key, animation, 0, GetTime())
return true;
else
if(animations[key]) then