diff --git a/LootReserve.lua b/LootReserve.lua index 2e9a8b6..37911c9 100644 --- a/LootReserve.lua +++ b/LootReserve.lua @@ -648,13 +648,32 @@ function LootReserve:UnitSex(player) end); end +function LootReserve:GetClassColor(classFilename) + if self:GetCurrentExpansion() == 0 then + if CUSTOM_CLASS_COLORS then + return CUSTOM_CLASS_COLORS[classFilename]; -- Support for WeWantBlueShamans + else + local color = RAID_CLASS_COLORS[classFilename]; + if classFilename == "SHAMAN" then + local r, g, b = 0, 0.44, 0.87; + + color = CreateColor(r, g, b) + color.colorStr = color:GenerateHexColor() + end + return color; + end + else + return RAID_CLASS_COLORS[classFilename]; + end +end + local function GetPlayerClassColor(player, dim, class) local className, classFilename, classId = LootReserve:UnitClass(player); if class then className, classFilename, classId = LootReserve:GetClassInfo(class); end if classFilename then - local colors = RAID_CLASS_COLORS[classFilename]; + local colors = LootReserve:GetClassColor(classFilename); if colors then if dim then local r, g, b, a = colors:GetRGBA(); diff --git a/Windows/ServerLootEditWindow.xml b/Windows/ServerLootEditWindow.xml index 1c0def0..9bb04df 100644 --- a/Windows/ServerLootEditWindow.xml +++ b/Windows/ServerLootEditWindow.xml @@ -30,7 +30,7 @@ for i = 1, LootReserve:GetNumClasses() do local name, file, id = LootReserve:GetClassInfo(i); if id and LootReserve.ItemConditions:TestClassMask(conditions.ClassMask, id) then - text = text .. (#text > 0 and ", " or "") .. format("|c%s%s|r", RAID_CLASS_COLORS[file].colorStr, name); + text = text .. (#text > 0 and ", " or "") .. format("|c%s%s|r", LootReserve:GetClassColor(file).colorStr, name); end end self:SetText(text); @@ -67,7 +67,7 @@ index = index + 1; table.insert(menu, index, { - text = format("|c%s%s|r", RAID_CLASS_COLORS[file].colorStr, name), + text = format("|c%s%s|r", LootReserve:GetClassColor(file).colorStr, name), checked = conditions and LootReserve.ItemConditions:TestClassMask(conditions.ClassMask, id) or false, arg1 = id, func = function(_, id, _, checked) diff --git a/Windows/ServerWindow.xml b/Windows/ServerWindow.xml index 474e958..bbd6b7a 100644 --- a/Windows/ServerWindow.xml +++ b/Windows/ServerWindow.xml @@ -660,8 +660,8 @@ self.DMBLocate = function(self, unit) local _, playerClass = LootReserve:UnitClass("player"); local _, targetClass = LootReserve:UnitClass(unit); - local color1 = RAID_CLASS_COLORS[playerClass]; - local color2 = RAID_CLASS_COLORS[targetClass]; + local color1 = LootReserve:GetClassColor(playerClass); + local color2 = LootReserve:GetClassColor(targetClass); if self.Locator.active then self.Locator.m1:Free(true);