From 7c694ba7276cbc738e537d331e5d5f47b9c3f12e Mon Sep 17 00:00:00 2001 From: Sandor Takacs Date: Tue, 6 Sep 2016 16:30:52 +0200 Subject: [PATCH] Remove MyBagsCache compatibility --- MyBank/MyBank.lua | 50 +++-------------------------------------------- 1 file changed, 3 insertions(+), 47 deletions(-) diff --git a/MyBank/MyBank.lua b/MyBank/MyBank.lua index b147cc4..269281c 100644 --- a/MyBank/MyBank.lua +++ b/MyBank/MyBank.lua @@ -7,7 +7,7 @@ local MYBANK_DEFAULT_OPTIONS = { ["Count"] = "free", ["HlItems"] = true, ["Sort"] = "realm", - ["Search"] = true, + ["Search"] = true, ["HlBags"] = true, ["Freeze"] = "sticky", ["Lock"] = false, @@ -20,7 +20,7 @@ local MYBANK_DEFAULT_OPTIONS = { ["Cache"] = nil, ["Player"] = true, ["Scale"] = false, - ["Strata"] = "DIALOG", + ["Strata"] = "DIALOG", ["Anchor"] = "bottomleft", ["BackColor"] = {0.7,0,0,0}, ["SlotColor"] = nil, @@ -603,9 +603,7 @@ function MyBank:GetInfoFunc() if IsAddOnLoaded("DataStore_Containers") then return self.GetInfoDataStore end - if IsAddOnLoaded("MyBagsCache") then - return self.GetInfoMyBagsCache - end + return self.GetInfoNone end @@ -666,48 +664,6 @@ function MyBank:GetSortedCharList(sorttype, realm) until swapped == 0 return result end - if IsAddOnLoaded("MyBagsCache") then - local result = {} - local idx = 0 - local cache = MyBagsCache.db.global - local index, value - 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 i - repeat - swapped = 0 - for i = 1, idx-1 do - q = result[i] - w = result[i+1] - if (not cache[q].updateTime) then - x_time = 0 - else - x_time = cache[q].updateTime - end - if (not cache[w].updateTime) then - y_time = 0 - else - y_time = cache[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 function MyBank:SetReplace()