From a399aad5e3392af1354487a8b2558204dd6d1de5 Mon Sep 17 00:00:00 2001 From: Crum Date: Tue, 10 Jul 2018 00:31:32 -0500 Subject: [PATCH] update Sort --- ElvUI/Modules/Bags/Sort.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ElvUI/Modules/Bags/Sort.lua b/ElvUI/Modules/Bags/Sort.lua index d330387..06d648f 100644 --- a/ElvUI/Modules/Bags/Sort.lua +++ b/ElvUI/Modules/Bags/Sort.lua @@ -385,7 +385,7 @@ end function B:CanItemGoInBag(bag, slot, targetBag) local item = bagIDs[B:Encode_BagSlot(bag, slot)] local itemFamily = GetItemFamily(item) - if itemFamily then + if itemFamily and itemFamily > 0 then local equipSlot = select(8, GetItemInfo(item)) if equipSlot == "INVTYPE_BAG" then itemFamily = 1 @@ -480,9 +480,10 @@ function B.Sort(bags, sorter, invertDirection) for i, bag, slot in B.IterateBags(bags, nil, "both") do local bagSlot = B:Encode_BagSlot(bag, slot) local link = B:GetItemLink(bag, slot) + local id = B:GetItemID(bag, slot) - if link then - if blackList[GetItemInfo(link)] then + if id then + if blackList[GetItemInfo(id)] then blackListedSlots[bagSlot] = true end @@ -570,9 +571,9 @@ function B.Fill(sourceBags, targetBags, reverse, canMove) if getn(emptySlots) == 0 then break end local bagSlot = B:Encode_BagSlot(bag, slot) local targetBag = B:Decode_BagSlot(emptySlots[1]) - local link = B:GetItemLink(bag, slot) + local id = B:GetItemID(bag, slot) - if link and blackList[GetItemInfo(link)] then + if id and blackList[GetItemInfo(id)] then blackListedSlots[bagSlot] = true end