Revert "test"

This reverts commit 1436a74def.
This commit is contained in:
Bunny67
2018-07-08 11:33:44 +03:00
parent 1436a74def
commit 9f690f5f5e
+11 -11
View File
@@ -38,10 +38,10 @@ for i = 0, NUM_BAG_SLOTS do
end end
local allBags = {} local allBags = {}
for _, i in playerBags do for _, i in ipairs(playerBags) do
tinsert(allBags, i) tinsert(allBags, i)
end end
for _, i in bankBags do for _, i in ipairs(bankBags) do
tinsert(allBags, i) tinsert(allBags, i)
end end
@@ -121,10 +121,10 @@ B.SortUpdateTimer = frame
local function BuildSortOrder() local function BuildSortOrder()
itemTypes = {} itemTypes = {}
itemSubTypes = {} itemSubTypes = {}
for i, iType in {GetAuctionItemClasses()} do for i, iType in ipairs({GetAuctionItemClasses()}) do
itemTypes[iType] = i itemTypes[iType] = i
itemSubTypes[iType] = {} itemSubTypes[iType] = {}
for ii, isType in {GetAuctionItemSubClasses(i)} do for ii, isType in ipairs({GetAuctionItemSubClasses(i)}) do
itemSubTypes[iType][isType] = ii itemSubTypes[iType][isType] = ii
end end
end end
@@ -220,7 +220,7 @@ local function ReverseSort(a, b)
end end
local function UpdateSorted(source, destination) local function UpdateSorted(source, destination)
for i, bs in bagSorted do for i, bs in pairs(bagSorted) do
if bs == source then if bs == source then
bagSorted[i] = destination bagSorted[i] = destination
elseif bs == destination then elseif bs == destination then
@@ -452,7 +452,7 @@ local blackList = {}
local blackListQueries = {} local blackListQueries = {}
local function buildBlacklist(arg) local function buildBlacklist(arg)
for entry in arg do for entry in pairs(arg) do
local itemName = GetItemInfo(entry) local itemName = GetItemInfo(entry)
if itemName then if itemName then
blackList[itemName] = true blackList[itemName] = true
@@ -486,7 +486,7 @@ function B.Sort(bags, sorter, invertDirection)
end end
if not blackListedSlots[bagSlot] then if not blackListedSlots[bagSlot] then
for _, itemsearchquery in blackListQueries do for _, itemsearchquery in pairs(blackListQueries) do
local success, result = pcall(Search.Matches, Search, link, itemsearchquery) local success, result = pcall(Search.Matches, Search, link, itemsearchquery)
if success and result then if success and result then
blackListedSlots[bagSlot] = blackListedSlots[bagSlot] or result blackListedSlots[bagSlot] = blackListedSlots[bagSlot] or result
@@ -535,7 +535,7 @@ end
function B.FillBags(from, to) function B.FillBags(from, to)
B.Stack(from, to) B.Stack(from, to)
for _, bag in to do for _, bag in ipairs(to) do
if B:IsSpecialtyBag(bag) then if B:IsSpecialtyBag(bag) then
tinsert(specialtyBags, bag) tinsert(specialtyBags, bag)
end end
@@ -585,13 +585,13 @@ end
function B.SortBags(...) function B.SortBags(...)
for i = 1, arg.n do for i = 1, arg.n do
local bags = arg[i] local bags = arg[i]
for i, slotNum in bags do for i, slotNum in ipairs(bags) do
local bagType = B:IsSpecialtyBag(slotNum) local bagType = B:IsSpecialtyBag(slotNum)
if bagType == false then bagType = "Normal" end if bagType == false then bagType = "Normal" end
if not bagCache[bagType] then bagCache[bagType] = {} end if not bagCache[bagType] then bagCache[bagType] = {} end
bagCache[bagType][i] = slotNum bagCache[bagType][i] = slotNum
end end
for bagType, sortedBags in bagCache do for bagType, sortedBags in pairs(bagCache) do
if bagType ~= "Normal" then if bagType ~= "Normal" then
B.Stack(sortedBags, sortedBags, B.IsPartial) B.Stack(sortedBags, sortedBags, B.IsPartial)
B.Stack(bagCache["Normal"], sortedBags) B.Stack(bagCache["Normal"], sortedBags)
@@ -697,7 +697,7 @@ function B:DoMoves()
end end
if lockStop then if lockStop then
for slot, itemID in moveTracker do for slot, itemID in pairs(moveTracker) do
local actualItemID = self:GetItemID(self:Decode_BagSlot(slot)) local actualItemID = self:GetItemID(self:Decode_BagSlot(slot))
if actualItemID ~= itemID then if actualItemID ~= itemID then
WAIT_TIME = 0.1 WAIT_TIME = 0.1