Partially destroyed cache of reagent bank
ingmar42 opened this issue ยท 1 comments
After a login or zone change with loading screen sometimes the content of the cache of the reagent bank gets partially lost. The fix, you did lately, by unregistering the event does not fix this completly. The PLAYERREAGENTBANKSLOTS_CHANGED event are sometimes send after the loading screen. I have tested a little bit and have found a solution, that fixes the problem for me. Here is my fix:
--- C:/Games/World of Warcraft/_retail_/Interface/AddOns/Syndicator/Tracking/BagCache.lua.bak Tue Aug 6 22:44:25 2024
+++ C:/Games/World of Warcraft/_retail_/Interface/AddOns/Syndicator/Tracking/BagCache.lua Wed Aug 7 22:48:53 2024
@@ -340,14 +340,16 @@
-- Equivalent to ItemLocation:CreateFromBagAndSlot(bagID, slotID)
local location = {bagID = bagID, slotIndex = slotID}
local itemID = C_Item.DoesItemExist(location) and C_Item.GetItemID(location)
- bag[slotID] = {}
if itemID then
if C_Item.IsItemDataCachedByID(itemID) then
local slotInfo = C_Container.GetContainerItemInfo(bagID, slotID)
if slotInfo then
bag[slotID] = GetInfo(slotInfo)
+ elseif bagID ~= Enum.BagIndex.Reagentbank or not bag[slotID] then
+ bag[slotID] = {}
end
else
+ bag[slotID] = {}
waiting = waiting + 1
local item = Item:CreateFromItemID(itemID)
item:ContinueOnItemLoad(function()
@@ -361,6 +363,8 @@
end
end)
end
+ else
+ bag[slotID] = {}
end
end