Quantcast

Handle upgraded items (cache them separately)

Kevin Lyles [12-08-12 - 02:49]
Handle upgraded items (cache them separately)
Filename
Locales/enUS/patterns.lua
WeightsWatcher.lua
diff --git a/Locales/enUS/patterns.lua b/Locales/enUS/patterns.lua
index ccdf5de..a8fe48a 100644
--- a/Locales/enUS/patterns.lua
+++ b/Locales/enUS/patterns.lua
@@ -85,6 +85,7 @@ ww_ignoredInvalidStats = {

 ww_IgnoredLines = {
 	"^$",
+	"^upgrade level:",
 	-- Reputation and materials requirements
 	"^requires ",
 	"^  [^ ]",
diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua
index b28e384..437239b 100644
--- a/WeightsWatcher.lua
+++ b/WeightsWatcher.lua
@@ -9,9 +9,9 @@ local function splitLink(link)
 	if link:find("|") then
 		link = link:gsub(".*|H([^|]+)|h.*", "%1")
 	end
-	local linkType, Id, enchant, gemId1, gemId2, gemId3, gemId4, suffixId, uniqueId, linkLevel, reforgeInfo = strsplit(":", link)
+	local linkType, Id, enchant, gemId1, gemId2, gemId3, gemId4, suffixId, uniqueId, linkLevel, reforgeInfo, upgradeInfo = strsplit(":", link)
 	if linkType == "item" then
-		bareLink = strjoin(":", linkType, Id, "0:0:0:0:0", suffixId, uniqueId, linkLevel, reforgeInfo)
+		bareLink = strjoin(":", linkType, Id, "0:0:0:0:0", suffixId, uniqueId, linkLevel, reforgeInfo, upgradeInfo)
 		return bareLink, enchant, {{gemId1}, {gemId2}, {gemId3}, {gemId4}}
 	end
 end