From c1ca648fdda5ec79376433a5ce70fe3d1c89aed8 Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 29 Jul 2017 14:57:51 +0200 Subject: [PATCH] unitframes: set limit to onupdate speed --- api/unitframes.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/unitframes.lua b/api/unitframes.lua index 65082b5c..c6d0a11a 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -218,6 +218,8 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick) end) f:SetScript("OnUpdate", function() + if ( this.fpscontrol or 1) > GetTime() then return else this.fpscontrol = GetTime() + .02 end + local unitname = ( this.label and UnitName(this.label) ) or "" -- focus unit detection