Class Portraits ( ClassPortraitsFinal )

Screenshot

=== Works with any patch version from 4.0.0 and up so far ===

A very small addon which shows class icon instead of a portrait for player-controlled characters (both your and opposing faction). Does not change portraits of pets, mobs and NPCs.

Here is the complete sourcecode (yes it is THAT small):

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

Should work with any localization. This addon is a lightweight alternative to ClassPortraits (currently not working for me in 4.0.1) and ClassIcons_Reborn addons. I found original script for this addon on Arena Junkies and modified it a bit (better textures, player characters filter).

NOTE:
Asignupsucks said (Sun Nov 28 2010, see in comments below):
If you add this after the second line [in World of Warcraft\Interface\Addons\ClassPortraitsFinal\ClassPortraitsFinal.lua], you will not see your own classicon, but still those of others:
if self.unit == "player" or self.unit == "pet" then return end

Facts

Date created
Oct 26, 2010
Categories
Last update
Mar 09, 2013
Development stage
Release
Language
  • deDE
  • enUS
  • esES
  • esMX
  • frFR
  • itIT
  • koKR
  • ptBR
  • ruRU
  • zhCN
  • zhTW
License
Public Domain
Curse link
Class Portraits ( ClassPortraitsFinal )
Downloads
46,743
Recent files
  • R: 5.2 for 5.2.0 Mar 09, 2013
  • R: 5.0 for 5.0.4 Sep 08, 2012
  • R: 1.0 for 4.0.1 Oct 26, 2010

Authors