From 81ec39fe56d99f8cdb11e7852618a2f33fb158f2 Mon Sep 17 00:00:00 2001 From: Anch Date: Wed, 26 Oct 2022 00:40:59 +1300 Subject: [PATCH] finished filter list -Finshed filter list -Added new item ids database system --- AtlasLoot/Core/AtlasDifficulty.lua | 9 +- AtlasLoot/Core/AtlasLoot.lua | 28 +- AtlasLoot/Core/AtlasLoot.xml | 7 +- AtlasLoot/Core/Filter.lua | 75 +- AtlasLoot/Core/ItemIDsDatabase.lua | 5712 ---------------------- AtlasLoot/Core/ItemIDsDatabase2.lua | 5800 ----------------------- AtlasLoot/Core/ItemIDsDatabase3.lua | 583 --- AtlasLoot/Core/ItemIDsDatabaseFixes.lua | 12 +- AtlasLoot/Core/WishList.lua | 6 +- AtlasLoot/Locales/constants.en.lua | 3 +- AtlasLoot_Crafting/craftingTBC.lua | 392 +- 11 files changed, 296 insertions(+), 12331 deletions(-) delete mode 100644 AtlasLoot/Core/ItemIDsDatabase.lua delete mode 100644 AtlasLoot/Core/ItemIDsDatabase2.lua delete mode 100644 AtlasLoot/Core/ItemIDsDatabase3.lua diff --git a/AtlasLoot/Core/AtlasDifficulty.lua b/AtlasLoot/Core/AtlasDifficulty.lua index 7268a24..9e700e3 100644 --- a/AtlasLoot/Core/AtlasDifficulty.lua +++ b/AtlasLoot/Core/AtlasDifficulty.lua @@ -33,7 +33,8 @@ AtlasLoot_Difficulty = { ["ClassicRaid"] = { {"Normal Flex", 2}, {"Heroic Flex", 3}, - {"Ascended", 4}, + {"Mythic", 4}, + {"Ascended", 5}, {"Bloodforged", 1}, }; @@ -54,7 +55,8 @@ AtlasLoot_Difficulty = { ["BCRaid"] = { {"Normal Flex", 2}, {"Heroic Flex", 3}, - {"Ascended", 4}, + {"Mythic", 4}, + {"Ascended", 5}, {"Bloodforged", 1}, }; @@ -71,7 +73,8 @@ AtlasLoot_Difficulty = { ["WrathRaid"] = { {"Normal Flex", 2}, {"Heroic Flex", 3}, - {"Ascended", 4}, + {"Mythic", 4}, + {"Ascended", 5}, {"Bloodforged", 1}, }; diff --git a/AtlasLoot/Core/AtlasLoot.lua b/AtlasLoot/Core/AtlasLoot.lua index e24100d..ff71021 100644 --- a/AtlasLoot/Core/AtlasLoot.lua +++ b/AtlasLoot/Core/AtlasLoot.lua @@ -132,9 +132,10 @@ function AtlasLoot:OnEnable() AtlasLoot.db:RegisterDefaults(AtlasLootDBDefaults); if not AtlasLootCharDB then AtlasLootCharDB = {} end if not AtlasLootCharDB["QuickLooks"] then AtlasLootCharDB["QuickLooks"] = {} end + if not AtlasLootCharDB.SelectedFilter then AtlasLootCharDB.SelectedFilter = 1 end if not AtlasLootCharDB["SearchResult"] then AtlasLootCharDB["SearchResult"] = {Name = "Search Result" , Type = "Search", Back = true}; end if not AtlasLootFilterDB then AtlasLootFilterDB = {["FilterLists"] = {}} end; - if AtlasLootFilterDB and not AtlasLootFilterDB["FilterLists"] then AtlasLootFilterDB = {["FilterLists"] = {}} end; + if AtlasLootFilterDB and not AtlasLootFilterDB["FilterLists"] then AtlasLootFilterDB = {["FilterLists"] = {{Name = "Default" }}} end; if AtlasLoot_Data then AtlasLoot_Data["EmptyTable"] = { Name = AL["Select a Loot Table..."]; @@ -1082,4 +1083,27 @@ function AtlasLoot:FindId(id, difficulty) return ItemIDsDatabase[id][difficulty], true end return nil, false; -end \ No newline at end of file +end +-- Loads the Item Variations into a table from the data content folder +function AtlasLoot:LoadItemIDsDatabase() + local content = C_ContentLoader:Load("ItemVariationData") + ItemIDsDatabase = {}; + content:SetParser(function(index, data) + -- run for each item in the data + if index ~= 0 and data.Normal ~= 0 then + ItemIDsDatabase[data.Normal] = {} + if data.Bloodforged ~= 0 then table.insert(ItemIDsDatabase[data.Normal],data.Bloodforged) end + if data.Normal ~= 0 then table.insert(ItemIDsDatabase[data.Normal],data.Normal) end + if data.Heroic ~= 0 then table.insert(ItemIDsDatabase[data.Normal],data.Heroic) end + for i,v in ipairs(data["Mythic"]) do + if v ~= 0 then + table.insert(ItemIDsDatabase[data.Normal],v) + end + end + end + end) + + -- This will run over time (usually about 30s for a file this size), but will maintain playable fps while running. + content:ParseAsync() + AtlasLoot:ItemIdFixs() + end \ No newline at end of file diff --git a/AtlasLoot/Core/AtlasLoot.xml b/AtlasLoot/Core/AtlasLoot.xml index af63bca..3e67a8e 100644 --- a/AtlasLoot/Core/AtlasLoot.xml +++ b/AtlasLoot/Core/AtlasLoot.xml @@ -2,13 +2,14 @@