Quick UI question

Just wondering if I’ll be able to change the portrait on the target unit frame to a “class” icon (not a spec. icon) after PP launches. I’ll be losing Shadowed Unit Frames in the coming days, and this is one of the main things I find helpful about it. (Looking for a solution apart from the following: ElvUI & BetterBlizzFrames.)

Try copy/pasting the following to the website addon.bool.no to create/download as an addon:

Doesn’t do anything but change the target portrait if a class is available otherwise the portrait should remain as a character portrait (for the default UI Target Frame).

hooksecurefunc("UnitFramePortrait_Update", function(self)
	if self.unit == "target" then
		local portrait = self.portrait
		local class, file = UnitClass(self.unit)
		if class then
			local left, right, top, bottom = unpack(CLASS_ICON_TCOORDS[file])
			portrait:SetTexture("Interface\\WorldStateFrame\\Icons-Classes")
			portrait:SetTexCoord(right, left, top, bottom)	
		end
	end
end)

Delete the addon if it’s not what you want.

1 Like

That’s just right. Many thanks for the help. :alien: