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 @@