Add item level to inspect frame #15
1 changed files with 6 additions and 5 deletions
|
@ -55,9 +55,6 @@ function GetUnitFromGuid(guid)
|
||||||
end
|
end
|
||||||
|
|
||||||
function events:INSPECT_READY(guid)
|
function events:INSPECT_READY(guid)
|
||||||
local itemLevel = C_PaperDollInfo.GetInspectItemLevel(GetUnitFromGuid(guid))
|
|
||||||
print(itemLevel)
|
|
||||||
|
|
||||||
if not inspectInitialized then
|
if not inspectInitialized then
|
||||||
print("initializing")
|
print("initializing")
|
||||||
InspectFontStrings["itemLevel"] = InspectFrame:CreateFontString(nil, "OVERLAY")
|
InspectFontStrings["itemLevel"] = InspectFrame:CreateFontString(nil, "OVERLAY")
|
||||||
|
@ -68,8 +65,12 @@ function events:INSPECT_READY(guid)
|
||||||
inspectInitialized = true
|
inspectInitialized = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
unit = GetUnitFromGuid(guid)
|
||||||
|
if unit then
|
||||||
|
local itemLevel = C_PaperDollInfo.GetInspectItemLevel(unit)
|
||||||
InspectFontStrings["itemLevel"]:SetText(itemLevel)
|
InspectFontStrings["itemLevel"]:SetText(itemLevel)
|
||||||
print(InspectFontStrings["itemLevel"]:GetText())
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function events:GOSSIP_SHOW()
|
function events:GOSSIP_SHOW()
|
||||||
|
|
Loading…
Reference in a new issue