@@ -6,7 +6,7 @@ local addonName, ns = ...
66
77function ns :BuildDisplayList ()
88 local list = {}
9- for bag = 0 , 4 do
9+ for bag = 0 , self : GetMaxBagID () do
1010 local numSlots = C_Container .GetContainerNumSlots (bag )
1111 for slot = 1 , numSlots do
1212 local itemInfo = C_Container .GetContainerItemInfo (bag , slot )
@@ -23,11 +23,13 @@ function ns:BuildDisplayList()
2323 local isAlwaysSell = self :IsAlwaysSell (itemID )
2424 local isMarked = self :IsMarked (itemID )
2525
26+ local _ , _ , _ , _ , _ , bClassID , bSubclassID = C_Item .GetItemInfoInstant (itemID )
2627 if not self :IsNeverSell (itemID )
2728 and not isLocked
2829 and not self :IsRefundable (bag , slot )
2930 and (sellPrice and sellPrice > 0 or isAlwaysSell )
3031 and not hasNoValue
32+ and not (self .db .protectMountEquipment and bClassID == 15 and bSubclassID == 6 )
3133 and not (self .db .protectEquipmentSets and self :IsInEquipmentSet (itemID ))
3234 and not (self .db .protectUncollectedTransmog and self :HasTransmogAppearance (itemID ) and self :IsUncollectedTransmog (itemID ))
3335 and not (self .db .protectTransmogSource and self :HasTransmogAppearance (itemID ) and self :IsUncollectedTransmogSource (itemID ))
@@ -37,28 +39,20 @@ function ns:BuildDisplayList()
3739 -- Skip: soulbound-only mode, item is not bound to player
3840 elseif self .db .protectBoE and isBoe and not self .db .allowBoESell and not isAlwaysSell then
3941 -- Skip: BoE protection
42+ elseif self .db .protectWarband and self :IsWarband (bag , slot ) and not isAlwaysSell then
43+ -- Skip: Warband protection
4044 elseif self .db .protectCurrentExpMaterials
41- and self : GetItemClassID ( itemID ) == 7
45+ and bClassID == 7
4246 and self :GetItemExpansion (itemLink ) == ns .CURRENT_EXPANSION
4347 and not isAlwaysSell then
4448 -- Skip current expansion trade goods
4549 else
4650 local ilvl = self :GetEffectiveItemLevel (itemLink )
4751 local isEquippable = self :IsEquippable (itemID )
4852 local equippedIlvl = isEquippable and self :GetEquippedIlvlForItem (itemID ) or 0
49- local classID = self : GetItemClassID ( itemID )
53+ local classID = bClassID
5054 local expansionID = self :GetItemExpansion (itemLink )
5155
52- -- AH value lookup
53- local ahValue = 0
54- if TSM_API and TSM_API .GetCustomPriceValue then
55- local ok , val = pcall (TSM_API .GetCustomPriceValue , " DBMarket" , " i:" .. itemID )
56- if ok and val then ahValue = val end
57- elseif Auctionator and Auctionator .API and Auctionator .API .v1 and Auctionator .API .v1 .GetAuctionPriceByItemLink then
58- local ok , val = pcall (Auctionator .API .v1 .GetAuctionPriceByItemLink , " AutoSellPlus" , itemLink )
59- if ok and val then ahValue = val end
60- end
61-
6256 list [# list + 1 ] = {
6357 bag = bag ,
6458 slot = slot ,
@@ -74,9 +68,10 @@ function ns:BuildDisplayList()
7468 isAlwaysSell = isAlwaysSell ,
7569 isMarked = isMarked ,
7670 isBoe = isBoe ,
77- classID = classID ,
71+ classID = bClassID ,
72+ subclassID = bSubclassID ,
7873 expansionID = expansionID ,
79- ahValue = ahValue ,
74+ ahValue = 0 ,
8075 checked = false ,
8176 visible = false ,
8277 }
@@ -204,6 +199,7 @@ function ns:ApplyFilters(displayList, userUnchecked)
204199
205200 -- Category filters (non-equippable items)
206201 if not visible then
202+ local isMountEquip = (item .classID == 15 and item .subclassID == 6 )
207203 if item .classID == 0 and db .sellConsumables then
208204 visible = true
209205 autoChecked = true
@@ -214,13 +210,29 @@ function ns:ApplyFilters(displayList, userUnchecked)
214210 visible = true
215211 autoChecked = not db .protectQuestItems
216212 elseif item .classID == 15 and db .sellMiscItems then
217- visible = true
218- autoChecked = true
213+ if db .protectMountEquipment and isMountEquip then
214+ visible = false
215+ autoChecked = false
216+ else
217+ visible = true
218+ autoChecked = true
219+ end
219220 end
220221 end
221222
222223 item .visible = visible
223224
225+ -- Deferred AH value lookup: only query for visible items
226+ if visible and item .ahValue == 0 then
227+ if TSM_API and TSM_API .GetCustomPriceValue then
228+ local ok , val = pcall (TSM_API .GetCustomPriceValue , " DBMarket" , " i:" .. item .itemID )
229+ if ok and val then item .ahValue = val end
230+ elseif Auctionator and Auctionator .API and Auctionator .API .v1 and Auctionator .API .v1 .GetAuctionPriceByItemLink then
231+ local ok , val = pcall (Auctionator .API .v1 .GetAuctionPriceByItemLink , " AutoSellPlus" , item .itemLink )
232+ if ok and val then item .ahValue = val end
233+ end
234+ end
235+
224236 local key = item .bag .. " :" .. item .slot
225237 if userUnchecked [key ] then
226238 item .checked = false
0 commit comments