# HG changeset patch # User yellowfive # Date 1475362080 25200 # Node ID e0ddd02d6555a50fa4dc0dcbfe55c51787af7fb1 # Parent 975b498487038052fa7792262ca303981219bfcb tweak to ignore some junk in team optimizer loot export diff -r 975b49848703 -r e0ddd02d6555 AskMrRobot-Serializer/AskMrRobot-Serializer.lua --- a/AskMrRobot-Serializer/AskMrRobot-Serializer.lua Fri Sep 23 18:29:56 2016 -0700 +++ b/AskMrRobot-Serializer/AskMrRobot-Serializer.lua Sat Oct 01 15:48:00 2016 -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", 44 +local MAJOR, MINOR = "AskMrRobot-Serializer", 45 local Amr, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not Amr then return end -- already loaded by something else diff -r 975b49848703 -r e0ddd02d6555 AskMrRobot.toc --- a/AskMrRobot.toc Fri Sep 23 18:29:56 2016 -0700 +++ b/AskMrRobot.toc Sat Oct 01 15:48:00 2016 -0700 @@ -1,7 +1,7 @@ ## Interface: 70000 ## Title: Ask Mr. Robot ## Author: Team Robot, Inc. -## Version: 44 +## Version: 45 ## Notes: Gear import/export, combat logging, and more. ## URL: www.askmrrobot.com ## SavedVariables: AskMrRobotDb3 diff -r 975b49848703 -r e0ddd02d6555 TeamOptimizer.lua --- a/TeamOptimizer.lua Fri Sep 23 18:29:56 2016 -0700 +++ b/TeamOptimizer.lua Sat Oct 01 15:48:00 2016 -0700 @@ -794,6 +794,11 @@ Amr.db.global.TeamOpt.LootGear = newInfo end +local _ignoreLoot = { + [139562] = true, + [136903] = true +} + local function scanMasterLoot() -- only care if we are in a raid or group if not IsInGroup() and not IsInRaid() then return end @@ -817,7 +822,13 @@ local lootType = GetLootSlotType(i) if lootType == 1 then local link = GetLootSlotLink(i) - table.insert(loot, link) + local success, itemObj = pcall(Amr.ParseItemLink, link) + + if not success or not itemObj or _ignoreLoot[itemObj.id] then + -- ignore items that can't be read or that we explicitly don't care about + else + table.insert(loot, link) + end end end