Mercurial > wow > askmrrobot
diff Constants.lua @ 89:6bbe64d587b4 v42
Improved artifact/relic reading, gear display.
Now creates equipment manager sets when you use button or command to equip a set.
author | yellowfive |
---|---|
date | Sun, 18 Sep 2016 21:24:08 -0700 |
parents | 0515882856f1 |
children | b8e9664d3229 |
line wrap: on
line diff
--- a/Constants.lua Fri Sep 02 16:22:12 2016 -0700 +++ b/Constants.lua Sun Sep 18 21:24:08 2016 -0700 @@ -26,6 +26,7 @@ Amr.GetItemTooltip = Amr.Serializer.GetItemTooltip Amr.GetItemLevel = Amr.Serializer.GetItemLevel Amr.GetItemUniqueId = Amr.Serializer.GetItemUniqueId +Amr.ArtifactIdToSpecNumber = Amr.Serializer.ArtifactIdToSpecNumber -- map of slot ID to display text Amr.SlotDisplayText = { @@ -160,6 +161,8 @@ table.insert(parts, 4) elseif itemObj.level and itemObj.level ~= 0 then table.insert(parts, 512) + elseif itemObj.relicBonusIds then + table.insert(parts, 256) else table.insert(parts, 0) end @@ -184,10 +187,24 @@ table.insert(parts, 0) end - -- technically relic stuff comes after this... but we ignore it for now, too much of a pain - table.insert(parts, 0) - table.insert(parts, 0) - table.insert(parts, 0) + -- sometimes we provide relic bonus IDs + if itemObj.relicBonusIds then + for i = 1,3 do + local bonusList = itemObj.relicBonusIds[i] + if bonusList and #bonusList > 0 then + table.insert(parts, #bonusList) + for bi, bv in ipairs(bonusList) do + table.insert(parts, bv) + end + else + table.insert(parts, 0) + end + end + else + table.insert(parts, 0) + table.insert(parts, 0) + table.insert(parts, 0) + end return table.concat(parts, ":") end