Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-30-11, 06:10 PM   #1
voxic11303
A Defias Bandit
Join Date: Nov 2011
Posts: 2
How to fix class portrait?

Hi, I was wondering how I would go about fixing the gap in between my target of target's portrait and the border around it.

Here is a picture of what I am talking about - it is only happening to my target of target's portrait.


It is a very small gap, however, it annoys me. Btw, it only happens on class portraits. If an NPC is being targeted by the target, it is perfectly fine.

Here is the code I am using:
Code:
UFP = "UnitFramePortrait_Update"
UICC = "Interface\\TargetingFrame\\UI-Classes-Circles"
CIT = CLASS_ICON_TCOORDS

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

WoWInterface » Developer Discussions » Lua/XML Help » How to fix class portrait?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off