diff gui.lua @ 11:952c3ac0e783

GetItemQualityColor change and TOC bump for 4.2
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Tue, 28 Jun 2011 19:18:07 +0000
parents 67b8537e8432
children 5ee4edd24c13
line wrap: on
line diff
--- a/gui.lua	Tue Jun 28 07:36:26 2011 +0000
+++ b/gui.lua	Tue Jun 28 19:18:07 2011 +0000
@@ -48,7 +48,7 @@
 local pairs, ipairs, tinsert, tremove, tonumber = pairs, ipairs, table.insert, table.remove, tonumber
 
 local pprint, tabledump = addon.pprint, flib.tabledump
-local GetItemInfo = GetItemInfo 
+local GetItemInfo, ITEM_QUALITY_COLORS = GetItemInfo, ITEM_QUALITY_COLORS
 
 -- En masse forward decls of symbols defined inside local blocks
 local _generate_text, _populate_text_specials
@@ -184,7 +184,7 @@
 			-- actually needs to be replaced is even worse.  We'll live with
 			-- garbage for now.
 			if e.kind == 'loot' then
-				local textured = eoi_st_textured_item_format:format (e.itexture, self.quality_hexes[e.quality], e.itemname, e.count or "")
+				local textured = eoi_st_textured_item_format:format (e.itexture, ITEM_QUALITY_COLORS[e.quality].hex, e.itemname, e.count or "")
 				e.cols = {
 					{value = textured},
 					{value = e.person},
@@ -298,10 +298,10 @@
 				local textured
 				if itexture and iname then
 					textured = eoi_st_textured_item_format:format (itexture,
-						self.quality_hexes[iquality], iname, loot.count or "")
+						ITEM_QUALITY_COLORS[iquality].hex, iname, loot.count or "")
 				else
 					textured = eoi_st_textured_item_format:format ([[ICONS\INV_Misc_QuestionMark]],
-						self.quality_hexes[ITEM_QUALITY_COMMON], 'UNKNOWN - TRY AGAIN', "")
+						ITEM_QUALITY_COLORS[ITEM_QUALITY_COMMON].hex, 'UNKNOWN - TRY AGAIN', "")
 					cache_okay = false
 				end
 				col2.value = textured
@@ -1551,7 +1551,7 @@
 			for id in pairs(OuroLootSV_opts.itemfilter) do
 				local iname, _, iquality = GetItemInfo(id)
 				if iname then
-					list[id] = addon.quality_hexes[iquality] .. iname .. "|r"
+					list[id] = ITEM_QUALITY_COLORS[iquality].hex .. iname .. "|r"
 				end
 			end
 			w = GUI:Create("EditBoxDropDown")
@@ -1565,7 +1565,7 @@
 					return addon:Print("Error:  %s is not a valid item name/link!", text)
 				end
 				local id = tonumber(ilink:match("item:(%d+)"))
-				list[id] = addon.quality_hexes[iquality] .. iname .. "|r"
+				list[id] = ITEM_QUALITY_COLORS[iquality].hex .. iname .. "|r"
 				OuroLootSV_opts.itemfilter[id] = true
 				addon:Print("Now filtering out", ilink)
 			end)
@@ -1589,7 +1589,7 @@
 			grp:AddChild(w)
 			w = GUI:Create("Label")
 			w:SetRelativeWidth(0.4)
-			w:SetText(addon.quality_hexes[3].."Echo from latest ping:|r\n"..senders)
+			w:SetText(ITEM_QUALITY_COLORS[3].hex .."Echo from latest ping:|r\n"..senders)
 			grp:AddChild(w)
 		end