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 c2df6ac982 - Show all commits

View file

@ -55,9 +55,6 @@ function GetUnitFromGuid(guid)
end
function events:INSPECT_READY(guid)
local itemLevel = C_PaperDollInfo.GetInspectItemLevel(GetUnitFromGuid(guid))
print(itemLevel)
if not inspectInitialized then
print("initializing")
InspectFontStrings["itemLevel"] = InspectFrame:CreateFontString(nil, "OVERLAY")
@ -68,8 +65,12 @@ function events:INSPECT_READY(guid)
inspectInitialized = true
end
InspectFontStrings["itemLevel"]:SetText(itemLevel)
print(InspectFontStrings["itemLevel"]:GetText())
unit = GetUnitFromGuid(guid)
if unit then
local itemLevel = C_PaperDollInfo.GetInspectItemLevel(unit)
InspectFontStrings["itemLevel"]:SetText(itemLevel)
end
end
function events:GOSSIP_SHOW()