BetterBags

BetterBags

1M Downloads

Item level text on items are all color coded to legendary

ahnberg opened this issue ยท 1 comments

commented

Addon Version

v0.1.77

World of Warcraft Version

Retail

Describe the bug

Having the option enabled to show item levels on items in your bags in a colored fashion shows all items in an orange text instead of purple for epics, orange for legendary, etc.

Steps to reproduce

Have item level colors enabled in options, and open bags.

Wow_5h3LSu7HhL

commented

Was able to hack this back to just plain coloring to item quality,. (current system colors to legendary the higher the item level is but is using item levels from dragonflight)

frames/item.lua replace GetItemLevelColor function call or just the whole ShowItemLevel function

function itemFrame.itemProto:ShowItemLevel()
  local ilvlOpts = database:GetItemLevelOptions(self.kind)
  local data = items:GetItemDataFromSlotKey(self.slotkey)
  local ilvl = data.itemInfo.currentItemLevel
  self.ilvlText:SetText(tostring(ilvl))
  if ilvlOpts.color then
    local r, g, b = color:GetItemLevelColor(ilvl,data.itemInfo.itemQuality)
    self.ilvlText:SetTextColor(r, g, b, 1)
  else
    self.ilvlText:SetTextColor(1, 1, 1, 1)
  end
  self.ilvlText:Show()
end

util/color.lua
add this in the beginning of the file. line 6 or so

---@class Constants: AceModule
local const = addon:GetModule('Constants')

and modify the GetItemLevelColor function

function color:GetItemLevelColor(itemLevel,itemQuality)
  if not itemQuality then
    return unpack(interpolateColor(colorTable, itemLevel))
  end
  return unpack(const.ITEM_QUALITY_COLOR[itemQuality])
end

this way I can get the quality colors back
image