diff Constants.lua @ 69:69db1c3025ac v27

fixed some bugs with 6.2 item link format changes, added bib overwolf support
author yellowfive
date Mon, 06 Jul 2015 17:39:57 -0700
parents e638168c3395
children 0515882856f1
line wrap: on
line diff
--- a/Constants.lua	Mon Jun 29 17:06:02 2015 -0700
+++ b/Constants.lua	Mon Jul 06 17:39:57 2015 -0700
@@ -146,18 +146,25 @@
         table.insert(parts, -math.abs(itemObj.suffixId))
     end
     
-    table.insert(parts, 0)
+    table.insert(parts, 0) -- some unique id, doesn't seem to matter
     table.insert(parts, UnitLevel("player"))
 	table.insert(parts, 0) -- unknown
-    table.insert(parts, itemObj.upgradeId)
-    table.insert(parts, 0)
+    table.insert(parts, 0) -- unknown
+    table.insert(parts, 0) -- difficulty id, doesn't matter
     
     if itemObj.bonusIds then
         table.insert(parts, #itemObj.bonusIds)
         for i,v in ipairs(itemObj.bonusIds) do
             table.insert(parts, v)
         end
+	else
+		table.insert(parts, 0) -- no bonus ids
     end
+	
+	-- upgrade id is tacked onto the end now it seems
+	if (not itemObj.bonusIds or #itemObj.bonusIds == 0) and itemObj.upgradeId and itemObj.upgradeId ~= 0 then
+		table.insert(parts, itemObj.upgradeId)
+	end
     
     return table.concat(parts, ":")
 end