Try this:
Code:
local form = DruidForm(unit)
local classification = Classification(unit)
if UnitIsPlayer(unit) or (not UnitIsFriend(unit,"player") and not IsPet(unit)) then
local cr,cg,cb = ClassColor(unit)
if form then
return "%s%s%s |cff%02x%02x%02x%s|r (%s) %s",classification or '',classification and ' ' or '',Level(unit),cr,cg,cb,Class(unit),form,SmartRace(unit) or ''
else
return "%s%s%s |cff%02x%02x%02x%s|r %s",classification or '',classification and ' ' or '',Level(unit),cr,cg,cb,Class(unit),SmartRace(unit) or ''
end
else
if form then
return "%s%s%s (%s) %s",classification or '',classification and ' ' or '',Level(unit),form,SmartRace(unit) or ''
else
return "%s%s%s %s",classification or '',classification and ' ' or '',Level(unit),SmartRace(unit) or ''
end
end