update to version 7.3.18 (#11)

* Merged Magisters Terrace - Kael'thas Sunstriders normal/heroic pages

* update to build 7.3.18
This commit is contained in:
Anch
2024-08-29 04:38:01 +12:00
committed by GitHub
parent 550df8c842
commit e04717d340
27 changed files with 26118 additions and 24888 deletions
+105 -14
View File
@@ -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")