Implement some sort of basic filtering/looting

This commit is contained in:
2024-12-16 13:52:52 +01:00
parent 969ffe7d48
commit a06bdf3bf6

View File

@@ -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)