From 9b1fdd4cb1b2d5a2dc3307940c40097788681691 Mon Sep 17 00:00:00 2001 From: Anch Date: Sat, 29 Oct 2022 04:18:27 +1300 Subject: [PATCH] mythic diff -this will most likely get changed when the table gets updated --- AtlasLoot/Core/AtlasDifficulty.lua | 8 +-- AtlasLoot/Core/AtlasLoot.lua | 20 +++--- AtlasLoot/Core/Filter.lua | 13 ++-- AtlasLoot/Core/ItemIDsDatabaseFixes.lua | 79 ++------------------- AtlasLoot/Core/Search.lua | 2 +- AtlasLoot_BurningCrusade/burningcrusade.lua | 1 + 6 files changed, 29 insertions(+), 94 deletions(-) diff --git a/AtlasLoot/Core/AtlasDifficulty.lua b/AtlasLoot/Core/AtlasDifficulty.lua index 9e700e3..0ab6711 100644 --- a/AtlasLoot/Core/AtlasDifficulty.lua +++ b/AtlasLoot/Core/AtlasDifficulty.lua @@ -33,8 +33,8 @@ AtlasLoot_Difficulty = { ["ClassicRaid"] = { {"Normal Flex", 2}, {"Heroic Flex", 3}, - {"Mythic", 4}, - {"Ascended", 5}, + {"Mythic", 5}, + {"Ascended", 4}, {"Bloodforged", 1}, }; @@ -55,8 +55,8 @@ AtlasLoot_Difficulty = { ["BCRaid"] = { {"Normal Flex", 2}, {"Heroic Flex", 3}, - {"Mythic", 4}, - {"Ascended", 5}, + {"Mythic", 5}, + {"Ascended", 4}, {"Bloodforged", 1}, }; diff --git a/AtlasLoot/Core/AtlasLoot.lua b/AtlasLoot/Core/AtlasLoot.lua index 8057b7f..18b1427 100644 --- a/AtlasLoot/Core/AtlasLoot.lua +++ b/AtlasLoot/Core/AtlasLoot.lua @@ -558,11 +558,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 @@ -576,10 +576,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 @@ -690,7 +690,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 @@ -1078,11 +1078,14 @@ 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 type == "BCRaid" and difficulty == 5 then + return ItemIDsDatabase[id]["MythicRaid"], true + else return ItemIDsDatabase[id][difficulty], true end - return nil, false; end -- Loads the Item Variations into a table from the data content folder function AtlasLoot:LoadItemIDsDatabase() @@ -1092,6 +1095,7 @@ function AtlasLoot:LoadItemIDsDatabase() -- run for each item in the data if index ~= 0 and data.Normal ~= 0 then ItemIDsDatabase[data.Normal] = {} + ItemIDsDatabase[data.Normal]["MythicRaid"] = data.Normal + 1300000 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 diff --git a/AtlasLoot/Core/Filter.lua b/AtlasLoot/Core/Filter.lua index 73c0a63..a3663b4 100644 --- a/AtlasLoot/Core/Filter.lua +++ b/AtlasLoot/Core/Filter.lua @@ -22,7 +22,7 @@ AtlasLoot_SetFiltersMenu = AceLibrary("Dewdrop-2.0"); local FilterTable = { { Name = AL["Primary Stats"], - Type = "Stat", + Type = "PrimaryStat", {"Strength", "ITEM_MOD_STRENGTH_SHORT"}, {"Agility", "ITEM_MOD_AGILITY_SHORT"}, {"Intellect", "ITEM_MOD_INTELLECT_SHORT"}, @@ -93,12 +93,12 @@ function AtlasLoot:HideFilteredItems() local dataID, dataSource, tablenum = AtlasLootItemsFrame.refreshFilter[1], _G[AtlasLootItemsFrame.refreshFilter[2]], AtlasLootItemsFrame.refreshFilter[3]; local tablebase = dataSource[dataID][tablenum] if not tablebase or dataID == "WishList" or dataID == "SearchResult" then return end - + AtlasLootFilter["FilterList"] = {}; AtlasLootFilter["FilterList"].Type = dataSource[dataID].Type; AtlasLootFilter["FilterList"].Name = dataSource[dataID].Name; AtlasLootFilter["FilterList"].Back = dataSource[dataID].Back; AtlasLootFilter["FilterList"].Map = dataSource[dataID].Map; - AtlasLootFilter["FilterList"][tablenum] = {Name = dataSource[dataID][tablenum].Name}; + AtlasLootFilter["FilterList"][1] = {Name = dataSource[dataID][tablenum].Name}; local function getStats(itemID,sType) for i,v in pairs(AtlasLootFilterDB["FilterLists"][AtlasLootCharDB.SelectedFilter]) do @@ -139,7 +139,7 @@ function AtlasLoot:HideFilteredItems() if v[1] == 16 then count = 0; end - table.insert(AtlasLootFilter["FilterList"][tablenum],{v[1] - count,v[2],v[3],v[4],v[5],v[6],v[7],v[8]}); + table.insert(AtlasLootFilter["FilterList"][1],{v[1] - count,v[2],v[3],v[4],v[5],v[6],v[7],v[8]}); elseif v[1] == 16 then count = 1 else @@ -147,7 +147,7 @@ function AtlasLoot:HideFilteredItems() end end - AtlasLoot:ShowItemsFrame("FilterList", "AtlasLootFilter", AtlasLootItemsFrame.refresh[3]) + AtlasLoot:ShowItemsFrame("FilterList", "AtlasLootFilter", 1) end function AtlasLoot_FilterEnableButton(self, btnclick) @@ -248,6 +248,7 @@ function AtlasLoot:HideFilterCreateButtons() end AtlasLootFilterSelect:Hide(); AtlasLootFilterCreate:Hide(); + AtlasLootFilterDelete:Hide(); end -- ********************************************************************** @@ -288,7 +289,7 @@ function AtlasLoot:OpenFilterCreate() end local filterSelectButton = CreateFrame("Button", "AtlasLootFilterSelect", AtlasLootItemsFrame, "UIDropDownMenuTemplate"); - filterSelectButton:SetSize(130,24); + filterSelectButton:SetSize(190,24); filterSelectButton:SetPoint("Top", "AtlasLootItemsFrame", "TOP",-110,-35); local createFilterButton = CreateFrame("Button", "AtlasLootFilterCreate", AtlasLootItemsFrame, "OptionsButtonTemplate"); diff --git a/AtlasLoot/Core/ItemIDsDatabaseFixes.lua b/AtlasLoot/Core/ItemIDsDatabaseFixes.lua index 27c4df1..3c532ff 100644 --- a/AtlasLoot/Core/ItemIDsDatabaseFixes.lua +++ b/AtlasLoot/Core/ItemIDsDatabaseFixes.lua @@ -4,7 +4,7 @@ ItemIDsDatabase[18563] = {18563, 18563, 318563, 218563}; ItemIDsDatabase[18564] = {18564, 18564, 318564, 218564}; ItemIDsDatabase[17204] = {17204, 17204, 317204, 217204}; ItemIDsDatabase[19017] = {19017, 19017, 319017, 219017}; -ItemIDsDatabase[11879] = {11879, 11879, 311879, 211879}; +ItemIDsDatabase[11879] = {11879, 11879, 311879, 211879}; ItemIDsDatabase[22589] = {6022589, 22589, 322589, 222589}; @@ -24,47 +24,6 @@ ItemIDsDatabase[32837] = {6032837, 32837, 332837, 232837}; ItemIDsDatabase[32838] = {6032838, 32838, 332838, 232838}; ItemIDsDatabase[30104] = {6033482, 30104, 330104, 230104}; ---Tier 1 Tokens - -ItemIDsDatabase[2522360] = {2522360, 2522360, 2622360, 2722360}; -ItemIDsDatabase[2522361] = {2522361, 2522361, 2622361, 2722361}; -ItemIDsDatabase[2522350] = {2522350, 2522350, 2622350, 2722350}; -ItemIDsDatabase[2522362] = {2522362, 2522362, 2622362, 2722362}; -ItemIDsDatabase[2522363] = {2522363, 2522363, 2622363, 2722363}; -ItemIDsDatabase[2522364] = {2522364, 2522364, 2622364, 2722364}; -ItemIDsDatabase[2522359] = {2522359, 2522359, 2622359, 2722359}; -ItemIDsDatabase[2522365] = {2522365, 2522365, 2622365, 2722365}; - ---Tier 2 Tokens - -ItemIDsDatabase[2522460] = {2522460, 2522460, 2622460, 2722460}; -ItemIDsDatabase[2522461] = {2522461, 2522461, 2622461, 2722461}; -ItemIDsDatabase[2522450] = {2522450, 2522450, 2622450, 2722450}; -ItemIDsDatabase[2522462] = {2522462, 2522462, 2622462, 2722462}; -ItemIDsDatabase[2522464] = {2522464, 2522464, 2622464, 2722464}; -ItemIDsDatabase[2522463] = {2522463, 2522463, 2622463, 2722463}; -ItemIDsDatabase[2522459] = {2522459, 2522459, 2622459, 2722459}; -ItemIDsDatabase[2522465] = {2522465, 2522465, 2622465, 2722465}; - ---Tier 3 Tokens - -ItemIDsDatabase[22353] = {22353, 22353, 102278, 222353}; -ItemIDsDatabase[22354] = {22354, 22354, 102286, 222354}; -ItemIDsDatabase[22349] = {22349, 22349, 102264, 222349}; -ItemIDsDatabase[22355] = {22355, 22355, 102262, 222355}; -ItemIDsDatabase[22357] = {22357, 22357, 102268, 222357}; -ItemIDsDatabase[22356] = {22356, 22356, 102300, 222356}; -ItemIDsDatabase[22352] = {22352, 22352, 102284, 222352}; -ItemIDsDatabase[22358] = {22358, 22358, 102290, 222358}; - ---Tier 5 Tokens - -ItemIDsDatabase[30243] = {30243, 30243, 330243, 230243}; -ItemIDsDatabase[30249] = {30249, 30249, 330249, 230249}; -ItemIDsDatabase[30237] = {30237, 30237, 330237, 230237}; -ItemIDsDatabase[30240] = {30240, 30240, 330240, 230240}; -ItemIDsDatabase[30246] = {30246, 30246, 30246, 230246}; - --Druid ItemIDsDatabase[29098] = {6029098, 29098, 314712, 214712}; @@ -73,41 +32,11 @@ ItemIDsDatabase[29096] = {6029096, 29096, 314710, 214710}; ItemIDsDatabase[29097] = {6029097, 29097, 314711, 214711}; ItemIDsDatabase[29099] = {6029099, 29099, 314713, 214713}; ---ZA New Items -ItemIDsDatabase[21824] = {6021824, 21824, 321824, 221824}; -ItemIDsDatabase[24574] = {6024574, 24574, 324574, 224574}; -ItemIDsDatabase[28354] = {6028354, 28354, 328354, 228354}; -ItemIDsDatabase[33059] = {6033059, 33059, 333059, 233059}; -ItemIDsDatabase[33983] = {6033983, 33983, 333983, 233983}; -ItemIDsDatabase[39755] = {6039755, 39755, 339755, 239755}; -ItemIDsDatabase[33533] = {6033533, 33533, 333533, 233533}; -ItemIDsDatabase[33979] = {6033979, 33979, 333979, 233979}; -ItemIDsDatabase[34071] = {6034071, 34071, 334071, 234071}; -ItemIDsDatabase[38634] = {6038634, 38634, 338634, 238634}; -ItemIDsDatabase[33500] = {6033500, 33500, 333500, 233500}; -ItemIDsDatabase[33496] = {6033496, 33496, 333496, 233496}; -ItemIDsDatabase[33498] = {6033498, 33498, 333498, 233498}; -ItemIDsDatabase[33971] = {6033971, 33971, 333971, 233971}; -ItemIDsDatabase[33495] = {6033495, 33495, 333495, 233495}; -ItemIDsDatabase[33480] = {6033480, 33480, 333480, 233480}; -ItemIDsDatabase[33591] = {6033591, 33591, 333591, 233591}; -ItemIDsDatabase[33590] = {6033590, 33590, 333590, 233590}; -ItemIDsDatabase[33481] = {6033481, 33481, 333481, 233481}; -ItemIDsDatabase[33492] = {6033492, 33492, 333492, 233492}; -ItemIDsDatabase[33499] = {6033499, 33499, 333499, 233499}; -ItemIDsDatabase[33805] = {6033805, 33805, 333805, 233805}; -ItemIDsDatabase[33491] = {6033491, 33491, 333491, 233491}; -ItemIDsDatabase[33490] = {6033490, 33490, 333490, 233490}; -ItemIDsDatabase[33489] = {6033489, 33489, 333489, 233489}; -ItemIDsDatabase[33483] = {6033483, 33483, 333483, 233483}; -ItemIDsDatabase[33493] = {6033493, 33493, 333493, 233493}; -ItemIDsDatabase[33497] = {6033497, 33497, 333497, 233497}; -ItemIDsDatabase[33494] = {6033494, 33494, 333494, 233494}; -ItemIDsDatabase[24537] = {6024537, 24537, 324537, 224537}; --ZA Bears ItemIDsDatabase[1333809] = {1333809, 1333809, 1433809, 1233809}; --intact vial of kael'thas sunstrider -ItemIDsDatabase[450001] = {450001, 450001, 450003, 450005}; -ItemIDsDatabase[450000] = {450000, 450000, 450002, 450004}; +--[[ ItemIDsDatabase[450001] = {450001, 450001, 450003, 450005, ["MythicRaid"] = 450007}; +ItemIDsDatabase[450000] = {450000, 450000, 450002, 450004, ["MythicRaid"] = 450006}; + ]] end \ No newline at end of file diff --git a/AtlasLoot/Core/Search.lua b/AtlasLoot/Core/Search.lua index f3fc1c3..8e41f25 100644 --- a/AtlasLoot/Core/Search.lua +++ b/AtlasLoot/Core/Search.lua @@ -665,7 +665,7 @@ local function DoSearch(searchText) end else local difficultyCap = min(AtlasLoot_Difficulty:getMaxDifficulty(data.Type), ItemindexID); - itemId = AtlasLoot:FindId(itemId, difficultyCap) or 2; + itemId = AtlasLoot:FindId(itemId, difficultyCap, data.Type) or 2; local item = Item:CreateFromID(itemId); diff --git a/AtlasLoot_BurningCrusade/burningcrusade.lua b/AtlasLoot_BurningCrusade/burningcrusade.lua index 6137e3e..7c692b1 100644 --- a/AtlasLoot_BurningCrusade/burningcrusade.lua +++ b/AtlasLoot_BurningCrusade/burningcrusade.lua @@ -1569,6 +1569,7 @@ local BabbleInventory = AtlasLoot_GetLocaleLibBabble("LibBabble-Inventory-3.0"); AtlasLoot_Data["HCShatteredHalls"] = { Name = BabbleZone["Hellfire Citadel"]..": "..BabbleZone["The Shattered Halls"]; + DisplayName = BabbleZone["The Shattered Halls"]; Type = "BCDungeon"; Map = "HCTheShatteredHalls"; {