AdiBags

AdiBags

8M Downloads

(implementation inside) Automatically sort low level BoP and BoE gear

Debuggernaut opened this issue ยท 3 comments

commented

Hey guys, it looks like there are now some APIs that let you easily grab whether an item is soulbound and its current item level without parsing the tooltip nowadays

I kludged it into the AdiBags_LowLevel addon, here's the code I wrote:

function setFilter:Filter(slotData)
  GlobalSlotData = slotData;

  local lowlevel = false
  local boe = false
  local ilvl, isPreview, baselvl = GetDetailedItemLevelInfo(slotData.link)

  boe = C_Item.IsBound(ItemLocation:CreateFromBagAndSlot(slotData.bag, slotData.slot))
  boe = not boe

  if ilvl < self.db.profile.level then
	lowlevel = true
  end
  if slotData.class ~= "Armor" and slotData.class ~= "Weapon" then
	return
  end

  if lowlevel and boe then
	return "Low Level BoE"
  end
  if lowlevel then
	return "Low Level BoP"
  end
end
commented

Oh, right, totally forgot about this.. I have some time off soon, maybe I can get it done

commented

if you have an implementation why don't you create a PR instead of opening an issue with pasted code ?

commented

Sorry buddy, I'll try and put together a PR where it's properly built into AdiBags later