From e0e402ce2b021a9997991dc278119f0b766bf152 Mon Sep 17 00:00:00 2001 From: yaroot Date: Mon, 2 Apr 2012 23:02:00 +0800 Subject: [PATCH] fix the ClassColors callback --- core.lua | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/core.lua b/core.lua index aac4b05..e039ad2 100644 --- a/core.lua +++ b/core.lua @@ -91,19 +91,22 @@ ycc.classColor = setmetatable({}, { end }) -do - local WHITE = {1,1,1} - ycc.classColorRaw = setmetatable({}, { - __index = function(t, i) - local c = i and RAID_CLASS_COLORS[BC[i] or i] - if not c then return WHITE end - t[i] = c - return c - end - }) -end + +local WHITE = {1,1,1} +ycc.classColorRaw = setmetatable({}, { + __index = function(t, i) + local c = i and RAID_CLASS_COLORS[BC[i] or i] + if not c then return WHITE end + t[i] = c + return c + end +}) + if CUSTOM_CLASS_COLORS then - CUSTOM_CLASS_COLORS:RegisterCallback(function() wipe(classColor) end) + CUSTOM_CLASS_COLORS:RegisterCallback(function() + wipe(ycc.classColorRaw) + wipe(ycc.classColor) + end) end -- 1.7.9.5