Implement some sort of basic filtering/looting
This commit is contained in:
16
Autoloot.lua
16
Autoloot.lua
@@ -116,6 +116,11 @@ function shared.Autoloot.Init()
|
||||
end
|
||||
}
|
||||
|
||||
---@type Filter[]
|
||||
local Filters = {
|
||||
GoldFilter,
|
||||
}
|
||||
|
||||
-- _ ___ ___ _____ _ ___ ____ ___ ____
|
||||
-- | | / _ \ / _ \_ _| | | / _ \ / ___|_ _/ ___|
|
||||
-- | | | | | | | | || | | | | | | | | _ | | |
|
||||
@@ -127,9 +132,14 @@ function shared.Autoloot.Init()
|
||||
lootReadyFrame:SetScript("OnEvent", function()
|
||||
local lootInfo = GetLootInfo()
|
||||
shared.DumpTable(lootInfo, 0)
|
||||
for _, loot in ipairs(lootInfo) do
|
||||
if loot.locked then
|
||||
Name(loot.item)
|
||||
|
||||
for slot = #lootInfo, 1, -1 do
|
||||
for _, filter in ipairs(Filters) do
|
||||
if filter.Matches(slot) then
|
||||
print(string.format("Autolooting slot %s", tostring(slot)))
|
||||
shared.DumpTable(filter, 0)
|
||||
LootSlot(slot)
|
||||
end
|
||||
end
|
||||
end
|
||||
--aura_env.FilterService.Run(lootInfo)
|
||||
|
Reference in New Issue
Block a user