Modules/Bags: use new appearance system if available

This commit is contained in:
andrew6180
2024-06-07 00:24:11 -07:00
parent 69781c6c34
commit 84e548b1ee
+6 -1
View File
@@ -388,7 +388,12 @@ function B:UpdateSlot(frame, bagID, slotID)
end
slot.isUnlearnedVanity = VANITY_ITEMS[slot.id] and not C_VanityCollection.IsCollectionItemOwned(slot.id) and iType ~= "Consumable"
slot.isUnlearnedWardrobe = not (BAD_WARDROBE_SUBTYPES[iSubtype] and iType == "Weapon") and APPEARANCE_ITEM_INFO[slot.id] and not APPEARANCE_ITEM_INFO[slot.id]:GetCollectedID()
if C_Appearance then
local appearanceID = C_Appearance.GetItemAppearanceID(slot.id)
slot.isUnlearnedWardrobe = appearanceID and not C_AppearanceCollection.IsAppearanceCollected(appearanceID)
else
slot.isUnlearnedWardrobe = not (BAD_WARDROBE_SUBTYPES[iSubtype] and iType == "Weapon") and APPEARANCE_ITEM_INFO[slot.id] and not APPEARANCE_ITEM_INFO[slot.id]:GetCollectedID()
end
slot.isJunk = (slot.rarity and slot.rarity == 0) and (itemPrice and itemPrice > 0) and (iType and iType ~= "Quest")
slot.junkDesaturate = slot.isJunk and E.db.bags.junkDesaturate