changeset 63:f1d5827dbde0 v24

tweak to read new item link format
author yellowfive
date Tue, 23 Jun 2015 12:56:57 -0700
parents 8b37293e9ea5
children ce1746d16d67
files AskMrRobot-Serializer/AskMrRobot-Serializer.lua AskMrRobot.toc Constants.lua
diffstat 3 files changed, 32 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/AskMrRobot-Serializer/AskMrRobot-Serializer.lua	Tue Jun 23 00:27:41 2015 -0700
+++ b/AskMrRobot-Serializer/AskMrRobot-Serializer.lua	Tue Jun 23 12:56:57 2015 -0700
@@ -1,7 +1,7 @@
 -- AskMrRobot-Serializer will serialize and communicate character data between users.
 -- This is used primarily to associate character information to logs uploaded to askmrrobot.com.
 
-local MAJOR, MINOR = "AskMrRobot-Serializer", 23
+local MAJOR, MINOR = "AskMrRobot-Serializer", 24
 local Amr, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
 if not Amr then return end -- already loaded by something else
@@ -180,6 +180,24 @@
 
 -- IDs of set tokens that we would care about in a player's inventory
 Amr.SetTokenIds = {
+	[127970] = true,
+	[127969] = true,
+	[127968] = true,
+	[127967] = true,
+	[127966] = true,
+	[127965] = true,
+	[127964] = true,
+	[127963] = true,
+	[127962] = true,
+	[127961] = true,
+	[127960] = true,
+	[127959] = true,
+	[127958] = true,
+	[127957] = true,
+	[127956] = true,
+	[127955] = true,
+	[127954] = true,
+	[127953] = true,
 	[120285] = true,
 	[120284] = true,
 	[120283] = true,
@@ -516,6 +534,7 @@
 	[63684] = true,
 	[63683] = true,
 	[63682] = true,
+	[51320] = true,
 	[45652] = true,
 	[45651] = true,
 	[45650] = true,
@@ -560,7 +579,7 @@
 -- Public Utility Methods
 ----------------------------------------------------------------------------------------
 
--- item link format:  |cffa335ee|Hitem:itemID:enchant:gem1:gem2:gem3:gem4:suffixID:uniqueID:level:upgradeId:instanceDifficultyID:numBonusIDs:bonusID1:bonusID2...|h[item name]|h|r
+-- item link format:  |cffa335ee|Hitem:itemID:enchant:gem1:gem2:gem3:gem4:suffixID:uniqueID:level:unknown:upgradeId:instanceDifficultyID:numBonusIDs:bonusID1:bonusID2...|h[item name]|h|r
 -- get an object with all of the parts of the item link format that we care about
 function Amr.ParseItemLink(itemLink)
     if not itemLink then return nil end
@@ -577,13 +596,13 @@
     item.suffixId = math.abs(tonumber(parts[7])) -- convert suffix to positive number, that's what we use in our code
     --item.uniqueId = tonumber(parts[8])
     --item.level = tonumber(parts[9])
-    item.upgradeId = tonumber(parts[10])
-    --item.difficultyId = tonumber(parts[11])
+    item.upgradeId = tonumber(parts[11])
+    --item.difficultyId = tonumber(parts[12])
     
-    local numBonuses = tonumber(parts[12])
+    local numBonuses = tonumber(parts[13])
     if numBonuses and numBonuses > 0 then
         item.bonusIds = {}
-        for i = 13, 12 + numBonuses do
+        for i = 14, 13 + numBonuses do
             table.insert(item.bonusIds, tonumber(parts[i]))
         end
 		table.sort(item.bonusIds)
--- a/AskMrRobot.toc	Tue Jun 23 00:27:41 2015 -0700
+++ b/AskMrRobot.toc	Tue Jun 23 12:56:57 2015 -0700
@@ -1,10 +1,14 @@
 ## Interface: 60200
 ## Title: Ask Mr. Robot
 ## Author: Team Robot, Inc.
-## Version: 23
+## Version: 24
 ## Notes: Gear import/export, combat logging, and more.
 ## URL: www.askmrrobot.com
 ## SavedVariables: AskMrRobotDb2
+## X-Curse-Packaged-Version: v23
+## X-Curse-Project-Name: AskMrRobot
+## X-Curse-Project-ID: askmrrobot
+## X-Curse-Repository-ID: wow/askmrrobot/mainline
 
 Libs\LibStub\LibStub.lua
 Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
--- a/Constants.lua	Tue Jun 23 00:27:41 2015 -0700
+++ b/Constants.lua	Tue Jun 23 12:56:57 2015 -0700
@@ -5,7 +5,8 @@
 Amr.MIN_IMPORT_VERSION = 21
 
 -- min addon version that we will support for inter-addon communication for e.g. the team optimizer
-Amr.MIN_ADDON_VERSION = 22
+--  last update to version 24 when item link format changed
+Amr.MIN_ADDON_VERSION = 24
 
 -- import some constants from the serializer for convenience
 Amr.ChatPrefix = Amr.Serializer.ChatPrefix