From e6f93906ce923f5fc90fbd0f97c6ff7d5c6209c4 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 16 Apr 2017 18:10:57 +0200 Subject: [PATCH] actionbar: do not update range display during scan --- modules/actionbar.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/actionbar.lua b/modules/actionbar.lua index e195364d..bfbc5060 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -45,6 +45,25 @@ pfUI:RegisterModule("actionbar", function () end) if C.bars.glowrange == "1" then + + function _G.ActionButton_UpdateUsable() + if pfScanActive then return end + + local icon = getglobal(this:GetName().."Icon"); + local normalTexture = getglobal(this:GetName().."NormalTexture"); + local isUsable, notEnoughMana = IsUsableAction(ActionButton_GetPagedID(this)); + if ( isUsable ) then + icon:SetVertexColor(1.0, 1.0, 1.0); + normalTexture:SetVertexColor(1.0, 1.0, 1.0); + elseif ( notEnoughMana ) then + icon:SetVertexColor(0.5, 0.5, 1.0); + normalTexture:SetVertexColor(0.5, 0.5, 1.0); + else + icon:SetVertexColor(0.4, 0.4, 0.4); + normalTexture:SetVertexColor(1.0, 1.0, 1.0); + end + end + hooksecurefunc("ActionButton_OnUpdate", function(elapsed) -- Handle range indicator if ( this.rangeTimer ) then