From f42d4c2a348e891a6024b7513c48c05ce6afc746 Mon Sep 17 00:00:00 2001 From: Sandor Takacs Date: Tue, 6 Sep 2016 16:33:09 +0200 Subject: [PATCH] Remove MyBagsCache compatibility --- MyEquipment/MyEquipment.lua | 54 +++---------------------------------- 1 file changed, 4 insertions(+), 50 deletions(-) diff --git a/MyEquipment/MyEquipment.lua b/MyEquipment/MyEquipment.lua index 92817b4..1bbc41d 100644 --- a/MyEquipment/MyEquipment.lua +++ b/MyEquipment/MyEquipment.lua @@ -384,10 +384,8 @@ end function MyEquipment:GetRelic(charID) if self.isLive then return UnitHasRelicSlot("player") - elseif IsAddOnLoaded("MyBagsCache") then - return MyBagsCache:GetRelic(charID) - end - return nil + else + return nil end function MyEquipment:GetInfoFunc() @@ -397,10 +395,8 @@ function MyEquipment:GetInfoFunc() elseif IsAddOnLoaded("DataStore_Inventory") then return self.GetInfoDataStore ]] - elseif IsAddOnLoaded("MyBagsCache") then - return self.GetInfoMyBagsCache - end - return self.GetInfoNone + else + return self.GetInfoNone end function MyEquipment:GetEquipInfoLive(itemIndex) @@ -642,46 +638,4 @@ function MyEquipment:GetSortedCharList(sorttype, realm) 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