Skip to content

Commit

Permalink
Make char frame ilvl more accurate
Browse files Browse the repository at this point in the history
Ref: #75
  • Loading branch information
ls- committed May 7, 2023
1 parent ad4755f commit 2283bea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ls_UI/modules/blizzard/characterframe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ local EQUIP_SLOTS = {
local ILVL_COLORS = {}
local ILVL_STEP = 19 -- the ilvl step between content difficulties

local itemLoc = {}
local avgItemLevel

local function getItemLevelColor(itemLevel)
Expand All @@ -48,7 +49,10 @@ end
local function scanSlot(slotID)
local link = GetInventoryItemLink("player", slotID)
if link then
return true, GetDetailedItemLevelInfo(link), E:GetItemEnchantGemInfo(link)
-- C_Item.GetCurrentItemLevel is more accurate than GetDetailedItemLevelInfo
itemLoc.equipmentSlotIndex = slotID

return true, C_Item.GetCurrentItemLevel(itemLoc), E:GetItemEnchantGemInfo(link)
elseif GetInventoryItemTexture("player", slotID) then
-- if there's no link, but there's a texture, it means that there's
-- an item we have no info for
Expand Down

0 comments on commit 2283bea

Please sign in to comment.