View Single Post
08-20-21, 08:47 PM   #3
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
To expand on SDPhantom's post, you can additionally mask the texture

Lua Code:
  1. local genders = {nil, "male", "female"}
  2.  
  3. hooksecurefunc("UnitFramePortrait_Update",function(self)
  4.     if self.portrait and UnitIsPlayer(self.unit) then
  5.         local _, race = UnitRace(self.unit)
  6.         local sexID = UnitSex(self.unit)
  7.         local atlas = GetRaceAtlas(race:lower(), genders[sexID], true)
  8.         self.portrait:SetMask("Interface\\CharacterFrame\\TempPortraitAlphaMask")
  9.         self.portrait:SetAtlas(atlas)
  10.     end
  11. end)



Last edited by Ketho : 08-20-21 at 08:56 PM.
  Reply With Quote