Update each button individually when changing spec (and on any other action change, if out of combat).

This commit is contained in:
Hendrik Leppkes
2009-04-01 11:30:23 +02:00
parent db938ac83d
commit 4c33175e0c
+14 -1
View File
@@ -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(...)