diff --git a/tekAucQuery.lua b/tekAucQuery.lua index 28cb1c6..13e58ff 100644 --- a/tekAucQuery.lua +++ b/tekAucQuery.lua @@ -1,12 +1,16 @@ -local lib = LibStub:NewLibrary("tekAucQuery", 1) +local lib = LibStub:NewLibrary("tekAucQuery", 2) if not lib then return end setmetatable(lib, { __index = function(t,i) if not i then return end - return GetAuctionBuyout and GetAuctionBuyout(i) - or AucAdvanced and AucAdvanced.Modules.Util.Appraiser.GetPrice(i, nil, true) + if GetAuctionBuyout then return GetAuctionBuyout(i) end + if AucAdvanced and AucAdvanced.Modules and AucAdvanced.Modules.Util.Appraiser and AucAdvanced.Modules.Util.Appraiser.GetPrice then + local p = AucAdvanced.Modules.Util.Appraiser.GetPrice(i, nil, true) + t[i] = p + return p + end end, })