diff --git a/.gitignore b/.gitignore index 44356e3..c6156ca 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ .install .lua/* .vscode -.idea \ No newline at end of file +.idea + +.vscode/settings.json diff --git a/AtlasLoot/AtlasLoot.toc b/AtlasLoot/AtlasLoot.toc index 49ad473..22fafd6 100644 --- a/AtlasLoot/AtlasLoot.toc +++ b/AtlasLoot/AtlasLoot.toc @@ -1,10 +1,10 @@ -## Interface: 30300 +## Interface: 30300 ## Title: AtlasLoot Ascension Edition ## Notes: Shows the possible loot from the bosses -## Author: v7 Rebuid Done by: Anch/Rvng (Original: Hegarol, Ascension: Skray/Szyler/Anch/Rvng) -## Version: v7.1.0 +## Author: v7 Rebuid Done by: Anch, Rvng +## Version: v7.2.4 ## X-eMail: -## X-Credits: Daviesh, Lag, Cellelach, Asurn, Pernicus and many others. +## X-Credits: Skray, Szyler and others. ## X-Category: Map ## X-License: GPL v2 ## X-Website: https://discord.gg/uYCE2X2FgA @@ -24,8 +24,8 @@ ## RealTitle-zhCN: [地图]副本掉落物品查询 ## RealTitle-zhTW: [地圖]AL 物品掉落[主程式] ## Notes-ruRU: Отображает весю возможную добычу с боссов -## SavedVariables: AtlasLootOptions, AtlasLootDB, AtlasLootWishList -## SavedVariablesPerCharacter: AtlasLootCharDB, AtlasLootFilterDB +## SavedVariables: AtlasLootOptions, AtlasLootDB, AtlasLootWishList, AtlasLootFilterDB +## SavedVariablesPerCharacter: AtlasLootCharDB ## OptionalDeps: LootLink, ItemSync, DewdropLib, FuBarPlugin-3.0, FuBar, Ace3, LibBabble-Boss-3.0, LibBabble-Faction-3.0, LibBabble-Inventory-3.0, LibBabble-Zone-3.0 embeds.xml diff --git a/AtlasLoot/Core/AtlasDifficulty.lua b/AtlasLoot/Core/AtlasDifficulty.lua index 498b0de..7377ed1 100644 --- a/AtlasLoot/Core/AtlasDifficulty.lua +++ b/AtlasLoot/Core/AtlasDifficulty.lua @@ -31,8 +31,9 @@ AtlasLoot_Difficulty = { }; ["ClassicRaid"] = { - {"Normal Flex", 2}, - {"Heroic Flex", 3}, + {"Normal", 2}, + {"Heroic", 3}, + {"Mythic", 5}, {"Ascended", 4}, {"Bloodforged", 1}, }; @@ -52,8 +53,9 @@ AtlasLoot_Difficulty = { }; ["BCRaid"] = { - {"Normal Flex", 2}, - {"Heroic Flex", 3}, + {"Normal", 2}, + {"Heroic", 3}, + {"Mythic", 5}, {"Ascended", 4}, {"Bloodforged", 1}, }; @@ -69,9 +71,10 @@ AtlasLoot_Difficulty = { }; ["WrathRaid"] = { - {"Normal Flex", 2}, - {"Heroic Flex", 3}, - {"Ascended", 4}, + {"Normal", 2}, + {"Heroic", 3}, + {"Mythic", 4}, + {"Ascended", 5}, {"Bloodforged", 1}, }; @@ -80,6 +83,10 @@ AtlasLoot_Difficulty = { {"Item Normal", 2 }, {"Bloodforged", 1 }, }; + ["CraftingNoBF"] = { + {"Crafting Patterns", "Pattern" }, + {"Item Normal", 2 }, + }; ["Search"] = { {"Bloodforged", 1}, @@ -122,7 +129,7 @@ function AtlasLoot_Difficulty:getMaxDifficulty(difficultyKey) elseif (difficultyKey == "ClassicDungeonExt" or difficultyKey == "BCDungeon" or difficultyKey == "WrathDungeon") then return 44; elseif (difficultyKey == "ClassicRaid" or difficultyKey == "BCRaid" or difficultyKey == "WrathRaid") then - return 4; + return 5; else return 0; end diff --git a/AtlasLoot/Core/AtlasLoot.lua b/AtlasLoot/Core/AtlasLoot.lua index a8d136e..6a60151 100644 --- a/AtlasLoot/Core/AtlasLoot.lua +++ b/AtlasLoot/Core/AtlasLoot.lua @@ -14,7 +14,6 @@ AtlasLoot_OnLoad() AtlasLoot:ShowItemsFrame() AtlasLoot:NavButton_OnClick() AtlasLoot:IsLootTableAvailable(dataID) -AtlasLoot:GetLODModule(dataSource) AtlasLoot:LoadAllModules() AtlasLoot:ShowQuickLooks(button) AtlasLoot:RefreshQuickLookButtons() @@ -52,6 +51,7 @@ ATLASLOOT_DEBUGSHOWN = false; ATLASLOOT_FILTER_ENABLE = false; ATLASLOOT_CURRENTTYPE = "Default"; ATLASLOOT_TYPE = {}; +ATLASLOOT_BACKENABLED = false; -- Colours stored for code readability local GREY = "|cff999999"; @@ -132,7 +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"] = {{Name = "Default" }}} 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..."]; @@ -220,7 +223,6 @@ function AtlasLoot:OnEnable() panel.name=AL["AtlasLoot"]; InterfaceOptions_AddCategory(panel); --Filter and wishlist options menus creates as part of the next 2 commands - AtlasLoot_CreateFilterOptions(); AtlasLoot_CreateWishlistOptions(); panel = _G["AtlasLootHelpFrame"]; panel.name=AL["Help"]; @@ -231,11 +233,13 @@ function AtlasLoot:OnEnable() end AtlasLoot_UpdateLootBrowserScale(); local playerName = UnitName("player"); + -- Is wishlist item disabled on load or not if AtlasLootWishList["Options"][playerName]["AutoSortWishlist"] then AtlasLootItemsFrame_Wishlist_UnLock:Disable(); else AtlasLootItemsFrame_Wishlist_UnLock:Enable(); end + AtlasLoot:LoadItemIDsDatabase(); end function AtlasLoot_Reset(data) @@ -328,11 +332,9 @@ function AtlasLoot:OnInitialize() end --Sets the default loot tables for the current expansion enabled on the server. - local function getExpac() - local xpaclist = {"CLASSIC", "TBC", "WRATH"}; - AtlasLoot_Expac = xpaclist[GetAccountExpansionLevel()+1]; - end - getExpac(); + local xpaclist = {"CLASSIC", "TBC", "WRATH"}; + AtlasLoot_Expac = xpaclist[GetAccountExpansionLevel()+1]; + end function AtlasLoot:CleandataID(newID, listnum) @@ -371,30 +373,33 @@ function AtlasLoot:CreateToken(dataID) [1] = { Name = itemName }; }; end + local count = #AtlasLoot_Data[dataID][1] * #AtlasLoot_Data[dataID]; + local function addItem(itemID, v, t) + if itemType == select(9, GetItemInfo(itemID)) or itemType2 == select(9, GetItemInfo(itemID)) then + table.insert(AtlasLoot_TokenData[orgID][1], {#AtlasLoot_TokenData[orgID][1] + 1, v[2], v[3], v[4], t.Name}); + end + if count == 1 then + AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]); + end + count = count - 1; + end --Fills table with items for n, t in ipairs(AtlasLoot_Data[dataID]) do for c, v in ipairs(t) do if type(v) == "table" then - local item = Item:CreateFromID(v[2]); - item:ContinueOnLoad(function(itemID) - if itemType == select(9, GetItemInfo(itemID)) or itemType2 == select(9, GetItemInfo(itemID)) then - table.insert(AtlasLoot_TokenData[orgID][1], {#AtlasLoot_TokenData[orgID][1] + 1, v[2], v[3], v[4], t.Name}); - end - if #t == n then - AtlasLoot:CancelTimer(AtlasLoot.refreshTimer); - AtlasLoot.refreshTimer = AtlasLoot:ScheduleTimer("Refresh", 2); - end - end) + if GetItemInfo(v[2]) then + addItem(v[2], v, t) + else + local item = Item:CreateFromID(v[2]); + item:ContinueOnLoad(function(itemID) + addItem(itemID, v, t) + end) + end end end end end --- Refresh loottable after token table creation. -function AtlasLoot:Refresh() - AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]); -end - --[[ AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum): dataID - Name of the loot table @@ -424,6 +429,8 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) --Ditch the Quicklook selector AtlasLootQuickLooksButton:Hide(); + AtlasLoot:HideFilterCreateButtons(); + --Hide Map and reshow lootbackground AtlasLootDefaultFrame_Map:Hide(); AtlasLootDefaultFrame_LootBackground:Show(); @@ -465,9 +472,9 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) local difType = false; -- Checks to see if type is the same if ATLASLOOT_CURRENTTYPE ~= dataSource[dataID].Type then - if dataSource[dataID].Type == "Crafting" then + if dataSource[dataID].Type == "Crafting" or dataSource[dataID].Type == "CraftingNoBF" then ItemindexID = "Pattern"; - elseif ItemindexID == "Pattern" and dataSource[dataID].Type ~= "Crafting" then + elseif (ItemindexID == "Pattern" and dataSource[dataID].Type ~= "Crafting") or (ItemindexID == "Pattern" and dataSource[dataID].Type ~= "CraftingNoBF") then ItemindexID = 2; else ItemindexID = ATLASLOOT_TYPE[dataSource[dataID].Type] or 2; @@ -556,11 +563,11 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) toShow = false; end end - IDfound = AtlasLoot:FindId(item[2], min(AtlasLoot_Difficulty:getMaxDifficulty(dataSource[dataID].Type), itemDif)) or item[2]; + IDfound = AtlasLoot:FindId(item[2], min(AtlasLoot_Difficulty:getMaxDifficulty(dataSource[dataID].Type), itemDif),dataSource[dataID].Type) or item[2]; end if string.sub(IDfound, 1, 1) == "s" then - IDfound = AtlasLoot:FindId(item[2], itemDif) or item[2]; + IDfound = AtlasLoot:FindId(item[2], itemDif, dataSource[dataID].Type) or item[2]; else isItem = true; end @@ -574,10 +581,10 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) if tonumber(item[AtlasLoot_Difficulty.MAX_DIF]) < itemDif then itemDif = item[AtlasLoot_Difficulty.MAX_DIF] end; end --If something was found in itemID database show that if not show default table item - IDfound = AtlasLoot:FindId(item[2], itemDif) or item[2]; + IDfound = AtlasLoot:FindId(item[2], itemDif, dataSource[dataID].Type) or item[2]; if ItemindexID ~= "" and dataID == "SearchResult" then - IDfound = AtlasLoot:FindId(item[9], itemDif) or item[2]; + IDfound = AtlasLoot:FindId(item[9], itemDif, dataSource[dataID].Type) or item[2]; end end end @@ -688,7 +695,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) extraFrame:Show(); --For convenience, we store information about the objects in the objects so that it can be easily accessed later if((string.sub(IDfound, 1, 1) == "s") and (ItemindexID ~= "Pattern") and (tonumber(dataSource[dataID][tablenum][i][3]))) then - IDfound = AtlasLoot:FindId(tonumber(dataSource[dataID][tablenum][i][3]), ItemindexID) or tonumber(dataSource[dataID][tablenum][i][3]); + IDfound = AtlasLoot:FindId(tonumber(dataSource[dataID][tablenum][i][3]), ItemindexID, dataSource[dataID].Type) or tonumber(dataSource[dataID][tablenum][i][3]); itemButton.itemID = IDfound; itemButton.spellitemID = dataSource[dataID][tablenum][i][3]; else @@ -723,8 +730,10 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) if (dataID == "SearchResult" or dataSource_backup == "AtlasLoot_CurrentWishList") and dataSource[dataID][tablenum][i][8] then itemButton.sourcePage = dataSource[dataID][tablenum][i][8]; - elseif dataSource[dataID][tablenum][i][8] ~= nil and dataSource[dataID][tablenum][i][8]:match("=LT=") then + elseif dataSource[dataID][tablenum][i][8] ~= nil and dataSource[dataID][tablenum][i][8]:match("=TT=") then itemButton.sourcePage = string.sub(dataSource[dataID][tablenum][i][8], 5); + elseif dataSource[dataID][tablenum][i][8] ~= nil and dataSource[dataID][tablenum][i][8]:match("=LT=") then + itemButton.sourcePage = dataSource[dataID][tablenum][i][8]; else itemButton.sourcePage = nil; end @@ -753,7 +762,8 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) end if dataSource_backup ~= "AtlasLoot_CurrentWishList" and dataID ~= "FilterList" and dataSource[dataID].Back ~= true and dataID ~= "EmptyTable" then - AtlasLoot.db.profile.LastBoss = {dataID, dataSource_backup, tablenum, ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE}; + if not AtlasLoot.db.profile.LastBoss or type(AtlasLoot.db.profile.LastBoss) ~= "table" then AtlasLoot.db.profile.LastBoss = {} end; + AtlasLoot.db.profile.LastBoss[AtlasLoot_Expac] = {dataID, dataSource_backup, tablenum, ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE}; AtlasLoot.db.profile[ATLASLOOT_CURRENTTABLE] = {dataID, dataSource_backup, tablenum, ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE}; end @@ -764,16 +774,18 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) local function filterCheck(find) local mtype = {"Crafting", "Reputations", "WorldEvents", "PVP", "Collections"} for m, t in pairs (mtype) do - for i, v in ipairs (AtlasLoot_SubMenus[t..AtlasLoot_Expac]) do - if find == v[2] then - return true; + if AtlasLoot_SubMenus[t..AtlasLoot_Expac] then + for i, v in ipairs (AtlasLoot_SubMenus[t..AtlasLoot_Expac]) do + if find == v[2] then + return true; + end end end end end -- Show the Filter Check-Box - if dataID ~= "SearchResult" and filterCheck(dataID) ~= true and dataSource_backup ~= "AtlasLoot_TokenData" and dataSource_backup ~= "AtlasLoot_CurrentWishList" then + if filterCheck(dataID) ~= true then AtlasLootFilterCheck:Show(); end @@ -805,7 +817,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) tablenum = AtlasLootItemsFrame.refreshOri[3]; end - if AtlasLootItemsFrame.refreshOri and tablenum ~= #_G[AtlasLootItemsFrame.refreshOri[2]][AtlasLootItemsFrame.refreshOri[1]] and dataSource_backup ~= "AtlasLoot_TokenData" then + if AtlasLootItemsFrame.refresh and AtlasLootItemsFrame.refreshOri and tablenum ~= #_G[AtlasLootItemsFrame.refreshOri[2]][AtlasLootItemsFrame.refreshOri[1]] and dataSource_backup ~= "AtlasLoot_TokenData" and dataID ~= "SearchResult" or tablenum ~= #_G[AtlasLootItemsFrame.refresh[2]][AtlasLootItemsFrame.refresh[1]] and dataID == "SearchResult" then _G["AtlasLootItemsFrame_NEXT"]:Show(); _G["AtlasLootItemsFrame_NEXT"].tablenum = tablenum + 1; _G["AtlasLootItemsFrame_NEXT"].tablebase = tablebase; @@ -816,15 +828,17 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) _G["AtlasLootItemsFrame_PREV"].tablenum = tablenum - 1; _G["AtlasLootItemsFrame_PREV"].tablebase = tablebase; end - if dataSource[dataID].Back then - _G["AtlasLootItemsFrame_BACK"]:Show(); - end + if dataSource[dataID].Back or ATLASLOOT_BACKENABLED then + _G["AtlasLootItemsFrame_BACK"]:Show(); + elseif dataID ~= "FilterList" then + AtlasLootItemsFrame.refreshBack = {dataID, dataSource_backup, tablenum}; + end end --Anchor the item frame where it is supposed to be if ATLASLOOT_FILTER_ENABLE and dataID ~= "FilterList" then - AtlasLoot:HideNoUsableItems(); + AtlasLoot:HideFilteredItems(); end if dataID ~= "SearchResult" then @@ -850,7 +864,8 @@ AtlasLoot:NavButton_OnClick: Called when 'Back'Button is pressed and calls up the appropriate loot page ]] function AtlasLoot:BackButton_OnClick() - AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3]); + ATLASLOOT_BACKENABLED = false; + AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refreshBack[1], AtlasLootItemsFrame.refreshBack[2], AtlasLootItemsFrame.refreshBack[3]); end --[[ @@ -860,7 +875,7 @@ dataID: Loot table dataID ]] function AtlasLoot:IsLootTableAvailable(dataSource) local moduleName = nil; - moduleName = AtlasLoot:GetLODModule(dataSource); + moduleName = AtlasLoot.ModuleName[dataSource]; if IsAddOnLoaded(moduleName) then return true; else @@ -868,36 +883,28 @@ function AtlasLoot:IsLootTableAvailable(dataSource) end end ---[[ -AtlasLoot:GetLODModule(dataSource) -Returns the name of the module that needs to be loaded -dataSource: Location of the loot table -]] -function AtlasLoot:GetLODModule(dataSource) - if (dataSource=="AtlasLootOriginalWoW") then - return "AtlasLoot_OriginalWoW"; - elseif (dataSource=="AtlasLootBurningCrusade") then - return "AtlasLoot_BurningCrusade"; - elseif (dataSource=="AtlasLootCrafting") then - return "AtlasLoot_Crafting"; - elseif (dataSource=="AtlasLootWorldEvents") then - return "AtlasLoot_WorldEvents"; - elseif (dataSource=="AtlasLootWotLK") then - return "AtlasLoot_WrathoftheLichKing"; - end -end +-- List of Moduel Names +AtlasLoot.ModuleName = { + ["AtlasLootOriginalWoW"] = "AtlasLoot_OriginalWoW"; + ["AtlasLootBurningCrusade"] = "AtlasLoot_BurningCrusade"; + ["AtlasLootCrafting"] = "AtlasLoot_Crafting"; + ["AtlasLootWorldEvents"] = "AtlasLoot_WorldEvents"; + ["AtlasLootWotLK"] = "AtlasLoot_WrathoftheLichKing"; + ["AtlasLootVanity"] = "AtlasLoot_Vanity" +} --[[ AtlasLoot:LoadAllModules() Used to load all available LoD modules ]] function AtlasLoot:LoadAllModules() - local orig, bc, wotlk, craft, world; + local orig, bc, wotlk, craft, world, vanity; orig, _ = LoadAddOn("AtlasLoot_OriginalWoW"); bc, _ = LoadAddOn("AtlasLoot_BurningCrusade"); craft, _ = LoadAddOn("AtlasLoot_Crafting"); world, _ = LoadAddOn("AtlasLoot_WorldEvents"); wotlk, _ = LoadAddOn("AtlasLoot_WrathoftheLichKing"); + vanity, _ = LoadAddOn("AtlasLoot_Vanity"); local flag=0; if not orig then LoadAddOn("AtlasLoot_OriginalWoW"); @@ -919,6 +926,10 @@ function AtlasLoot:LoadAllModules() LoadAddOn("AtlasLoot_WrathoftheLichKing"); flag=1; end + if not vanity then + LoadAddOn("AtlasLoot_Vanity"); + flag=1; + end if flag == 1 then if ATLASLOOT_DEBUGMESSAGES then DEFAULT_CHAT_FRAME:AddMessage(GREEN..AL["AtlasLoot"]..": "..WHITE..AL["All Available Modules Loaded"]); @@ -1055,35 +1066,6 @@ function AtlasLoot:QueryLootPage() queryNextItem(START); end ---[[ -AtlasLoot:QueryLootPage() -Querys all valid items on the current loot page. -]] -function AtlasLoot:QueryLootPageOLD() -local lastitem - for t = 1, 30, 1 do - local xbutton = _G["AtlasLootItem_"..t]; - local xqueryitem = xbutton.itemID; - if (xqueryitem) and (xqueryitem ~= nil) and (xqueryitem ~= "") and (xqueryitem ~= 0) and (string.sub(xqueryitem, 1, 1) ~= "s") then - lastitem = t; - end - end - for i = 1, 30, 1 do - local button = _G["AtlasLootItem_"..i]; - local queryitem = button.itemID; - if (queryitem) and (queryitem ~= nil) and (queryitem ~= "") and (queryitem ~= 0) and (string.sub(queryitem, 1, 1) ~= "s") then - local item = Item:CreateFromID(queryitem); - if not (item:GetInfo()) then - item:ContinueOnLoad(function(itemId) - if i == lastitem then - AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]); - end - end) - end - end - end -end - --[[ AtlasLoot:AddTooltip(frameb, tooltiptext) Adds explanatory tooltips to UI objects. @@ -1104,9 +1086,34 @@ AtlasLoot:FindId(id, difficulty) Finds the Ids of other difficulties based on the normal id of the item and the difficulty parameter given. On the form of {ID, {normal, heroic, mythic, mythic1, mythic2, ... ,mythicN}} ]] -function AtlasLoot:FindId(id, difficulty) - if ItemIDsDatabase[id] ~= nil then +function AtlasLoot:FindId(id, difficulty, type) + if not ItemIDsDatabase[id] then return nil, false end + + if difficulty == 5 and (type == "BCRaid" or type == "ClassicRaid") then + return ItemIDsDatabase[id]["MythicRaid"], true + else 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") + content:SetParser(function(index, data) + -- run for each item in the data + if index ~= 0 and data.Normal ~= 0 and not ItemIDsDatabase[data.Normal] then + ItemIDsDatabase[data.Normal] = {} + ItemIDsDatabase[data.Normal]["MythicRaid"] = tonumber("13"..data.Normal); + table.insert(ItemIDsDatabase[data.Normal],data.Bloodforged); + table.insert(ItemIDsDatabase[data.Normal],data.Normal); + if data.Heroic ~= 0 then table.insert(ItemIDsDatabase[data.Normal],data.Heroic) end + for _,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() + end diff --git a/AtlasLoot/Core/AtlasLoot.xml b/AtlasLoot/Core/AtlasLoot.xml index a6a7ffe..262f1b1 100644 --- a/AtlasLoot/Core/AtlasLoot.xml +++ b/AtlasLoot/Core/AtlasLoot.xml @@ -2,13 +2,14 @@