mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update sort
This commit is contained in:
@@ -108,8 +108,8 @@ local safe = {
|
|||||||
|
|
||||||
local frame = CreateFrame("Frame")
|
local frame = CreateFrame("Frame")
|
||||||
local t, WAIT_TIME = 0, 0.05
|
local t, WAIT_TIME = 0, 0.05
|
||||||
frame:SetScript("OnUpdate", function(_, elapsed)
|
frame:SetScript("OnUpdate", function()
|
||||||
t = t + (elapsed or 0.01)
|
t = t + (arg1 or 0.01)
|
||||||
if t > WAIT_TIME then
|
if t > WAIT_TIME then
|
||||||
t = 0
|
t = 0
|
||||||
B:DoMoves()
|
B:DoMoves()
|
||||||
@@ -258,7 +258,7 @@ local function IterateForwards(bagList, i)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function IterateBackwards(bagList, i)
|
local function IterateBackwards(bagList, i)
|
||||||
--[[i = i + 1
|
i = i + 1
|
||||||
local step = 1
|
local step = 1
|
||||||
for ii = getn(bagList), 1, -1 do
|
for ii = getn(bagList), 1, -1 do
|
||||||
local bag = bagList[ii]
|
local bag = bagList[ii]
|
||||||
@@ -273,21 +273,6 @@ local function IterateBackwards(bagList, i)
|
|||||||
step = step + 1
|
step = step + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end]]
|
|
||||||
i = i + 1
|
|
||||||
local step = 1
|
|
||||||
for _, bag in bagList do
|
|
||||||
local slots = B:GetNumSlots(bag)
|
|
||||||
if i > slots + step then
|
|
||||||
step = step + slots
|
|
||||||
else
|
|
||||||
for slot = 1, slots do
|
|
||||||
if step == i then
|
|
||||||
return i, bag, slot
|
|
||||||
end
|
|
||||||
step = step + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
bagRole = nil
|
bagRole = nil
|
||||||
end
|
end
|
||||||
@@ -476,7 +461,7 @@ local function buildBlacklist(arg)
|
|||||||
if find(entry, "%[") and find(entry, "%]") then
|
if find(entry, "%[") and find(entry, "%]") then
|
||||||
entry = match(entry, "%[(.*)%]")
|
entry = match(entry, "%[(.*)%]")
|
||||||
end
|
end
|
||||||
blackListQueries[getn(blackListQueries) + 1] = entry
|
tinsert(blackListQueries, entry)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -606,7 +591,8 @@ function B.SortBags(...)
|
|||||||
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
|
||||||
|
tinsert(bagCache[bagType], slotNum)
|
||||||
end
|
end
|
||||||
for bagType, sortedBags in pairs(bagCache) do
|
for bagType, sortedBags in pairs(bagCache) do
|
||||||
if bagType ~= "Normal" then
|
if bagType ~= "Normal" then
|
||||||
@@ -676,7 +662,7 @@ function B:DoMove(move)
|
|||||||
if moveTracker[source] then
|
if moveTracker[source] then
|
||||||
return false, "move incomplete"
|
return false, "move incomplete"
|
||||||
else
|
else
|
||||||
return --[[B:StopStacking(L["Confused.. Try Again!"])]] -- TODO
|
return B:StopStacking(L["Confused.. Try Again!"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user