From 3f3f34fe03b67b8d8206fb2cb01ee15d1105990b Mon Sep 17 00:00:00 2001 From: torhal Date: Tue, 2 Jun 2009 22:28:51 +0000 Subject: [PATCH] In addon:TooltipScanDatabase(): Added check for nil recipe link, and print out its ID and name. In addon:ScanTooltip(): Renamed invalid variable names 1H and 2H to OneHanded and TwoHanded. --- ARLDatamine.lua | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ARLDatamine.lua b/ARLDatamine.lua index 566dea0..6aee6f6 100644 --- a/ARLDatamine.lua +++ b/ARLDatamine.lua @@ -436,8 +436,13 @@ function addon:TooltipScanDatabase() local name = recipelist[i]["Name"] local link = recipelist[i]["RecipeLink"] - ARLDatamineTT:SetHyperlink(link) - self:ScanToolTip(name,recipelist,reverselookup) + + if link then + ARLDatamineTT:SetHyperlink(link) + self:ScanToolTip(name,recipelist,reverselookup) + else + addon:Print("Missing RecipeLink for ID "..i.." - "..name) + end end @@ -523,8 +528,8 @@ function addon:ScanToolTip(name,recipelist,reverselookup) local Ring = false local Necklace = false local Shield = false - local 1H = false - local 2H = false + local OneHanded = false + local TwoHanded = false local Axe = false local Sword = false local Mace = false @@ -735,9 +740,9 @@ function addon:ScanToolTip(name,recipelist,reverselookup) elseif (strmatch(strlower(text),"shield")) then Shield = true elseif (strmatch(strlower(text),"1 hand")) or (strmatch(strlower(text),"off hand")) then - 1H = true + OneHanded = true elseif (strmatch(strlower(text),"2 hand")) then - 2H = true + TwoHanded = true elseif (strmatch(strlower(text),"axe")) then Axe = true elseif (strmatch(strlower(text),"sword")) then -- 1.7.9.5