Masque Skinner: Blizz Buffs

Masque Skinner: Blizz Buffs

127k Downloads

Dragonflight Fix

ETSeki opened this issue ยท 6 comments

commented

The Global NUM_TEMP_ENCHANT_FRAMES doesnt exist in the BuffFrame.lua anymore which leads to an error in BlizzBuffsFacade.lua:30.

I fixed it by replacing the global with a hard coded 3 which is the last value of the global before the removal.

commented

What in particular is that fixing? The entire addon fundamentally doesn't work at all right now.

commented

What in particular is that fixing? The entire addon fundamentally doesn't work at all right now.

I am not sure it necessarily does. I attempted what ETSeki said above and didn't do anything for me not to say with their addon combo perhaps it did fix something.

@ascott18 - Appreciate you are busy and may not want to look at this again but if you had chance it would be appreciated. I don't think any other addon exists to skin blizzards buffs with Masque

commented

This indeed doesn't "fix" anything. I'd highly appreciate an update as well.

commented

Would appreciate a fix as well. Only part of my Ui left that doesnt work and the default blizz buff icons doesnt fit the rest of my UI

commented

@bullsei Thanks. Work was already mostly complete by the time you shared this, but I appreciate the effort.

commented

local LMB = LibStub("Masque", true) or (LibMasque and LibMasque("Button"))
if not LMB then return end

local f = CreateFrame("Frame")

local function NULL()
end
local Buffs = LMB:Group("Blizzard Buffs", "Buffs")
local Debuffs = LMB:Group("Blizzard Buffs", "Debuffs")
local TempEnchant = LMB:Group("Blizzard Buffs", "TempEnchant")

local skinnedButtons = {}
local function skinAura(typeFrame, auraFrame)
	if not skinnedButtons[auraFrame] then
		typeFrame:AddButton(auraFrame)
	end
end

local function skinActiveBuffs()
	for buffFrame in BuffFrame.auraPool:EnumerateActive() do
		skinAura(Buffs, buffFrame)
	end
end

local function skinActiveDebuffs()
	for debuffFrame in BuffFrame.auraPool:EnumerateActive() do
		skinAura(Debuffs, debuffFrame)
	end
end


local function OnEvent(self, event, addon)
	if BuffFrame.auraPool then --new 10.0 stuff, individual buff or debuff buttons dont have a global name anymore. 
		for buffFrame in BuffFrame.auraPool:EnumerateInactive() do
			skinAura(Buffs, buffFrame)
		end
		skinActiveBuffs()
		hooksecurefunc(BuffFrame, "UpdateAuraButtons", skinActiveBuffs) 

		for debuffFrame in DebuffFrame.auraPool:EnumerateInactive() do
			skinAura(Debuffs, debuffFrame)
		end
		skinActiveDebuffs()
		hooksecurefunc(DebuffFrame, "UpdateAuraButtons", skinActiveDebuffs) 
	else
		for i=1, BUFF_MAX_DISPLAY do
			local buff = _G["BuffButton"..i]
			if buff then
				Buffs:AddButton(buff)
			end
			if not buff then break end
		end

		for i=1, BUFF_MAX_DISPLAY do
			local debuff = _G["DebuffButton"..i]
			if debuff then
				Debuffs:AddButton(debuff)
			end
			if not debuff then break end
		end

		for i=1, NUM_TEMP_ENCHANT_FRAMES do
			local f = _G["TempEnchant"..i]
			--_G["TempEnchant"..i.."Border"].SetTexture = NULL
			if TempEnchant then
				TempEnchant:AddButton(f)
			end
			_G["TempEnchant"..i.."Border"]:SetVertexColor(.75, 0, 1)
		end

		hooksecurefunc("CreateFrame", function (_, name, parent) --dont need to do this for TempEnchant enchant frames because they are hard created in xml
			if parent ~= BuffFrame or type(name) ~= "string" then return end
			if strfind(name, "^DebuffButton%d+$") then
				Debuffs:AddButton(_G[name])
				Debuffs:ReSkin() -- Needed to prevent issues with stack text appearing under the frame.
			elseif strfind(name, "^BuffButton%d+$") then
				Buffs:AddButton(_G[name])
				Buffs:ReSkin() -- Needed to prevent issues with stack text appearing under the frame.
			end
		end
		)
	end 
	f:SetScript("OnEvent", nil)
end


f:SetScript("OnEvent", OnEvent)
f:RegisterEvent("PLAYER_ENTERING_WORLD")


This is what i came up with so far, it definitely skins the buttons, but they still look a bit weird for me, like the aspect ratio of the individual buffs/debuffs is wrong. I am kinda busy with other stuff but maybe this helps on the way of getting it to 100% :)