Add item level to inspect frame #15

Merged
atomaka merged 6 commits from inspect-ilvl into master 2021-03-01 20:45:14 -05:00
Showing only changes of commit 7265c6f489 - Show all commits

View file

@ -34,6 +34,10 @@ MyAddon.taunts = {
[1161] = true, -- Challenging Shout [1161] = true, -- Challenging Shout
[204079] = true -- Final Stand [204079] = true -- Final Stand
} }
MyAddon.slots = {
"HeadSlot", "ShoulderSlot", "ChestSlot", "WristSlot", "HandsSlot",
"WaistSlot", "LegsSlot", "FeetSlot", "MainHandSlot", "SecondaryHandSlot"
}
inspectInitialized = false inspectInitialized = false
local InspectFontStrings = {} local InspectFontStrings = {}
@ -170,13 +174,8 @@ function MyAddon.activateGoliath()
end end
function MyAddon.needsRepair() function MyAddon.needsRepair()
local slots = { for slot = 1, #MyAddon.slots do
"HeadSlot", "ShoulderSlot", "ChestSlot", "WristSlot", "HandsSlot", local id = GetInventorySlotInfo(MyAddon.slots[slot])
"WaistSlot", "LegsSlot", "FeetSlot", "MainHandSlot", "SecondaryHandSlot"
}
for slot = 1, #slots do
local id = GetInventorySlotInfo(slots[slot])
local cur, max = GetInventoryItemDurability(id) local cur, max = GetInventoryItemDurability(id)
if max and cur ~= max then return true end if max and cur ~= max then return true end