Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local unpack = unpack
- local select = select
- local UnitClass = UnitClass
- local RAID_CLASS_COLORS = RAID_CLASS_COLORS
- local classColors = setmetatable({},{__index = function(self,key)
- local tbl = RAID_CLASS_COLORS[key]
- tbl = {tbl.r*1.25,tbl.g*1.25,tbl.b*1.25}
- self[key] = tbl
- return tbl
- end})
- local SetStatusBarColor = PlayerFrameHealthBar.SetStatusBarColor
- local function SetStatusBarColor_hook(self)
- local class = select(2,UnitClass(self.unit))
- if class then
- SetStatusBarColor(self,unpack(classColors[class]))
- end
- end
- local setuphook = function(self)
- hooksecurefunc(self,"SetStatusBarColor",SetStatusBarColor_hook)
- end
- for _,frame in pairs({CastingBarFrame,FocusFrameSpellBar,TargetFrameSpellBar,PetCastingBarFrame}) do
- setuphook(frame)
- end
- hooksecurefunc("CastingBarFrame_OnLoad",setuphook)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement