View Single Post
12-19-20, 11:15 PM   #6
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
You can default to a class if UnitClass returns nil:
Lua Code:
  1. function()
  2.     local _, class = UnitClass("player")
  3.     local colors = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[class or "PRIEST"]
  4.     return colors.r, colors.g, colors.b
  5. end
  Reply With Quote