From ba798229ca9b7232f4c896419102df6628220d5f Mon Sep 17 00:00:00 2001 From: Darth Predator Date: Fri, 30 Jun 2017 00:52:06 +0300 Subject: [PATCH] Redo how aura text threshold works. This fixes #487 --- ElvUI_SLE/modules/unitframes/unitframes.lua | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/ElvUI_SLE/modules/unitframes/unitframes.lua b/ElvUI_SLE/modules/unitframes/unitframes.lua index 06400d9..a7de6c7 100644 --- a/ElvUI_SLE/modules/unitframes/unitframes.lua +++ b/ElvUI_SLE/modules/unitframes/unitframes.lua @@ -160,23 +160,7 @@ function SUF:HealthPredictUpdate(frame) end end -function UF:UpdateAuraTimer(elapsed) - self.expiration = self.expiration - elapsed - if self.nextupdate > 0 then - self.nextupdate = self.nextupdate - elapsed - return - end - - if(self.expiration <= 0) then - self:SetScript('OnUpdate', nil) - - if(self.text:GetFont()) then - self.text:SetText('') - end - - return - end - +local function UpdateAuraTimer(self, elapsed) local timervalue, formatid local unitID = self:GetParent():GetParent().unitframeType local auraType = self:GetParent().type @@ -231,6 +215,8 @@ function SUF:Initialize() SUF:UpgradePvPIcon() SUF:InitStatus() + + hooksecurefunc(UF, "UpdateAuraTimer", UpdateAuraTimer) function SUF:ForUpdateAll() SUF:SetRoleIcons() -- 1.7.9.5