From 733b7cc32561b88d2fc7f2192a9d72e5779a3fbb Mon Sep 17 00:00:00 2001 From: Sandor Takacs Date: Tue, 6 Sep 2016 16:34:30 +0200 Subject: [PATCH] Remove MyBagsCache compatibility --- MyInventory/MyInventory.lua | 46 +------------------------------------ 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/MyInventory/MyInventory.lua b/MyInventory/MyInventory.lua index 71f68b5..b9068f0 100644 --- a/MyInventory/MyInventory.lua +++ b/MyInventory/MyInventory.lua @@ -544,9 +544,7 @@ function MyInventory:GetInfoFunc() if IsAddOnLoaded("DataStore_Containers") then return self.GetInfoDataStore end - if IsAddOnLoaded("MyBagsCache") then - return self.GetInfoMyBagsCache - end + return self.GetInfoNone end @@ -623,46 +621,4 @@ function MyInventory:GetSortedCharList(sorttype, realm) until swapped == 0 return result end - if IsAddOnLoaded("MyBagsCache") then - local MBC = MyBagsCache - local result = {} - local idx = 0 - local cache = MBC.db.global - for index, value in pairs(cache) do - local charName, realmID = self:SplitString(index) - if index ~= "profiles" then - if (not realm or realmID == realm) then - idx = idx + 1 - result[idx] = index - end - end - end - local swapped - local q, w - local x_time, y_time; - local max = idx - 1; - repeat - swapped = 0 - for i = 1, max do - q = result[i] - w = result[i+1] - if (not MBC.db.global[q].updateTime) then - x_time = 0 - else - x_time = MBC.db.global[q].updateTime - end - if (not MBC.db.global[w].updateTime) then - y_time = 0 - else - y_time = MBC.db.global[w].updateTime - end - if self:SortChars(q, w, x_time, y_time, sorttype) then - result[i] = w - result[i+1] = q - swapped = 1 - end - end - until swapped == 0 - return result - end end