From 1c60bdb96a1ec69f252df3d315aee4b5cb595207 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Wed, 2 Jun 2010 06:16:43 -0400 Subject: [PATCH] Made Tooltip_AddWorldDrop() get the recipe's quality color itself so the quality_color parameter can be dropped from both it and addon:DisplayAcquireData(). --- Frame.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Frame.lua b/Frame.lua index 862ba9e..a486b71 100644 --- a/Frame.lua +++ b/Frame.lua @@ -795,7 +795,7 @@ do end end - local function Tooltip_AddWorldDrop(recipe_id, id_num, location, quality_color, addline_func) + local function Tooltip_AddWorldDrop(recipe_id, id_num, location, addline_func) local drop_location = type(id_num) == "string" and BZ[id_num] or nil if location and drop_location ~= location then @@ -807,6 +807,7 @@ do if item_id then _, _, _, item_level = GetItemInfo(item_id) end + local _, _, _, quality_color = GetItemQualityColor(private.recipe_list[recipe_id].quality) local type_color = string.gsub(quality_color, "|cff", "") if type(id_num) == "string" then @@ -825,7 +826,7 @@ do -- * The addline_func paramater must be a function which accepts the same -- * arguments as ARL's ttAdd function. ------------------------------------------------------------------------------- - function addon:DisplayAcquireData(recipe_id, acquire_id, location, quality_color, addline_func) + function addon:DisplayAcquireData(recipe_id, acquire_id, location, addline_func) local recipe = private.recipe_list[recipe_id] if not recipe then @@ -855,7 +856,7 @@ do end end elseif acquire_type == A.WORLD_DROP then - Tooltip_AddWorldDrop(recipe_id, id_num, location, quality_color, addline_func) + Tooltip_AddWorldDrop(recipe_id, id_num, location, addline_func) elseif acquire_type == A.CUSTOM then addline_func(0, -1, false, private.custom_list[id_num].name, CATEGORY_COLORS["custom"]) --@alpha@ @@ -984,7 +985,7 @@ do local acquire_id = list_entry.acquire_id local location = list_entry.location_id - addon:DisplayAcquireData(recipe_id, acquire_id, location, quality_color, ttAdd) + addon:DisplayAcquireData(recipe_id, acquire_id, location, ttAdd) if not addon.db.profile.hide_tooltip_hint then -- Give the tooltip hint a unique color. -- 1.7.9.5