From f2fdd4b1a308645c8be3bd9db5b05b6d40add316 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Sat, 20 Mar 2010 04:40:11 -0400 Subject: [PATCH] In addon:ScanVendor(): Utilize ItemLinkToID() in conjunction with RECIPE_TO_SPELL_MAP to get an accurate spell_id - fixes ticket 944. --- Datamine.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Datamine.lua b/Datamine.lua index 19e586f..db7e0cc 100644 --- a/Datamine.lua +++ b/Datamine.lua @@ -1661,7 +1661,6 @@ do self:Print(L["DATAMINER_NODB_ERROR"]) return end - local reverse_lookup = GetReverseLookup(recipe_list) local targetname = UnitName("target") -- Get its name local targetID = tonumber(string.sub(UnitGUID("target"), -12, -7), 16) -- Get the NPC ID local added = false @@ -1678,9 +1677,9 @@ do -- Check to see if we're dealing with a recipe if matchtext and RECIPE_NAMES[strlower(matchtext)] then - local recipename = gsub(name, "%a+\: ", "") -- Get rid of the first part of the item - local spell_id = reverse_lookup[recipename] -- Find out what spell ID we're using - + local item_link = GetMerchantItemLink(i) + local item_id = ItemLinkToID(item_link) + local spell_id = RECIPE_TO_SPELL_MAP[item_id] if spell_id then local ttscantext = addon:TooltipScanRecipe(spell_id, true, true) -- 1.7.9.5