Dejunk (Sell & Destroy Junk)

Dejunk (Sell & Destroy Junk)

1M Downloads

[Bug] Can't destroy 1 specific item with Dejunk

zeenk opened this issue ยท 2 comments

commented

Tried to add this item to Dejunk but it wouldn't let me add it for some reason https://www.wowhead.com/item=169687/fragment-of-zemlans-lost-treasure-map

I can destroy it if I do it myself though, but not through Dejunk.

2024-03-25_02-40-35
2024-03-25_02-40-44

I see these items that has the same border can't actually be manually destroyed so that's maybe why it was blocked in Dejunk

2024-03-25_03-34-00
2024-03-25_03-34-10

commented

Yep. Dejunk only allows for specific item qualities to be added, and all others are denied (i.e., Legendary, Artifact, and WoWToken). As far as I know, there isn't a way to check if an item can actually be destroyed or not, so I just based it on item quality.

Dejunk/src/items.lua

Lines 187 to 208 in 0082ae9

function Items:IsItemJunkable(item)
return item.quality == Enum.ItemQuality.Poor or
item.quality == (Enum.ItemQuality.Common or Enum.ItemQuality.Standard) or
item.quality == (Enum.ItemQuality.Uncommon or Enum.ItemQuality.Good) or
item.quality == Enum.ItemQuality.Rare or
item.quality == Enum.ItemQuality.Epic or
item.quality == Enum.ItemQuality.Heirloom
end
function Items:IsItemSellable(item)
return not item.noValue and item.price > 0 and self:IsItemJunkable(item)
end
function Items:IsItemDestroyable(item)
if Addon.IS_RETAIL and item.classId == Enum.ItemClass.Battlepet then
return false
end
return self:IsItemJunkable(item)
end

commented

I see, well can close this issue now. I don't have the item anymore anyway and don't think many people will run into this scenario again :P