From a31450129182aaf4982184144df7dfb9e44849f2 Mon Sep 17 00:00:00 2001 From: tekkub Date: Sat, 22 Aug 2009 17:40:54 -0600 Subject: [PATCH] Ensure we always have a default item quality color --- GnomishVendorShrinker.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GnomishVendorShrinker.lua b/GnomishVendorShrinker.lua index 365ac4b..a693eda 100644 --- a/GnomishVendorShrinker.lua +++ b/GnomishVendorShrinker.lua @@ -199,7 +199,7 @@ end local _, _, _, _, _, _, _, _, RECIPE = GetAuctionItemClasses() -local quality_colors = {} +local quality_colors = setmetatable({}, {__index = function() return "|cffffffff" end}) for i=1,7 do quality_colors[i] = select(4, GetItemQualityColor(i)) end local offset = 0 local searchstring @@ -214,7 +214,7 @@ local function Refresh() local name, itemTexture, itemPrice, itemStackCount, numAvailable, isUsable, extendedCost = GetMerchantItemInfo(j) local link = GetMerchantItemLink(j) - local color = "|cffffffff" + local color = quality_colors.default if link then local name, link2, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(link) color = quality_colors[quality]