From 0353ba71ae0894ae8e392c078dda178c77e140a6 Mon Sep 17 00:00:00 2001 From: telkar-rg Date: Fri, 3 Nov 2023 12:59:33 +0100 Subject: [PATCH] Change for function ns:GetSource(searchedID): Manual Loot Table is now preferred source --- Altoholic-Addon/Altoholic/Loots.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Altoholic-Addon/Altoholic/Loots.lua b/Altoholic-Addon/Altoholic/Loots.lua index 8c649ef..54543dd 100644 --- a/Altoholic-Addon/Altoholic/Loots.lua +++ b/Altoholic-Addon/Altoholic/Loots.lua @@ -942,14 +942,6 @@ function ns:GetSource(searchedID) DataStore_Crafts, DataStore_Inventory, } - - local domain, subDomain - for _, provider in pairs(DataProviders) do - domain, subDomain = provider:GetSource(searchedID) - if domain and subDomain then - return domain, subDomain - end - end -- extremely fast: takes from 0.3 to 3 ms max, depends on the location of the item in the table (obviously longer if the item is at the end) for Instance, BossList in pairs(lootTable) do @@ -961,6 +953,15 @@ function ns:GetSource(searchedID) end end end + + local domain, subDomain + for _, provider in pairs(DataProviders) do + domain, subDomain = provider:GetSource(searchedID) + if domain and subDomain then + return domain, subDomain + end + end + return nil end