From f4ec3ad54b492771781534b503e809935656c394 Mon Sep 17 00:00:00 2001 From: ackis Date: Thu, 4 Jun 2009 16:46:12 +0000 Subject: [PATCH] Add new function which will scan a single spell ID. --- ARLDatamine.lua | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/ARLDatamine.lua b/ARLDatamine.lua index eb5e311..b02352b 100644 --- a/ARLDatamine.lua +++ b/ARLDatamine.lua @@ -468,7 +468,7 @@ function addon:TooltipScanDatabase() ARLDatamineTT:SetHyperlink(link) self:ScanToolTip(name,recipelist,reverselookup,false) else - addon:Print("Missing RecipeLink for ID " .. i .. " - " .. name .. " (If these are DK abilities, don't worry, that's normal.") + self:Print("Missing RecipeLink for ID " .. i .. " - " .. name .. " (If these are DK abilities, don't worry, that's normal.") end end @@ -477,6 +477,44 @@ function addon:TooltipScanDatabase() end +--- Parses a specific recipe in the database, and scanning its tooltips. +-- @name AckisRecipeList:TooltipScanDatabase +-- @param SpellID The [http://www.wowwiki.com/SpellLink Spell ID] of the recipe being added to the database. +-- @return Recipe has its tooltips scanned. +function addon:TooltipScanRecipe(spellid) + + -- Get internal database + local recipelist = LoadRecipe() + + if (not recipelist) then + self:Print(L["DATAMINER_NODB_ERROR"]) + return + end + + local reverselookup = CreateReverseLookup() + + ARLDatamineTT:SetOwner(WorldFrame, "ANCHOR_NONE") + GameTooltip_SetDefaultAnchor(ARLDatamineTT, UIParent) + + if (recipelist[spellid]) then + + local name = recipelist[spellid]["Name"] + local link = recipelist[spellid]["RecipeLink"] + + if link then + ARLDatamineTT:SetHyperlink(link) + self:ScanToolTip(name,recipelist,reverselookup,false) + else + self:Print("Missing RecipeLink for ID " .. spellid .. " - " .. name .. " (If these are DK abilities, don't worry, that's normal.") + end + else + self:Print("Spell ID does not exist in the database.") + end + + ARLDatamineTT:Hide() + +end + local recipenames = { -- JC ["Design: "] = true, -- 1.7.9.5