From 4c33175e0c9dc630451546283cf5b33574b10508 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Wed, 1 Apr 2009 11:30:23 +0200 Subject: [PATCH] Update each button individually when changing spec (and on any other action change, if out of combat). --- ActionButton.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ActionButton.lua b/ActionButton.lua index f69a7d6..cba7bac 100644 --- a/ActionButton.lua +++ b/ActionButton.lua @@ -257,7 +257,20 @@ local function updateIcon(self) end end end -hooksecurefunc("ActionButton_Update", updateIcon) + +local function updateFunc(self) + updateIcon(self) + if self.BT4init and not InCombatLockdown() then + local parent = self:GetParent() + parent:SetFrameRef("upd", self) + parent:Execute([[ + local frame = self:GetFrameRef("upd") + control:RunFor(frame, frame:GetAttribute("UpdateAutoAssist")) + ]]) + end +end + +hooksecurefunc("ActionButton_Update", updateFunc) Button.SetRealNormalTexture = Button.SetNormalTexture function Button:SetNormalTexture(...)