View Single Post
03-13-14, 04:44 PM   #24
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Phanx View Post
Code:
local PET_COLOR = { r = 157/255, g = 197/255, b = 255/255 }

hooksecurefunc("UnitFrame_Update", function(self)
    if not self.name then return end

    local unit, color = self.unit
    if UnitPlayerControlled(unit) then
        if UnitIsPlayer(unit) then
            local _, class = UnitClass(unit)
            color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[class]
        else
            color = PET_COLOR
        end
So simple yet I couldn't figure it out.

Now for a personal question do you do programming for a living or is this just a hobby like me?

Either way you are great at it and thank you for all you do for us less then program savvy people.

Coke
  Reply With Quote