Sync AoE Loot cleanup with main
This commit is contained in:
+2
-3
@@ -72,9 +72,8 @@ module.enable = function(self)
|
||||
-- trigger once to avoid graphical glitches
|
||||
WorldMapFrame_Maximize()
|
||||
|
||||
-- Vendor Values already owns the fallback sell-price database in this fork.
|
||||
-- ClassicAPI is queried first there, so keep a single static database instead
|
||||
-- of allocating a second Turtle-specific copy during addon load.
|
||||
-- Vendor Values exposes a lazy ClassicAPI-backed SellValueDB compatibility
|
||||
-- table, so do not allocate a second Turtle-specific static price database.
|
||||
|
||||
-- add druids tree of life and fast travel form to autoshift
|
||||
if ShaguTweaks.dismount then
|
||||
|
||||
@@ -18,6 +18,29 @@ local function GetVendorPrice(id)
|
||||
end
|
||||
end
|
||||
|
||||
-- Keep the historical public SellValueDB contract for addons such as Aux,
|
||||
-- without restoring the large embedded vendor-price database. Missing entries
|
||||
-- are resolved lazily through ClassicAPI and cached only after they are known.
|
||||
local sellValueDB = ShaguTweaks.SellValueDB
|
||||
if type(sellValueDB) ~= "table" then
|
||||
sellValueDB = {}
|
||||
end
|
||||
|
||||
setmetatable(sellValueDB, {
|
||||
__index = function(tbl, itemID)
|
||||
local price = GetVendorPrice(itemID)
|
||||
|
||||
-- The old embedded DB omitted unsellable 0-price items, so keep nil for
|
||||
-- those entries instead of changing the historical SellValueDB contract.
|
||||
if price and price > 0 then
|
||||
rawset(tbl, itemID, price)
|
||||
return price
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
ShaguTweaks.SellValueDB = sellValueDB
|
||||
|
||||
local pendingPrices = {}
|
||||
|
||||
local function ClearPending(frame)
|
||||
|
||||
Reference in New Issue
Block a user