You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
473 B

local addon = CreateFrame("Frame")
-- NOTE The event fires twice upon opening a lootable container
addon:RegisterEvent("LOOT_READY")
-- TODO Write description
addon:SetScript("OnEvent", function ()
-- Check if auto loot is enabled xor its activation key is pressed
if GetCVarBool("autoLootDefault") ~= IsModifiedClick("AUTOLOOTTOGGLE") then
-- Work backwards toward the built-in auto loot iterator
for i = GetNumLootItems(), 1, -1 do
LootSlot(i)
end
end
end)