From 58f0aa8bbb9b930b30a5535d68231eb61a866621 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Sat, 27 Mar 2010 06:18:54 -0400 Subject: [PATCH] Changed the second parameter of GenerateTooltipContent() to be a list entry instead of a recipe spell ID. --- Frame.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Frame.lua b/Frame.lua index 6399aa1..83bd59c 100644 --- a/Frame.lua +++ b/Frame.lua @@ -596,8 +596,11 @@ do return display_tip, color end - function GenerateTooltipContent(owner, rIndex) - local recipe_entry = private.recipe_list[rIndex] + function GenerateTooltipContent(owner, list_entry) + if not list_entry then + return + end + local recipe_entry = private.recipe_list[list_entry.recipe_id] if not recipe_entry then return @@ -650,7 +653,7 @@ do -- check if the recipe is excluded local exclude = addon.db.profile.exclusionlist - if exclude[rIndex] then + if exclude[list_entry.recipe_id] then ttAdd(0, -1, true, L["RECIPE_EXCLUDED"], "|cffff0000") end @@ -2404,7 +2407,7 @@ do highlight._texture:SetAllPoints(highlight) local function Button_OnEnter(self) - GenerateTooltipContent(self, ListFrame.entries[self.string_index].recipe_id) + GenerateTooltipContent(self, ListFrame.entries[self.string_index]) end local function Button_OnLeave() @@ -2416,7 +2419,7 @@ do highlight:SetParent(self) highlight:SetAllPoints(self) highlight:Show() - GenerateTooltipContent(self, ListFrame.entries[self.string_index].recipe_id) + GenerateTooltipContent(self, ListFrame.entries[self.string_index]) end local function Bar_OnLeave() -- 1.7.9.5