From 6f3cbc7d6b2d64db058297425403b09eb6da31e4 Mon Sep 17 00:00:00 2001 From: Anch Date: Thu, 22 Sep 2022 17:10:07 +1200 Subject: [PATCH] fixed wishlist loading --- AtlasLoot/Core/AtlasLoot.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/AtlasLoot/Core/AtlasLoot.lua b/AtlasLoot/Core/AtlasLoot.lua index 4696acd..3e27b4b 100644 --- a/AtlasLoot/Core/AtlasLoot.lua +++ b/AtlasLoot/Core/AtlasLoot.lua @@ -457,9 +457,10 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum) difType = true; end - -- Saves current types ItemindexID - ATLASLOOT_TYPE[dataSource[dataID].Type] = ItemindexID; - + -- Saves current types ItemindexID + if dataSource[dataID].Type then + ATLASLOOT_TYPE[dataSource[dataID].Type] = ItemindexID; + end -- Set current type ATLASLOOT_CURRENTTYPE = dataSource[dataID].Type or "Default"; @@ -470,7 +471,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum) AtlasLoot_BossName:SetText(dataSource[dataID][tablenum].Name); -- Moves the difficulty scrollslider if the difficulty has changed - if difType and #AtlasLoot_Difficulty[dataSource[dataID].Type] > 5 then + if dataSource[dataID].Type and difType and #AtlasLoot_Difficulty[dataSource[dataID].Type] > 5 then local min, max = AtlasLootDefaultFrameScrollScrollBar:GetMinMaxValues(); AtlasLootDefaultFrameScrollScrollBar:SetValue(ItemindexID * (max / #AtlasLoot_Difficulty[dataSource[dataID].Type])); end