Hey, im not sure if a lot of people know but there has been a bug in the autoloot in WoW for a very long time where sometimes it would not actually autoloot and
AutoLootFix fixed this bug, but in 6.0 the way AutoLoot works has changed and this Addon is no longer working as intended
It's a fairly basic Addon and I hope someone can look into how to make it work, sadly while the "click more than once causes autoloot to be disabled" bug has kinda been fixed, sometimes it will still not autoloot which makes it a bit harder to reproduce but it happens pretty often for me at the very least.
In LootFrame.lua of Blizzards Loot Frame AutoLoot now looks like this.
Lua Code:
...
if ( event == "LOOT_OPENED" ) then
local autoLoot = ...;
if( autoLoot == 1 ) then
LootFrame_InitAutoLootTable( self );
LootFrame:SetScript("OnUpdate", LootFrame_OnUpdate);
self.AutoLootDelay = LOOTFRAME_AUTOLOOT_DELAY;
else
self.AutoLootDelay = 0;
self.AutoLootTable = nil;
end
self.page = 1;
LootFrame_Show(self);
if ( not self:IsShown()) then
CloseLoot(autoLoot == 0); -- The parameter tells code that we were unable to open the UI
end
elseif( event == "LOOT_READY" ) then
LootFrame_InitAutoLootTable( self );
...
In AutoLootFix it's this:
Lua Code:
f:SetScript("OnEvent", function(self, event, ...)
if event == "PLAYER_ENTERING_WORLD" then
UpdateAutoLootStatus(GetCVar"autoLootDefault")
elseif event == "CVAR_UPDATE" then
local glStr, value = ...
if glStr == "AUTO_LOOT_DEFAULT_TEXT" then
UpdateAutoLootStatus(value)
end
elseif event == "LOOT_OPENED" then
if not IsAutoLootKeyDown() then
-- HideUIPanel(LootFrame)
end
local shouldAutoLoot = ...
if shouldAutoLoot == 0 and not IsAutoLootKeyDown() then
--print"autoLoot bugged" < This still triggers when autoloot fails
for i = 1, GetNumLootItems() do
LootSlot(i)
end
end
end
end)
The Addon still triggers fine but the following no longer applies and needs to be changed, sadly i have no damn clue how to make it work as simple as it may be.
Lua Code:
for i = 1, GetNumLootItems() do
LootSlot(i)
end
end
For now i replaced the whole addon with this, disabled AutoLoot and AutoLoot key in the Interface and instead use this autoloot, it works but i'd like something that's less hacky
Lua Code:
local f = CreateFrame"Frame"
f:RegisterEvent"LOOT_OPENED"
f:SetScript("OnEvent", function(self, event, ...)
if event == "LOOT_OPENED" and not IsAltKeyDown() then
for i = 1, GetNumLootItems() do
LootSlot(i)
end
end
end)