Mercurial > wow > askmrrobot
changeset 108:917ac27213d1 v50
Update to equipment set creation to use new 7.2 API.
author | yellowfive |
---|---|
date | Thu, 30 Mar 2017 14:08:56 -0700 |
parents | 8b8a5b768d18 |
children | 21580b222a57 |
files | AskMrRobot-Serializer/AskMrRobot-Serializer.lua AskMrRobot.toc Gear.lua |
diffstat | 3 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/AskMrRobot-Serializer/AskMrRobot-Serializer.lua Tue Mar 28 16:10:12 2017 -0700 +++ b/AskMrRobot-Serializer/AskMrRobot-Serializer.lua Thu Mar 30 14:08:56 2017 -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", 49 +local MAJOR, MINOR = "AskMrRobot-Serializer", 50 local Amr, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not Amr then return end -- already loaded by something else
--- a/AskMrRobot.toc Tue Mar 28 16:10:12 2017 -0700 +++ b/AskMrRobot.toc Thu Mar 30 14:08:56 2017 -0700 @@ -1,7 +1,7 @@ ## Interface: 70200 ## Title: Ask Mr. Robot ## Author: Team Robot, Inc. -## Version: 49 +## Version: 50 ## Notes: Gear import/export, combat logging, and more. ## URL: www.askmrrobot.com ## SavedVariables: AskMrRobotDb3
--- a/Gear.lua Tue Mar 28 16:10:12 2017 -0700 +++ b/Gear.lua Thu Mar 30 14:08:56 2017 -0700 @@ -483,7 +483,13 @@ end if item then Amr.GetItemInfo(item.id, function(customArg, name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture) - SaveEquipmentSet("AMR " .. specName, texture) + local setname = "AMR " .. specName + local setid = C_EquipmentSet.GetEquipmentSetID(setname) + if setid then + C_EquipmentSet.SaveEquipmentSet(setid, texture) + else + C_EquipmentSet.CreateEquipmentSet(setname, texture) + end end) end end