From e04717d34045b68f1f4373e21b1299b56a5e3697 Mon Sep 17 00:00:00 2001 From: Anch Date: Thu, 29 Aug 2024 04:38:01 +1200 Subject: [PATCH] update to version 7.3.18 (#11) * Merged Magisters Terrace - Kael'thas Sunstriders normal/heroic pages * update to build 7.3.18 --- .gitignore | 8 +- AtlasLoot/AtlasLoot.toc | 6 +- AtlasLoot/Core/AtlasDifficulty.lua | 9 +- AtlasLoot/Core/AtlasLoot.lua | 113 +- AtlasLoot/Core/LootButtons.lua | 30 +- AtlasLoot/Core/Maps.lua | 2 +- AtlasLoot/Core/Utils.lua | 119 +- AtlasLoot/Core/WishList.lua | 11 +- AtlasLoot/Databases/CraftingSource.lua | 8 +- AtlasLoot/Databases/DatabaseFunctions.lua | 32 +- AtlasLoot/Databases/Databases.xml | 1 - AtlasLoot/Databases/ItemIDsDatabaseFixes.lua | 2 +- AtlasLoot/Databases/npcs.lua | 2 +- .../Libs/LibAboutPanel/LibAboutPanel.lua | 76 +- AtlasLoot/Locales/constants.en.lua | 3 +- AtlasLoot/Menus/DungeonRaidMenus.lua | 2 +- AtlasLoot/Menus/SetMenus.lua | 1 + AtlasLoot_BurningCrusade/burningcrusade.lua | 1306 +- AtlasLoot_Cache/AtlasLootCache.lua | 48978 ++++++++-------- AtlasLoot_Cache/AtlasLoot_Cache.toc | 6 +- AtlasLoot_Cache/CacheFunctions.lua | 34 + AtlasLoot_Cache/ItemIDsDatabaseFixes.lua | 60 + .../craftingCLASSIC.lua | 33 +- AtlasLoot_Crafting_TBC/craftingTBC.lua | 4 + AtlasLoot_Crafting_Wrath/craftingWRATH.lua | 3 + AtlasLoot_OriginalWoW/MapData.lua | 2 +- AtlasLoot_OriginalWoW/originalwow.lua | 155 +- 27 files changed, 26118 insertions(+), 24888 deletions(-) create mode 100644 AtlasLoot_Cache/CacheFunctions.lua create mode 100644 AtlasLoot_Cache/ItemIDsDatabaseFixes.lua diff --git a/.gitignore b/.gitignore index c6156ca..c3935cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -.env -.DS_Store -.release -.install -.lua/* -.vscode -.idea .vscode/settings.json +README.md diff --git a/AtlasLoot/AtlasLoot.toc b/AtlasLoot/AtlasLoot.toc index eb5a1d5..c7f1616 100644 --- a/AtlasLoot/AtlasLoot.toc +++ b/AtlasLoot/AtlasLoot.toc @@ -2,13 +2,13 @@ ## Title: AtlasLoot Ascension Edition ## Notes: Shows the possible loot from the bosses ## Author: v7 Rebuid Done by: Anch, Rvng -## Version: v7.3.15 -## X-eMail: +## Version: v7.3.18 ## X-Credits: Skray, Szyler and others. ## Dependencies: AtlasLoot_Cache ## X-Category: Map ## X-License: GPL v2 -## X-Website: https://discord.gg/uYCE2X2FgA +## X-Github-Repository: https://github.com/Szyler/AtlasLootAscension +## X-Discord: https://discord.gg/uYCE2X2FgA ## X-Embeds: Ace3, DewdropLib, LibBabble-Boss-3.0, LibBabble-Faction-3.0, LibBabble-Inventory-3.0, LibBabble-Zone-3.0 ## Title-deDE: AtlasLoot Enhanced ## Notes-deDE: Zeigt mögliche Beute von Bossen diff --git a/AtlasLoot/Core/AtlasDifficulty.lua b/AtlasLoot/Core/AtlasDifficulty.lua index e8e332f..cc74192 100644 --- a/AtlasLoot/Core/AtlasDifficulty.lua +++ b/AtlasLoot/Core/AtlasDifficulty.lua @@ -46,7 +46,8 @@ AtlasLoot.Difficulties["BCDungeon"] = { {"Bloodforged", 1}, {"Heroic Bloodforged", 100}, - {"Normal/Heroic", 2}, + {"Normal", 2}, + {"Heroic", 3}, {"Mythic", 4}, {"Mythic 1", 5 }, {"Mythic 2", 6 }, {"Mythic 3", 7 }, {"Mythic 4", 8 }, {"Mythic 5", 9 }, {"Mythic 6", 10 }, {"Mythic 7", 11 }, {"Mythic 8", 12 }, {"Mythic 9", 13 }, {"Mythic 10", 14 }, @@ -125,9 +126,9 @@ --Enums for comparisons in code AtlasLoot.Difficulties.Bloodforged = 1 AtlasLoot.Difficulties["Heroic Bloodforged"] = 2 - AtlasLoot.Difficulties.Normal = 3 - AtlasLoot.Difficulties.Heroic = 4 - AtlasLoot.Difficulties.Mythic = 5 + AtlasLoot.Difficulties.Normal = 2 + AtlasLoot.Difficulties.Heroic = 3 + AtlasLoot.Difficulties.Mythic = 4 AtlasLoot.Difficulties.Ascended = 5 AtlasLoot.Difficulties.MythicPlus = { diff --git a/AtlasLoot/Core/AtlasLoot.lua b/AtlasLoot/Core/AtlasLoot.lua index bf39e0d..b7b0b22 100644 --- a/AtlasLoot/Core/AtlasLoot.lua +++ b/AtlasLoot/Core/AtlasLoot.lua @@ -56,6 +56,7 @@ AtlasLootCharDB = {} AtlasLoot_TokenData = {} local realmName = GetRealmName() +local _, class = UnitClass("player") local AtlasLootDBDefaults = { profile = { @@ -223,7 +224,7 @@ function AtlasLoot:OnEnable() else AtlasLootItemsFrame_Wishlist_UnLock:Enable() end - self:LoadMissingIDs() + LoadItemIDsDatabase() self:LoadTradeskillRecipes() self:PopulateProfessions() self:CreateVanityCollection() @@ -564,49 +565,43 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) self:SubTableScrollFrameUpdate(dataID, dataSource_backup, tablenum) end + for i = 1, 30, 1 do + --Use shortcuts for easier reference to parts of the item button + local itemButton = _G["AtlasLootItem_"..i] + local hightlightFrame = _G["AtlasLootItem_"..i.."_Highlight"] + itemButton:Hide() + itemButton.itemID = nil + itemButton.spellID = nil + hightlightFrame:Hide() + itemButton.hasTrade = false + end + -- Sets the main page lable if dataSource[dataID][tablenum] and dataSource[dataID][tablenum].Name then AtlasLoot_BossName:SetText(dataSource[dataID][tablenum].Name) else AtlasLoot_BossName:SetText("This Is Empty") - for i = 1, 30, 1 do - --Use shortcuts for easier reference to parts of the item button - local itemButton = _G["AtlasLootItem_"..i] - local hightlightFrame = _G["AtlasLootItem_"..i.."_Highlight"] - itemButton:Hide() - itemButton.itemID = nil - itemButton.spellID = nil - hightlightFrame:Hide() - itemButton.hasTrade = false - end return end - if dataSource ~= self.dataSourceBackup and tablenum ~= lastTablenum then - for i = 1, 30, 1 do - _G["AtlasLootItem_"..i]:Hide() - _G["AtlasLootItem_"..i.."_Highlight"]:Hide() - end - end - -- find the right itemID for the difficulty selected local function getProperItemConditionals(item) isValid = false toShow = true local itemDif = ItemindexID local itemID = item and item.itemID - local orgItemID = itemID if item and item.itemID then itemID = item.itemID isValid = true local itemType = item.Type or dataSource[dataID].Type - if(item[self.Difficulties.MIN_DIF]) then + if class == "HERO" and item.COA then + toShow = false + elseif(item[self.Difficulties.MIN_DIF]) then if item[self.Difficulties.MIN_DIF] > itemDif then toShow = false end itemID = self:FindId(item.itemID, min(self:getMaxDifficulty(itemType), itemDif), itemType) or item.itemID end - if toShow then --Sets ItemindexID to normal(2) if it is nil for min/max difficulties. if not tonumber(itemDif) then itemDif = self.Difficulties.Normal end @@ -618,18 +613,23 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) itemID = self:FindId(item.itemID, itemDif, itemType) or item.itemID end elseif item and (item.spellID or item.icon) or item and itemID then - isValid = true toShow = true + if(item[self.Difficulties.MIN_DIF]) then + if item[self.Difficulties.MIN_DIF] > itemDif then + toShow = false + end + end + isValid = true end local recipeID if item and item.spellID then recipeID = self:GetRecipeID(item.spellID) end - return isValid, toShow, itemID, recipeID, orgItemID + return isValid, toShow, itemID, recipeID end -- Setup the button for the to be displayed item/spell - local function setupButton(itemID, i, dataSource, dataID, tablenum, dataSource_backup) + local function setupButton(itemID, i, newPosition, dataSource, dataID, tablenum, dataSource_backup) local text, extra local itemName, itemQuality, itemSubType, itemEquipLoc, itemIcon if itemID then @@ -638,11 +638,11 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) local spellName, spellIcon --Use shortcuts for easier reference to parts of the item button - local itemButton = _G["AtlasLootItem_"..i] - local iconFrame = _G["AtlasLootItem_"..i.."_Icon"] - local nameFrame = _G["AtlasLootItem_"..i.."_Name"] - local extraFrame = _G["AtlasLootItem_"..i.."_Extra"] - local hightlightFrame = _G["AtlasLootItem_"..i.."_Highlight"] + local itemButton = _G["AtlasLootItem_"..newPosition] + local iconFrame = _G["AtlasLootItem_"..newPosition.."_Icon"] + local nameFrame = _G["AtlasLootItem_"..newPosition.."_Name"] + local extraFrame = _G["AtlasLootItem_"..newPosition.."_Extra"] + local hightlightFrame = _G["AtlasLootItem_"..newPosition.."_Highlight"] local spellID = dataSource[dataID][tablenum][i].spellID if spellID then @@ -831,54 +831,23 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource_backup, tablenum) itemButton:Show() end - local function getItemData(itemID, i, orgItemID, item) - self:ItemsLoading(1) - item:ContinueOnLoad(function(itemID) - self:ItemsLoading(-1) - setupButton(itemID, i, dataSource, dataID, tablenum, dataSource_backup) - end) - end - -- Create the loottable if (dataID == "SearchResult") or (dataSource_backup == "AtlasLoot_CurrentWishList") or dataSource[dataID][tablenum] then - + local displayNumber = 0 --Iterate through each item object and set its properties for i = 1, 30, 1 do - --Use shortcuts for easier reference to parts of the item button - local itemButton = _G["AtlasLootItem_"..i] - local hightlightFrame = _G["AtlasLootItem_"..i.."_Highlight"] - --Check for a valid object (that it exists, and that it has a name - isValid, toShow, itemID, recipeID, orgItemID = getProperItemConditionals(dataSource[dataID][tablenum][i]) - if isValid and toShow then - hightlightFrame:Hide() - if itemID then - local item = Item:CreateFromID(itemID) - if not item:GetInfo() then - getItemData(itemID, i, orgItemID, item) - end - setupButton(itemID, i, dataSource, dataID, tablenum, dataSource_backup) - elseif recipeID then - getItemData(recipeID, i, nil, Item:CreateFromID(recipeID)) - else - setupButton(itemID, i, dataSource, dataID, tablenum, dataSource_backup) - end - else - itemButton:Hide() - itemButton.itemID = nil - itemButton.spellID = nil - hightlightFrame:Hide() - itemButton.hasTrade = false + --Set new button number if a item has been hidden + local newPosition = i - displayNumber + if i == 16 then + displayNumber = 0 + newPosition = i end - if dataSource[itemID] then - for _,ID in pairs(dataSource[itemID]) do - local item = Item:CreateFromID(ID.itemID) - if ID.itemID and not item:GetInfo() then - self:ItemsLoading(1) - item:ContinueOnLoad(function(itemID) - self:ItemsLoading(-1) - end) - end - end + --Check for a valid object (that it exists, and that it has a name + isValid, toShow, itemID, recipeID = getProperItemConditionals(dataSource[dataID][tablenum][i]) + if isValid and toShow then + setupButton(itemID or recipeID, i, newPosition, dataSource, dataID, tablenum, dataSource_backup) + elseif isValid then + displayNumber = displayNumber + 1 end end diff --git a/AtlasLoot/Core/LootButtons.lua b/AtlasLoot/Core/LootButtons.lua index 1fb352a..4608792 100644 --- a/AtlasLoot/Core/LootButtons.lua +++ b/AtlasLoot/Core/LootButtons.lua @@ -523,7 +523,7 @@ function AtlasLoot:ItemContextMenu(data, Type, recipeData) "notCheckable", true ) end - if self.TomTomLoaded then + if self.TomTomLoaded and data.spellID then if not self.db.profile.waypointList then self.db.profile.waypointList = {} end local wayPoint if (craftingData and self.db.profile.recipeExtraInfoSwitch and IsControlKeyDown()) or (craftingData and not self.db.profile.recipeExtraInfoSwitch) then @@ -538,16 +538,15 @@ function AtlasLoot:ItemContextMenu(data, Type, recipeData) end end end + self:AddDividerLine(35) + self.Dewdrop:AddLine( + 'text', AL["Recipe Waypoints"], + 'notCheckable', true, + 'isTitle', true, + 'textHeight', 13, + 'textWidth', 13 + ) if craftingData and wayPoint then - - self:AddDividerLine(35) - self.Dewdrop:AddLine( - 'text', AL["Recipe Waypoints"], - 'notCheckable', true, - 'isTitle', true, - 'textHeight', 13, - 'textWidth', 13 - ) self.Dewdrop:AddLine( "text", "Add pin to map", "func", function() @@ -560,7 +559,18 @@ function AtlasLoot:ItemContextMenu(data, Type, recipeData) 'textWidth', 12, "notCheckable", true ) + end + self.Dewdrop:AddLine( + "text", "Add pin to map for every missing recipe", + "func", function() + self:SetRecipeMapPins() + end, + 'closeWhenClicked', true, + 'textHeight', 12, + 'textWidth', 12, + "notCheckable", true + ) end end elseif level == 2 then diff --git a/AtlasLoot/Core/Maps.lua b/AtlasLoot/Core/Maps.lua index af100d6..082e9cd 100644 --- a/AtlasLoot/Core/Maps.lua +++ b/AtlasLoot/Core/Maps.lua @@ -244,7 +244,7 @@ function AtlasLoot:MapMenuOpen(frame) if v[1].Zone then text = map[i][2][1] else - text = v[1][1] + text = v[1][1] or "" end tinsert(menuList[1], {text = WHITE..text, func = function() self:MapOnShow(mapID, i, true) end, notCheckable = true, closeWhenClicked = true, textHeight = 12, textWidth = 12}) end diff --git a/AtlasLoot/Core/Utils.lua b/AtlasLoot/Core/Utils.lua index ec0b6ee..d0854a9 100644 --- a/AtlasLoot/Core/Utils.lua +++ b/AtlasLoot/Core/Utils.lua @@ -13,6 +13,7 @@ local YELLOW = "|cffFFd200" local playerName = UnitName("player") local realmName = GetRealmName() +local playerFaction = UnitFactionGroup("player") -- Used to create a dewdrop menu from a table function AtlasLoot:OpenDewdropMenu(frame, menuList, skipRegister) @@ -150,12 +151,20 @@ local itemEquipLocConversion = { "INVTYPE_QUIVER", "INVTYPE_RELIC", } -function AtlasLoot:GetItemInfo(itemID) - local itemName, itemLink, itemQuality, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(itemID) - if not itemName then - local item = GetItemInfoInstant(itemID) - if item then - itemName, itemSubType, itemEquipLoc, itemTexture, itemQuality = item.name, _G["ITEM_SUBCLASS_"..item.classID.."_"..item.subclassID], itemEquipLocConversion[item.inventoryType], item.icon, item.quality + +function AtlasLoot:GetItemInfo(item) + item = tonumber(item) and Item:CreateFromID(item) or Item:CreateFromLink(item) + local itemName, itemLink, itemQuality, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(item.itemID) + if not item:GetInfo() then + self:ItemsLoading(1) + item:ContinueOnLoad(function() + self:ItemsLoading(-1) + end) + local itemInstant = GetItemInfoInstant(item.itemID) + if itemInstant then + itemName, itemSubType, itemEquipLoc, itemTexture, itemQuality = itemInstant.name, _G["ITEM_SUBCLASS_"..itemInstant.classID.."_"..itemInstant.subclassID], itemEquipLocConversion[itemInstant.inventoryType], itemInstant.icon, itemInstant.quality + local color = ITEM_QUALITY_COLORS[itemQuality] or ITEM_QUALITY_COLORS[1] + itemLink = color:WrapText("|Hitem:"..item.itemID.."|h["..itemName.."]|h|r") end end return itemName, itemLink, itemQuality, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice @@ -275,6 +284,95 @@ function AtlasLoot:IsRecipeUnknown(ID) return text end +local professionTable = { + [171] = { + "AlchemyCLASSIC", + "AlchemyTBC", + "AlchemyWRATH", +}, + [164] = { + "SmithingCLASSIC", + "SmithingTBC", + "SmithingWRATH", + }, + [333] = { + "EnchantingCLASSIC", + "EnchantingTBC", + "EnchantingWRATH", +}, + [202] = { + "EngineeringCLASSIC", + "EngineeringTBC", + "EngineeringWRATH", +}, + [755] = { + "JewelcraftingTBC", + "JewelcraftingWRATH", +}, + [165] = { + "LeatherworkingCLASSIC", + "LeatherworkingTBC", + "LeatherworkingWRATH", +}, + [197] = { + "TailoringCLASSIC", + "TailoringTBC", + "TailoringWRATH", +}, + [186] = { + "MiningCLASSIC", + "MiningTBC", + "MiningWRATH", +}, + [185] = { + "CookingCLASSIC", + "CookingTBC", + "CookingWRATH", +}, + [129] = { + "FirstAidCLASSIC", + "FirstAidTBC", + "FirstAidWRATH", +}, + [773] = { + "Inscription", +}, +} + +local craftingXpac = { ClassicCrafting = 1, BCCrafting = 2, WrathCrafting = 3 } + +function AtlasLoot:SetRecipeMapPins() + local xpac = GetAccountExpansionLevel()+1 + self:LoadAllModules() + for profKey, _ in pairs(self.db.profile.professions) do + if professionTable[profKey] then + for _, profTable in pairs(professionTable[profKey]) do + if craftingXpac[AtlasLoot_Data[profTable].Type] <= xpac then + for _, profType in pairs(AtlasLoot_Data[profTable]) do + if type(profType) == "table" then + for _, recipeData in pairs(profType) do + if recipeData.spellID and not CA_IsSpellKnown(recipeData.spellID) then + local craftingData = self:GetRecipeSource(recipeData.spellID) + if craftingData then + for _,v in pairs(craftingData) do + if v.cords and tonumber(v.cords[1]) ~= 0 and tonumber(v.cords[2]) ~= 0 then + local line1 = v[1] + local line2 = v[2] + if v.fac and (v.fac[2] == playerFaction or v.fac[2] == "Netural") then line1 = v.fac[1]..line1 end + self:AddWayPoint({ line2, tonumber(v.cords[1]), tonumber(v.cords[2]), line1}) + end + end + end + end + end + end + end + end + end + end + end +end + -- Get rep faction for when you have 2 loot tables and want to show a different one depending on rep function AtlasLoot:GetReputationFaction(factions) local factionIndex = 1 @@ -350,17 +448,10 @@ function AtlasLoot:PopoupItemFrame(frame, data) button:Hide() else local itemID = item.itemID or item[1] - local itemData = Item:CreateFromID(itemID) - if itemID and not itemData:GetInfo() then - self:ItemsLoading(1) - itemData:ContinueOnLoad(function(itemID) - self:ItemsLoading(-1) - end) - end local itemData = {self:GetItemInfo(itemID)} SetItemButtonTexture(button, itemData[10]) SetItemButtonQuality(button, itemData[3]) - + button.itemID = itemID button.itemTexture = frame.itemTexture local recipe = self:GetRecipeData(itemID, "item") diff --git a/AtlasLoot/Core/WishList.lua b/AtlasLoot/Core/WishList.lua index a702891..bf0e170 100644 --- a/AtlasLoot/Core/WishList.lua +++ b/AtlasLoot/Core/WishList.lua @@ -72,7 +72,7 @@ function AtlasLoot:WishListAddDropClick(typ, tableNum, data, show) xtyp = typ xarg2 = tableNum if typ == "Own" then - if AtlasLoot:WishListCheck(itemID) then + if AtlasLoot:WishListCheck(itemID) and not AtlasLootWishList["Options"][playerName].AllowDuplicates then DEFAULT_CHAT_FRAME:AddMessage(BLUE..AL["AtlasLoot"]..": "..AtlasLoot:FixText(itemName)..RED..AL[" already in the WishList!"]..WHITE.." ("..AtlasLootWishList["Own"][tableNum].Name..")") return end @@ -87,7 +87,7 @@ function AtlasLoot:WishListAddDropClick(typ, tableNum, data, show) end DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot"]..": "..AtlasLoot:FixText(itemName)..GREY..AL[" added to the WishList."]..WHITE.." ("..AtlasLootWishList["Own"][tableNum].Name..")") elseif typ == "Shared" then - if AtlasLoot:WishListCheck(itemID) then + if AtlasLoot:WishListCheck(itemID) and not AtlasLootWishList["Options"][playerName].AllowDuplicates then DEFAULT_CHAT_FRAME:AddMessage(BLUE..AL["AtlasLoot"]..": "..AtlasLoot:FixText(itemName)..RED..AL[" already in the WishList!"]..WHITE.." ("..AtlasLootWishList["Shared"][tableNum].Name) return end @@ -947,6 +947,13 @@ function AtlasLoot:CreateWishlistOptions() end end) + local WishListAllowDuplicates = CreateFrame("CheckButton", "AtlasLootOptionsWishListAllowDuplicates", WishlistOptionsFrame, "OptionsCheckButtonTemplate") + WishListAllowDuplicates:SetPoint("LEFT", WishlistOptionsFrame, "TOPLEFT", 5, -155) + WishListAllowDuplicates:SetSize(25,25) + AtlasLootOptionsWishListAllowDuplicatesText:SetText(AL["Allow Duplicates"]) + WishListAllowDuplicates:SetScript("OnShow", function(button) button:SetChecked(AtlasLootWishList["Options"][playerName].AllowDuplicates) end) + WishListAllowDuplicates:SetScript("OnClick", function(button) AtlasLootWishList["Options"][playerName].AllowDuplicates = button:GetChecked() end) + InterfaceOptions_AddCategory(WishlistOptionsFrame) OptionsLoadet = true end diff --git a/AtlasLoot/Databases/CraftingSource.lua b/AtlasLoot/Databases/CraftingSource.lua index b0998a1..2edb32e 100644 --- a/AtlasLoot/Databases/CraftingSource.lua +++ b/AtlasLoot/Databases/CraftingSource.lua @@ -181,7 +181,7 @@ AtlasLoot_CraftingData["AquireType"][46113] = { CUSTOM, 24}; -- Surestrike Goggl AtlasLoot_CraftingData["AquireType"][46114] = { CUSTOM, 24}; -- Mayhem Projection Goggles -- 46114 AtlasLoot_CraftingData["AquireType"][46115] = { CUSTOM, 24}; -- Hard Khorium Goggles -- 46115 AtlasLoot_CraftingData["AquireType"][46116] = { CUSTOM, 24}; -- Quad Deathblow X44 Goggles -- 46116 -AtlasLoot_CraftingData["AquireType"][60867] = { REPUTATION, BabbleFaction["Alliance Vanguard"], BabbleFaction["Exalted"], 32564, REPUTATION, BabbleFaction["Alliance Vanguard"], BabbleFaction["Exalted"], 32773}; -- Mekgineer's Chopper -- 60867 +--AtlasLoot_CraftingData["AquireType"][60867] = { REPUTATION, BabbleFaction["Alliance Vanguard"], BabbleFaction["Exalted"], 32564, REPUTATION, BabbleFaction["Alliance Vanguard"], BabbleFaction["Exalted"], 32773}; -- Mekgineer's Chopper -- 60867 AtlasLoot_CraftingData["AquireType"][3275] = { CUSTOM, 8}; -- Linen Bandage -- 3275 AtlasLoot_CraftingData["AquireType"][45382] = { CUSTOM, 8}; -- Scroll of Stamina -- 45382 AtlasLoot_CraftingData["AquireType"][48114] = { CUSTOM, 8}; -- Scroll of Intellect -- 48114 @@ -3366,6 +3366,12 @@ AtlasLoot_CraftingData["Vendor"][968392] = { 970023}; AtlasLoot_CraftingData["Vendor"][968395] = { 970034}; AtlasLoot_CraftingData["Vendor"][968398] = { 970019}; AtlasLoot_CraftingData["Vendor"][968401] = { 970039}; +AtlasLoot_CraftingData["Vendor"][968500] = { 970011}; +AtlasLoot_CraftingData["Vendor"][968496] = { 970011}; +AtlasLoot_CraftingData["Vendor"][968506] = { 970008}; +AtlasLoot_CraftingData["Vendor"][968498] = { 970008}; +AtlasLoot_CraftingData["Vendor"][968502] = { 970016}; +AtlasLoot_CraftingData["Vendor"][968504] = { 970016}; AtlasLoot_CraftingData["RepVendor"][17559] = { BabbleFaction["Argent Dawn"], BabbleFaction["Honored"], 10856, 11536, 10857} -- Transmute: Air to Fire -- 17559 AtlasLoot_CraftingData["RepVendor"][17561] = { BabbleFaction["Timbermaw Hold"], BabbleFaction["Friendly"], 11557} -- Transmute: Earth to Water -- 17561 diff --git a/AtlasLoot/Databases/DatabaseFunctions.lua b/AtlasLoot/Databases/DatabaseFunctions.lua index e49b8d2..0a90b79 100644 --- a/AtlasLoot/Databases/DatabaseFunctions.lua +++ b/AtlasLoot/Databases/DatabaseFunctions.lua @@ -64,17 +64,15 @@ function AtlasLoot:CreateUpdateText() updateFrameCreated = true end -local itemTypeIgnore = {[18] = true, [19] = true, [24] = true} - local unknownIDs = {} function AtlasLoot:UpdateItemIDsDatabase(firstID, lastID) AtlasLootItemCache = ItemIDsDatabase self:IsLootTableAvailable("AtlasLootOriginalWoW") self:IsLootTableAvailable("AtlasLootBurningCrusade") self:IsLootTableAvailable("AtlasLootWotLK") - for dataID, data in pairs(AtlasLoot_Data) do + for _, data in pairs(AtlasLoot_Data) do if data.Type then - for tableNum, t in ipairs(data) do + for _, t in ipairs(data) do for _, itemData in pairs(t) do if type(itemData) == "table" then if itemData.itemID then @@ -148,7 +146,7 @@ Finds the Ids of other difficulties based on the normal id of the item and the d On the form of {ID, {normal, heroic, mythic, mythic1, mythic2, ... ,mythicN}} ]] function AtlasLoot:FindId(id, difficulty, type, Difficultiestring) - local hasID + local hasID if self.Difficulties[type] then for _, dif in ipairs (self.Difficulties[type]) do if dif[2] == difficulty then @@ -182,28 +180,4 @@ function AtlasLoot:FindId(id, difficulty, type, Difficultiestring) if ItemIDsDatabase[id] and ItemIDsDatabase[id][difficulty] then return ItemIDsDatabase[id][difficulty], true end -end - ---Updates the ItemIDsDatabase with any missing or incorrect items -function AtlasLoot:LoadMissingIDs() - --loads any items in the saved varriables cache - if AtlasLootItemCache and not self:CheckIfEmptyTable(AtlasLootItemCache) then - for normalID, item in pairs(AtlasLootItemCache) do - for itemDif, itemID in pairs(item) do - ItemIDsDatabase[normalID] = ItemIDsDatabase[normalID] or {} - ItemIDsDatabase[normalID][itemDif] = itemID - end - end - end - -- loads ids that have been manuely corrected - if ItemIDManuelCorrections then - for normalID, item in pairs(ItemIDManuelCorrections) do - for itemDif, itemID in pairs(item) do - ItemIDsDatabase[normalID] = ItemIDsDatabase[normalID] or {} - ItemIDsDatabase[normalID][itemDif] = itemID - end - end - end - ItemIDManuelCorrections = nil - collectgarbage("collect") end \ No newline at end of file diff --git a/AtlasLoot/Databases/Databases.xml b/AtlasLoot/Databases/Databases.xml index bef41e6..7d51794 100644 --- a/AtlasLoot/Databases/Databases.xml +++ b/AtlasLoot/Databases/Databases.xml @@ -1,7 +1,6 @@