In addon:ScanTooltip(): Changed pattern in gsub() to correctly parse things such as "Alchemy: Transmute: Eternal Water to Fire" and "Engineering: The Mortar: Reloaded". Added a check for failed reverse lookups.
torhal [06-03-09 - 23:11]
In addon:ScanTooltip(): Changed pattern in gsub() to correctly parse things such as "Alchemy: Transmute: Eternal Water to Fire" and "Engineering: The Mortar: Reloaded". Added a check for failed reverse lookups.
diff --git a/ARLDatamine.lua b/ARLDatamine.lua
index 6aa438b..8ef4cc7 100644
--- a/ARLDatamine.lua
+++ b/ARLDatamine.lua
@@ -814,13 +814,16 @@ function addon:ScanToolTip(name,recipelist,reverselookup)
end
if (recipefound) then
--- print("Recipe found: "..matchtext)
-- Parse the recipe database until we get a match on the name
local spellid
- local recipename = gsub(name,"%a+%: ","")
+ local recipename = gsub(name, "%a+%?: ", "")
spellid = reverselookup[recipename]
+ if not spellid then
+ print("Recipe "..recipename.." has no reverse lookup")
+ end
+
local flags = recipelist[spellid]["Flags"]
local missingflags = {}
local extraflags = {}