AdiBags icon indicating copy to clipboard operation
AdiBags copied to clipboard

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

Open Debuggernaut opened this issue 4 years ago • 3 comments

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

Debuggernaut avatar Jun 28 '20 19:06 Debuggernaut

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

clmcgrath avatar Jul 14 '20 17:07 clmcgrath

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

Debuggernaut avatar Jul 14 '20 22:07 Debuggernaut

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

Debuggernaut avatar Aug 21 '22 21:08 Debuggernaut