Jump to content

Amiralen

Member Since 28 Nov 2008
Offline Last Active Aug 17 2011 11:36 PM
*****

#3099049 Default UI Scripts

Posted lucielle on 01 March 2011 - 03:53 PM

View PostVoxie, on 01 March 2011 - 03:51 PM, said:

I'ts working for target and focus, but not the playerframe :( someone?

alt+tab twice. a loading screen does the same job

i fiddled with the code bits i found in this thread and put it in two macros. changes only player's portraits. no npcs or pets

/run UFP = "UnitFramePortrait_Update"; UICC = "Interface\\TargetingFrame\\UI-Classes-Circles"; CIT = CLASS_ICON_TCOORDS;
/run hooksecurefunc(UFP,function(s) if s.portrait then if UnitIsPlayer(s.unit) then local t=CIT[select(2,UnitClass(s.unit))] if t then s.portrait:SetTexture(UICC) s.portrait:SetTexCoord(unpack(t)) end else s.portrait:SetTexCoord(0,1,0,1) end end end)
local UFP = "UnitFramePortrait_Update"
local UICC = "Interface\\TargetingFrame\\UI-Classes-Circles"
local CIT = CLASS_ICON_TCOORDS

hooksecurefunc(UFP, function(self)
	if self.portrait then
		if UnitIsPlayer(self.unit) then
			local texcoords = CIT[select(2, UnitClass(self.unit))]
			if texcoords then
				self.portrait:SetTexture(UICC)
				self.portrait:SetTexCoord(unpack(texcoords))
			end
		else
			self.portrait:SetTexCoord(0, 1, 0, 1)
		end
	end
end)



<