localization update

This commit is contained in:
Spit
2025-09-23 10:32:01 +03:00
parent 1a6e5a6c49
commit 6aee831133
13 changed files with 23645 additions and 14976 deletions
+23 -2
View File
@@ -3,7 +3,7 @@
## Notes: Shows possible loot from dungeon bosses and other sources. ## Notes: Shows possible loot from dungeon bosses and other sources.
## Author: Otari (overhaul/revamp, menu changes, bugfixes/updates), Lexie (Turtle WoW fixes/updates), Pepopo, MarcelineVQ (Kara40 loot), Shagu ## Author: Otari (overhaul/revamp, menu changes, bugfixes/updates), Lexie (Turtle WoW fixes/updates), Pepopo, MarcelineVQ (Kara40 loot), Shagu
## LegacyAuthor: Daviesh, Pompa (Turtle WoW World Bosses), Xerron (Turtle WoW World Bosses), Gurky (Turtle WoW 1.16/1.16.1 Dungeons) ## LegacyAuthor: Daviesh, Pompa (Turtle WoW World Bosses), Xerron (Turtle WoW World Bosses), Gurky (Turtle WoW 1.16/1.16.1 Dungeons)
## Version: 3.2.4 ## Version: 3.2.5
## SavedVariablesPerCharacter: AtlasLootCharDB ## SavedVariablesPerCharacter: AtlasLootCharDB
## OptionalDeps: Alphamap, AtlasLoader, LootLink, ItemSync, HewdropLib, Ace2, EquipCompare, EQCompare ## OptionalDeps: Alphamap, AtlasLoader, LootLink, ItemSync, HewdropLib, Ace2, EquipCompare, EQCompare
@@ -15,7 +15,14 @@ Libs\AceLocale\AceLocale-2.2.lua
Libs\AceAddon\AceAddon-2.0.lua Libs\AceAddon\AceAddon-2.0.lua
Libs\Hewdrop\Hewdrop-2.0.lua Libs\Hewdrop\Hewdrop-2.0.lua
Locale\Locale.xml Locale\locale.en.lua
Locale\locale.ru.lua
Locale\locale.de.lua
Locale\locale.fr.lua
Locale\locale.cn.lua
Locale\locale.kr.lua
Locale\locale.tw.lua
Locale\locale.es.lua
Database\TooltipStrings.lua Database\TooltipStrings.lua
Database\Sets.lua Database\Sets.lua
@@ -27,4 +34,18 @@ Database\Instances.lua
Database\WorldBosses.lua Database\WorldBosses.lua
Database\TableRegister.lua Database\TableRegister.lua
Core\ButtonRegistry.lua
Core\TextParsing.lua
Core\Spells.lua
Core\Sets.lua
Core\Factions.lua
Core\WorldEvents.lua
Core\PvP.lua
Core\Crafting.lua
Core\AtlasLoot.lua
Core\WishList.lua
Core\Search.lua
Core\WorldBoss.lua
Core\Dungeons.lua
Core\Tooltip.lua
Core\AtlasLoot.xml Core\AtlasLoot.xml
+302 -322
View File
@@ -6,6 +6,7 @@ Can be integrated with Atlas (http://www.atlasmod.com)
]] ]]
local _G = _G or getfenv(0) local _G = _G or getfenv(0)
local refreshTimeout = 2
-- Bindings -- Bindings
BINDING_HEADER_ATLASLOOT_TITLE = "AtlasLoot Bindings" BINDING_HEADER_ATLASLOOT_TITLE = "AtlasLoot Bindings"
@@ -370,6 +371,7 @@ function AtlasLoot_OnLoad()
SlashCmdList["ATLASLOOT"] = function(msg) SlashCmdList["ATLASLOOT"] = function(msg)
AtlasLoot_SlashCommand(msg); AtlasLoot_SlashCommand(msg);
end end
AtlasLootItemsFrame.queue = {}
end end
--[[ --[[
@@ -950,6 +952,28 @@ function AtlasLootOptions_Toggle()
end end
end end
function AtlasLootItemsFrame_OnUpdate()
if ( not this.refreshTime ) then
return
end
this.refreshTime = (this.refreshTime or refreshTimeout) - arg1
local done = true
for item in pairs(this.queue) do
if not GetItemInfo(item) then
done = false
end
end
if ( done or this.refreshTime <= 0 ) then
this.refreshTime = nil
for k in pairs(this.queue) do
this.queue[k] = nil
end
if ( this.refresh and this.refresh[1] and this.refresh[2] and this.refresh[3] and this.refresh[4] ) then
AtlasLoot_ShowItemsFrame(this.refresh[1], this.refresh[2], this.refresh[3], this.refresh[4])
end
end
end
--[[ --[[
AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame): AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame):
dataID - Name of the loot table dataID - Name of the loot table
@@ -960,6 +984,10 @@ This fuction is not normally called directly, it is usually invoked by AtlasLoot
It is the workhorse of the mod and allows the loot tables to be displayed any way anywhere in any mod. It is the workhorse of the mod and allows the loot tables to be displayed any way anywhere in any mod.
]] ]]
function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame) function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
AtlasLootItemsFrame.refreshTime = nil
if ( AtlasLootItemsFrameContainer:IsShown() and AtlasLootItemsFrame.refresh and dataID ~= AtlasLootItemsFrame.refresh[1] ) then
AtlasLootItemsFrameContainer:Hide()
end
-- Set up local variables needed for GetItemInfo, etc -- Set up local variables needed for GetItemInfo, etc
local iconFrame, nameFrame, extraFrame, itemButton; local iconFrame, nameFrame, extraFrame, itemButton;
local text, extra; local text, extra;
@@ -1075,7 +1103,7 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
elseif ( dataID == "JEWELCRAFTMENU" ) then elseif ( dataID == "JEWELCRAFTMENU" ) then
AtlasLoot_JewelcraftingMenu(); AtlasLoot_JewelcraftingMenu();
else else
AtlasLoot_QueryLootPage() -- AtlasLoot_QueryLootPage()
-- Iterate through each item object and set its properties -- Iterate through each item object and set its properties
for i = 1, 30, 1 do for i = 1, 30, 1 do
-- Check for a valid object (that it exists, and that it has a name) -- Check for a valid object (that it exists, and that it has a name)
@@ -1093,46 +1121,96 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
isEnchant = false; isEnchant = false;
isSpell = false; isSpell = false;
end end
local quantityFrame
if ( isItem ) then if ( isItem ) then
local itemID = dataSource[dataID][i][1] local itemID = tonumber(dataSource[dataID][i][1])
local itemName, _, itemQuality = GetItemInfo(itemID); local itemName, _, itemQuality = GetItemInfo(itemID);
-- If the client has the name of the item in cache, use that instead. -- If the client has the name of the item in cache, use that instead.
-- This is poor man's localisation, English is replaced be whatever is needed -- This is poor man's localisation, English is replaced be whatever is needed
if ( GetItemInfo(itemID) ) then if ( itemName ) then
local _, _, _, itemColor = GetItemQualityColor(itemQuality); local _, _, _, itemColor = GetItemQualityColor(itemQuality);
text = itemColor..itemName; text = itemColor..itemName;
else else
text = dataSource[dataID][i][3]; if ( itemID and itemID ~= 0 ) then
text = AtlasLoot_FixText(text); GameTooltip:SetHyperlink("item:"..itemID)
AtlasLootItemsFrame.refreshTime = refreshTimeout
AtlasLootItemsFrame.queue[itemID] = true
end end
quantityFrame = _G["AtlasLootItem_"..i.."_Quantity"]; text = AtlasLoot_FixText(dataSource[dataID][i][3]);
quantityFrame:SetText("") end
_G["AtlasLootItem_"..i.."_Quantity"]:SetText("")
elseif ( isEnchant ) then elseif ( isEnchant ) then
local spellID = tonumber(string.sub(dataSource[dataID][i][1], 2)) local spellID = tonumber(string.sub(dataSource[dataID][i][1], 2))
local craftItem = tonumber(GetSpellInfoAtlasLootDB["enchants"][spellID]["item"])
if ( SpellInfo ) then
spellName = SpellInfo(spellID)
else
if ( spellID and spellID ~= 0 ) then
GameTooltip:SetOwner(WorldFrame, "ANCHOR_NONE")
GameTooltip:SetHyperlink("enchant:"..spellID)
spellName = GameTooltipTextLeft1:GetText()
GameTooltip:Hide()
end
if ( not (spellName and spellName ~= "") ) then
spellName = GetSpellInfoAtlasLootDB["enchants"][spellID]["name"] spellName = GetSpellInfoAtlasLootDB["enchants"][spellID]["name"]
end
end
spellIcon = dataSource[dataID][i][2] spellIcon = dataSource[dataID][i][2]
text = AtlasLoot_FixText(string.sub(dataSource[dataID][i][3], 1, 4)..spellName) if ( craftItem ) then
quantityFrame = _G["AtlasLootItem_"..i.."_Quantity"]; local color, quality
quantityFrame:SetText("") text, _, quality = GetItemInfo(craftItem)
if ( not text ) then
if ( craftItem and craftItem ~= 0 ) then
GameTooltip:SetHyperlink("item:"..craftItem)
AtlasLootItemsFrame.refreshTime = refreshTimeout
AtlasLootItemsFrame.queue[craftItem] = true
end
text = AtlasLoot_FixText(spellName);
end
if ( quality ) then
_, _, _, color = GetItemQualityColor(quality)
text = color..(text or "")
end
else
text = spellName
end
_G["AtlasLootItem_"..i.."_Quantity"]:SetText("")
elseif ( isSpell ) then elseif ( isSpell ) then
spellName = dataSource[dataID][i][3]
spellIcon = dataSource[dataID][i][2]
local spellID = tonumber(string.sub(dataSource[dataID][i][1], 2)) local spellID = tonumber(string.sub(dataSource[dataID][i][1], 2))
text = AtlasLoot_FixText(spellName) local craftItem = tonumber(GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"])
if ( SpellInfo ) then
spellName = SpellInfo(spellID)
else
spellName = GetSpellInfoAtlasLootDB["craftspells"][spellID]["name"]
end
spellIcon = dataSource[dataID][i][2]
if ( craftItem ) then
local color, quality
text, _, quality = GetItemInfo(craftItem)
if ( not text ) then
if ( craftItem ~= 0 ) then
GameTooltip:SetHyperlink("item:"..craftItem)
text = AtlasLoot_FixText(spellName);
AtlasLootItemsFrame.refreshTime = refreshTimeout
AtlasLootItemsFrame.queue[craftItem] = true
end
end
if ( quality ) then
_, _, _, color = GetItemQualityColor(quality)
text = color..(text or "")
end
else
text = spellName
end
local qtyMin = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftQuantityMin"]; local qtyMin = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftQuantityMin"];
local qtyMax = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftQuantityMax"]; local qtyMax = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftQuantityMax"];
if ( qtyMin and qtyMin ~= "" ) then if ( qtyMin and qtyMin ~= "" ) then
if ( qtyMax and qtyMax ~= "" ) then if ( qtyMax and qtyMax ~= "" ) then
quantityFrame = _G["AtlasLootItem_"..i.."_Quantity"]; _G["AtlasLootItem_"..i.."_Quantity"]:SetText(qtyMin.. "-"..qtyMax)
quantityFrame:SetText(qtyMin.. "-"..qtyMax)
else else
quantityFrame = _G["AtlasLootItem_"..i.."_Quantity"]; _G["AtlasLootItem_"..i.."_Quantity"]:SetText(qtyMin)
quantityFrame:SetText(qtyMin)
end end
else else
quantityFrame = _G["AtlasLootItem_"..i.."_Quantity"]; _G["AtlasLootItem_"..i.."_Quantity"]:SetText("")
quantityFrame:SetText("")
end end
end end
-- This is a valid QuickLook, so show the UI objects -- This is a valid QuickLook, so show the UI objects
@@ -1150,39 +1228,27 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
nameFrame = _G["AtlasLootItem_"..i.."_Name"]; nameFrame = _G["AtlasLootItem_"..i.."_Name"];
extraFrame = _G["AtlasLootItem_"..i.."_Extra"]; extraFrame = _G["AtlasLootItem_"..i.."_Extra"];
local border = _G["AtlasLootItem_"..i.."Border"] local border = _G["AtlasLootItem_"..i.."Border"]
local pricetext1 = _G["AtlasLootItem_"..i.."_PriceText1"]; local iconData = dataSource[dataID][i][2]
local pricetext2 = _G["AtlasLootItem_"..i.."_PriceText2"];
local pricetext3 = _G["AtlasLootItem_"..i.."_PriceText3"];
local pricetext4 = _G["AtlasLootItem_"..i.."_PriceText4"];
local pricetext5 = _G["AtlasLootItem_"..i.."_PriceText5"];
local priceicon1 = _G["AtlasLootItem_"..i.."_PriceIcon1"];
local priceicon2 = _G["AtlasLootItem_"..i.."_PriceIcon2"];
local priceicon3 = _G["AtlasLootItem_"..i.."_PriceIcon3"];
local priceicon4 = _G["AtlasLootItem_"..i.."_PriceIcon4"];
local priceicon5 = _G["AtlasLootItem_"..i.."_PriceIcon5"];
-- If there is no data on the texture an item should have, show a big red question mark -- If there is no data on the texture an item should have, show a big red question mark
if ( dataSource[dataID][i][2] == "?" ) then if ( iconData == "?" ) then
iconFrame:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark"); iconFrame:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark");
elseif ( dataSource[dataID][i][2] == "" ) then elseif ( iconData == "" ) then
local _, _, _, _, _, _, _, _, itemTexture1 = GetItemInfo(dataSource[dataID][i][1]) local _, _, _, _, _, _, _, _, itemTexture1 = GetItemInfo(dataSource[dataID][i][1])
iconFrame:SetTexture(itemTexture1); iconFrame:SetTexture(itemTexture1);
elseif ( not isItem and spellIcon ) then elseif ( not isItem and spellIcon ) then
if ( type(dataSource[dataID][i][2]) == "number" ) then if ( type(iconData) == "number" ) then
local _, _, _, _, _, _, _, _, itemTexture2 = GetItemInfo(dataSource[dataID][i][2]) local _, _, _, _, _, _, _, _, itemTexture2 = GetItemInfo(iconData)
iconFrame:SetTexture(itemTexture2); iconFrame:SetTexture(itemTexture2);
elseif ( type(dataSource[dataID][i][2]) == "string" ) then elseif ( type(iconData) == "string" ) then
iconFrame:SetTexture("Interface\\Icons\\"..dataSource[dataID][i][2]); iconFrame:SetTexture("Interface\\Icons\\"..iconData);
else else
iconFrame:SetTexture(spellIcon); iconFrame:SetTexture(spellIcon);
end end
else elseif ( strfind(iconData, "^CLASS") ) then
-- else show the texture local class = gsub(iconData, "CLASS", "")
if ( strfind(dataSource[dataID][i][2], "^CLASS") ) then
local class = gsub(dataSource[dataID][i][2], "CLASS", "")
iconFrame:SetTexture("Interface\\AddOns\\AtlasLoot\\Images\\"..class) iconFrame:SetTexture("Interface\\AddOns\\AtlasLoot\\Images\\"..class)
else else
iconFrame:SetTexture("Interface\\Icons\\"..dataSource[dataID][i][2]); iconFrame:SetTexture("Interface\\Icons\\"..iconData);
end
end end
if ( iconFrame:GetTexture() == nil ) then if ( iconFrame:GetTexture() == nil ) then
iconFrame:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark"); iconFrame:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark");
@@ -1191,60 +1257,21 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
nameFrame:SetText(text); nameFrame:SetText(text);
extraFrame:SetText(extra); extraFrame:SetText(extra);
extraFrame:Show(); extraFrame:Show();
pricetext1:Hide(); for j = 1, 5 do
pricetext2:Hide(); _G["AtlasLootItem_"..i.."_PriceText"..j]:Hide();
pricetext3:Hide(); _G["AtlasLootItem_"..i.."_PriceIcon"..j]:Hide();
pricetext4:Hide();
pricetext5:Hide();
priceicon1:Hide();
priceicon2:Hide();
priceicon3:Hide();
priceicon4:Hide();
priceicon5:Hide();
if ( dataSource[dataID][i][6] ) then
if ( dataSource[dataID][i][6] ~= "" ) then
pricetext1:SetText(dataSource[dataID][i][6]);
priceicon1:SetTexture(AtlasLoot_FixText(dataSource[dataID][i][7]));
extraFrame:Show();
pricetext1:Show();
priceicon1:Show();
end end
local index = 1
for j = 6, 14, 2 do
local pricetext = _G["AtlasLootItem_"..i.."_PriceText"..index]
local priceicon = _G["AtlasLootItem_"..i.."_PriceIcon"..index]
if ( dataSource[dataID][i][j] and dataSource[dataID][i][j] ~= "" ) then
pricetext:SetText(dataSource[dataID][i][j])
priceicon:SetTexture(AtlasLoot_FixText(dataSource[dataID][i][j + 1]))
pricetext:Show()
priceicon:Show()
end end
if ( dataSource[dataID][i][8] ) then index = index + 1
if ( dataSource[dataID][i][8] ~= "" ) then
pricetext2:SetText(dataSource[dataID][i][8]);
priceicon2:SetTexture(AtlasLoot_FixText(dataSource[dataID][i][9]));
extraFrame:Show();
pricetext2:Show();
priceicon2:Show();
end
end
if ( dataSource[dataID][i][10] ) then
if ( dataSource[dataID][i][10] ~= "" ) then
pricetext3:SetText(dataSource[dataID][i][10]);
priceicon3:SetTexture(AtlasLoot_FixText(dataSource[dataID][i][11]));
extraFrame:Show();
pricetext3:Show();
priceicon3:Show();
end
end
if ( dataSource[dataID][i][12] ) then
if ( dataSource[dataID][i][12] ~= "" ) then
pricetext4:SetText(dataSource[dataID][i][12]);
priceicon4:SetTexture(AtlasLoot_FixText(dataSource[dataID][i][13]));
extraFrame:Show();
pricetext4:Show();
priceicon4:Show();
end
end
if ( dataSource[dataID][i][14] ) then
if ( dataSource[dataID][i][14] ~= "" ) then
pricetext5:SetText(dataSource[dataID][i][14]);
priceicon5:SetTexture(AtlasLoot_FixText(dataSource[dataID][i][15]));
extraFrame:Show();
pricetext5:Show();
priceicon5:Show();
end
end end
-- Set prices for items, up to 5 different currencies can be used in combination -- Set prices for items, up to 5 different currencies can be used in combination
if ( (dataID == "SearchResult" or dataID == "WishList") and dataSource[dataID][i][5] ) then if ( (dataID == "SearchResult" or dataID == "WishList") and dataSource[dataID][i][5] ) then
@@ -1253,50 +1280,17 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
if ( wishDataID and AtlasLoot_IsLootTableAvailable(wishDataID) ) then if ( wishDataID and AtlasLoot_IsLootTableAvailable(wishDataID) ) then
for _, v in ipairs(AtlasLoot_Data[wishDataSource][wishDataID]) do for _, v in ipairs(AtlasLoot_Data[wishDataSource][wishDataID]) do
if ( dataSource[dataID][i][1] == v[1] ) then if ( dataSource[dataID][i][1] == v[1] ) then
if ( v[6] ) then index = 1
if ( v[6] ~= "" ) then for j = 6, 14, 2 do
pricetext1:SetText(v[6]); local pricetext = _G["AtlasLootItem_"..i.."_PriceText"..index]
priceicon1:SetTexture(AtlasLoot_FixText(v[7])); local priceicon = _G["AtlasLootItem_"..i.."_PriceIcon"..index]
extraFrame:Show(); if ( v[j] and v[j] ~= "" ) then
pricetext1:Show(); pricetext:SetText(v[j])
priceicon1:Show(); priceicon:SetTexture(AtlasLoot_FixText(v[j + 1]))
end pricetext:Show()
end priceicon:Show()
if ( v[8] ) then
if ( v[8] ~= "" ) then
pricetext2:SetText(v[8]);
priceicon2:SetTexture(AtlasLoot_FixText(v[9]));
extraFrame:Show();
pricetext2:Show();
priceicon2:Show();
end
end
if ( v[10] ) then
if ( v[10] ~= "" ) then
pricetext3:SetText(v[10]);
priceicon3:SetTexture(AtlasLoot_FixText(v[11]));
extraFrame:Show();
pricetext3:Show();
priceicon3:Show();
end
end
if ( v[12] ) then
if ( v[12] ~= "" ) then
pricetext4:SetText(v[12]);
priceicon4:SetTexture(AtlasLoot_FixText(v[13]));
extraFrame:Show();
pricetext4:Show();
priceicon4:Show();
end
end
if ( v[14] ) then
if ( v[14] ~= "" ) then
pricetext5:SetText(v[14]);
priceicon5:SetTexture(AtlasLoot_FixText(v[15]));
extraFrame:Show();
pricetext5:Show();
priceicon5:Show();
end end
index = index + 1
end end
break; break;
end end
@@ -1325,49 +1319,37 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
itemButton.itemIDName = dataSource[dataID][i][3]; itemButton.itemIDName = dataSource[dataID][i][3];
itemButton.itemIDExtra = dataSource[dataID][i][4]; itemButton.itemIDExtra = dataSource[dataID][i][4];
itemButton.container = dataSource[dataID][i][16] itemButton.container = dataSource[dataID][i][16]
if ( itemButton.container ) then if ( type(itemButton.container) == "table" ) then
border:Show() border:Show()
for row = 1, getn(itemButton.container) do
for item = 1, getn(itemButton.container[row]) do
AtlasLoot_CacheItem(itemButton.container[row][item][1])
end
end
else else
border:Hide() border:Hide()
end end
local spellID
if ( isItem ) then if ( isItem ) then
itemButton.dressingroomID = dataSource[dataID][i][1]; itemButton.dressingroomID = dataSource[dataID][i][1];
elseif ( isEnchant ) then elseif ( isEnchant ) then
spellID = tonumber(string.sub(dataSource[dataID][i][1], 2)); local spellID = tonumber(string.sub(dataSource[dataID][i][1], 2));
local craftItem = GetSpellInfoAtlasLootDB["enchants"][spellID]["item"] local craftItem = GetSpellInfoAtlasLootDB["enchants"][spellID]["item"]
if ( craftItem and craftItem ~= "" ) then if ( craftItem and craftItem ~= "" ) then
itemButton.dressingroomID = craftItem; itemButton.dressingroomID = craftItem;
if ( not GetItemInfo(craftItem) ) then
GameTooltip:SetHyperlink("item:"..craftItem..":0:0:0");
end
else else
itemButton.dressingroomID = spellID; itemButton.dressingroomID = spellID;
end end
elseif ( isSpell ) then elseif ( isSpell ) then
spellID = tonumber(string.sub(dataSource[dataID][i][1], 2)); local spellID = tonumber(string.sub(dataSource[dataID][i][1], 2));
local craftItem = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"] local craftItem = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"]
itemButton.dressingroomID = craftItem; itemButton.dressingroomID = craftItem;
if ( craftItem and craftItem ~= "" ) then
if ( not GetItemInfo(craftItem) ) then
GameTooltip:SetHyperlink("item:"..craftItem..":0:0:0");
end
end
local reagents = GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"] local reagents = GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"]
if ( type(reagents) == "table" ) then if ( type(reagents) == "table" ) then
for j = 1, table.getn(reagents) do for j = 1, table.getn(reagents) do
local reagent = GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"][j] local reagent = GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"][j]
if ( not GetItemInfo(reagent[1]) ) then if ( not GetItemInfo(reagent[1]) ) then
GameTooltip:SetHyperlink("item:"..reagent[1]..":0:0:0"); GameTooltip:SetHyperlink("item:"..reagent[1]);
end
end
end
local tools = GetSpellInfoAtlasLootDB["craftspells"][spellID]["tools"]
if ( type(tools) == "table" ) then
for j = 1, table.getn(tools) do
local tool = GetSpellInfoAtlasLootDB["craftspells"][spellID]["tools"][j]
if ( not GetItemInfo(tool) ) then
GameTooltip:SetHyperlink("item:"..tool..":0:0:0");
end end
end end
end end
@@ -1430,14 +1412,17 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
end end
-- Hide navigation buttons if we click Quicklooks in Atlas -- Hide navigation buttons if we click Quicklooks in Atlas
if ( AtlasFrame and AtlasFrame:IsVisible() ) then if ( AtlasFrame and AtlasFrame:IsVisible() ) then
if ( this.sourcePage ) then local sourceKey
local _, _, dataSource = strfind(this.sourcePage, ".+|(.+)") for k, v in pairs(AtlasLoot_Data) do
if ( dataSource == "AtlasLootItems" ) then if ( v == dataSource ) then
sourceKey = k
end
end
if ( sourceKey == "AtlasLootItems" ) then
AtlasLootItemsFrame_BACK:Hide() AtlasLootItemsFrame_BACK:Hide()
AtlasLootItemsFrame_NEXT:Hide() AtlasLootItemsFrame_NEXT:Hide()
AtlasLootItemsFrame_PREV:Hide() AtlasLootItemsFrame_PREV:Hide()
end end
end
for i = 1, 4 do for i = 1, 4 do
if ( AtlasLootCharDB["QuickLooks"][i] and dataID == AtlasLootCharDB["QuickLooks"][i][1] ) then if ( AtlasLootCharDB["QuickLooks"][i] and dataID == AtlasLootCharDB["QuickLooks"][i][1] ) then
AtlasLootItemsFrame_BACK:Hide(); AtlasLootItemsFrame_BACK:Hide();
@@ -1500,7 +1485,6 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasLootDefaultFrame", "TOPLEFT", 0, 0); AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasLootDefaultFrame", "TOPLEFT", 0, 0);
end end
AtlasLootItemsFrame:Show(); AtlasLootItemsFrame:Show();
AtlasLootItemsFrameContainer:Hide()
end end
--[[ --[[
@@ -2156,35 +2140,6 @@ function AtlasLootMinimapButton_SetPosition(v)
AtlasLootMinimapButton_UpdatePosition(); AtlasLootMinimapButton_UpdatePosition();
end end
-- function AtlasLoot_Strsplit(delim, str, maxNb, onlyLast)
-- -- Eliminate bad cases...
-- if ( string.find(str, delim) == nil ) then
-- return { str }
-- end
-- if ( maxNb == nil or maxNb < 1 ) then
-- maxNb = 0
-- end
-- local result = {}
-- local pat = "(.-)" .. delim .. "()"
-- local nb = 0
-- local lastPos
-- for part, pos in string.gfind(str, pat) do
-- nb = nb + 1
-- result[nb] = part
-- lastPos = pos
-- if ( nb == maxNb ) then break end
-- end
-- -- Handle the last field
-- if ( nb ~= maxNb ) then
-- result[nb+1] = string.sub(str, lastPos)
-- end
-- if ( onlyLast ) then
-- return result[nb+1]
-- else
-- return result[1], result[2]
-- end
-- end
-- This is a multi-layer table defining the main loot listing. -- This is a multi-layer table defining the main loot listing.
-- Entries have the text to display, loot table or sub table to link to and if the link is to a loot table or sub table -- Entries have the text to display, loot table or sub table to link to and if the link is to a loot table or sub table
AtlasLoot_HewdropDown = { AtlasLoot_HewdropDown = {
@@ -2945,6 +2900,7 @@ AtlasLoot_HewdropDown_SubTables = {
-- Item OnEnter -- Item OnEnter
-- Called when a loot item is moused over -- Called when a loot item is moused over
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
local stringArgs = {}
local messageShown = false local messageShown = false
function AtlasLootItem_OnEnter() function AtlasLootItem_OnEnter()
local isItem, isEnchant, isSpell; local isItem, isEnchant, isSpell;
@@ -2955,7 +2911,9 @@ function AtlasLootItem_OnEnter()
_G["AtlasLootTooltipTextRight"..i]:SetText(""); _G["AtlasLootTooltipTextRight"..i]:SetText("");
end end
end end
if ( this.itemID and this.itemID ~= 0 ) then if ( not ( this.itemID and this.itemID ~= 0 ) ) then
return
end
if ( string.sub(this.itemID, 1, 1) == "s" ) then if ( string.sub(this.itemID, 1, 1) == "s" ) then
isItem = false; isItem = false;
isEnchant = false; isEnchant = false;
@@ -3021,24 +2979,26 @@ function AtlasLootItem_OnEnter()
GameTooltip:Show(); GameTooltip:Show();
-- Default game tooltips -- Default game tooltips
else else
if ( this.itemID ) then if ( not this.itemID ) then
return
end
AtlasLootTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
if ( GetItemInfo(this.itemID) ) then if ( GetItemInfo(this.itemID) ) then
_G[this:GetName().."_Unsafe"]:Hide(); _G[this:GetName().."_Unsafe"]:Hide();
AtlasLootTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
AtlasLootTooltip:SetHyperlink("item:"..this.itemID..":0:0:0"); AtlasLootTooltip:SetHyperlink("item:"..this.itemID..":0:0:0");
else
-- AtlasLoot_QueryLootPage()
AtlasLootTooltip:SetText(AL["Retrieving item information"], RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b)
_G["AtlasLootItem_"..buttonID.."_Unsafe"]:Hide();
end
if ( AtlasLootCharDB.ItemIDs ) then if ( AtlasLootCharDB.ItemIDs ) then
AtlasLootTooltip:AddLine(AL["ItemID:"].." "..this.itemID, nil, nil, nil, 1); AtlasLootTooltip:AddLine(AL["ItemID:"].." "..this.itemID, nil, nil, nil, 1);
end end
if ( this.droprate ) then if ( this.droprate ) then
AtlasLootTooltip:AddLine(AL["Drop Rate: "]..this.droprate, 1, 1, 0); AtlasLootTooltip:AddLine(AL["Drop Rate: "]..this.droprate, 1, 1, 0);
end end
else
AtlasLoot_QueryLootPage()
_G["AtlasLootItem_"..buttonID.."_Unsafe"]:Hide();
end
AtlasLootTooltip:Show(); AtlasLootTooltip:Show();
end end
end
elseif ( isEnchant ) then elseif ( isEnchant ) then
local spellID = tonumber(string.sub(this.itemID, 2)); local spellID = tonumber(string.sub(this.itemID, 2));
AtlasLootTooltip:SetOwner(this, "ANCHOR_NONE"); AtlasLootTooltip:SetOwner(this, "ANCHOR_NONE");
@@ -3067,15 +3027,21 @@ function AtlasLootItem_OnEnter()
AtlasLootTooltip:AddLine(AL["SpellID:"].." "..spellID, nil, nil, nil, 1); AtlasLootTooltip:AddLine(AL["SpellID:"].." "..spellID, nil, nil, nil, 1);
end end
AtlasLootTooltip:Show(); AtlasLootTooltip:Show();
local item = GetSpellInfoAtlasLootDB["enchants"][spellID]["item"] local item = tonumber(GetSpellInfoAtlasLootDB["enchants"][spellID]["item"])
local extra = GetSpellInfoAtlasLootDB["enchants"][spellID]["extra"] local extra = GetSpellInfoAtlasLootDB["enchants"][spellID]["extra"]
if ( item and item ~= "" ) then if ( not ( item and item ~= 0 ) ) then
return
end
AtlasLootTooltip2:SetOwner(this, "ANCHOR_NONE"); AtlasLootTooltip2:SetOwner(this, "ANCHOR_NONE");
AtlasLootTooltip2:SetPoint("TOPLEFT", AtlasLootTooltip, "BOTTOMLEFT", 0, 0) AtlasLootTooltip2:SetPoint("TOPLEFT", AtlasLootTooltip, "BOTTOMLEFT", 0, 0)
AtlasLootTooltip2:ClearLines(); AtlasLootTooltip2:ClearLines();
AtlasLootTooltip2:SetHyperlink("item:"..item..":0:0:0"); if ( not GetItemInfo(item) ) then
if ( extra and extra ~= "" ) then AtlasLootTooltip2:SetText(AL["Retrieving item information"], RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b)
AtlasLootTooltip2:AddLine(extra, nil, nil, nil, 1); else
AtlasLootTooltip2:SetHyperlink("item:"..item);
if ( extra ) then
AtlasLootTooltip2:AddLine(extra, 1, 1, 1, 1);
end
end end
if ( AtlasLootCharDB.ItemIDs ) then if ( AtlasLootCharDB.ItemIDs ) then
AtlasLootTooltip2:AddLine(AL["ItemID:"].." "..item, nil, nil, nil, 1); AtlasLootTooltip2:AddLine(AL["ItemID:"].." "..item, nil, nil, nil, 1);
@@ -3090,13 +3056,12 @@ function AtlasLootItem_OnEnter()
AtlasLootTooltip:ClearAllPoints() AtlasLootTooltip:ClearAllPoints()
AtlasLootTooltip:SetPoint("BOTTOMLEFT", AtlasLootTooltip2, "TOPLEFT", 0, 0) AtlasLootTooltip:SetPoint("BOTTOMLEFT", AtlasLootTooltip2, "TOPLEFT", 0, 0)
end end
end
elseif ( isSpell ) then elseif ( isSpell ) then
local spellID = tonumber(string.sub(this.itemID, 2)); local spellID = tonumber(string.sub(this.itemID, 2));
AtlasLootTooltip:SetOwner(this, "ANCHOR_NONE"); AtlasLootTooltip:SetOwner(this, "ANCHOR_NONE");
AtlasLootTooltip:SetPoint("BOTTOMLEFT", this, "TOPRIGHT", -(this:GetWidth() / 2), 24) AtlasLootTooltip:SetPoint("BOTTOMLEFT", this, "TOPRIGHT", -(this:GetWidth() / 2), 24)
AtlasLootTooltip:ClearLines(); AtlasLootTooltip:ClearLines();
if ( spellID < 100000 ) then if ( SpellInfo ) then
AtlasLootTooltip:SetHyperlink("enchant:"..spellID) AtlasLootTooltip:SetHyperlink("enchant:"..spellID)
local _, _, longCooldown = strfind(AtlasLootTooltipTextRight2:GetText() or "", gsub(SPELL_RECAST_TIME_MIN, "%%%.3g", "(.+)")) local _, _, longCooldown = strfind(AtlasLootTooltipTextRight2:GetText() or "", gsub(SPELL_RECAST_TIME_MIN, "%%%.3g", "(.+)"))
if ( longCooldown and strfind(longCooldown, "e%+") ) then if ( longCooldown and strfind(longCooldown, "e%+") ) then
@@ -3108,20 +3073,90 @@ function AtlasLootItem_OnEnter()
end end
AtlasLootTooltipTextRight2:SetText(longCooldown) AtlasLootTooltipTextRight2:SetText(longCooldown)
end end
else
local name = GetSpellInfoAtlasLootDB["craftspells"][spellID]["name"]
local castTime = GetSpellInfoAtlasLootDB["craftspells"][spellID]["castTime"]
local cooldown = GetSpellInfoAtlasLootDB["craftspells"][spellID]["cooldown"]
local tools = GetSpellInfoAtlasLootDB["craftspells"][spellID]["tools"]
local reagents = GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"]
local text = GetSpellInfoAtlasLootDB["craftspells"][spellID]["text"]
AtlasLootTooltip:SetText(name, 1, 1, 1, 1, false)
if ( castTime < 60 ) then
castTime = format(SPELL_CAST_TIME_SEC, castTime)
else
castTime = format(SPELL_CAST_TIME_MIN, castTime / 60)
end
if ( cooldown ) then
if ( cooldown < 86400 ) then
if ( cooldown < 60 ) then
cooldown = format(SPELL_RECAST_TIME_SEC, cooldown)
else
cooldown = format(SPELL_RECAST_TIME_MIN, cooldown / 60)
end
elseif ( cooldown / 60 / 60 / 24 == 1 ) then
cooldown = format(AL.DAYS_COOLDOWN_1, cooldown / 60 / 60 / 24)
else
cooldown = format(AL.DAYS_COOLDOWN, cooldown / 60 / 60 / 24)
end
AtlasLootTooltip:AddDoubleLine(castTime, cooldown, 1, 1, 1, 1, 1, 1)
else
AtlasLootTooltip:AddLine(castTime, 1, 1, 1)
end
if ( type(tools) == "table" ) then
for i = getn(stringArgs), 1, -1 do
tremove(stringArgs, i)
end
for j = 1, getn(tools) do
if ( AtlasLoot_CacheItem(tools[j]) == false ) then
AtlasLootItemsFrame.refreshTime = refreshTimeout
AtlasLootItemsFrame.queue[tools[j]] = true
end
tinsert(stringArgs, (GetItemInfo(tools[j]) or ""))
tinsert(stringArgs, AtlasLoot_CheckBagsForItems(tools[j]))
end
AtlasLootTooltip:AddLine(SPELL_TOTEMS..BuildColoredListString(unpack(stringArgs)), 1, 1, 1, false)
end
if ( type(reagents) == "table" ) then
for i = getn(stringArgs), 1, -1 do
tremove(stringArgs, i)
end
for j = 1, getn(reagents) do
if ( reagents[j][2] and reagents[j][2] > 1 ) then
if ( AtlasLoot_CacheItem(reagents[j][1]) == false ) then
AtlasLootItemsFrame.refreshTime = refreshTimeout
AtlasLootItemsFrame.queue[reagents[j][1]] = true
end
tinsert(stringArgs, ((GetItemInfo(reagents[j][1])) or "").." ("..reagents[j][2]..")")
else
tinsert(stringArgs, ((GetItemInfo(reagents[j][1])) or ""))
end
tinsert(stringArgs, AtlasLoot_CheckBagsForItems(reagents[j][1], reagents[j][2]))
end
AtlasLootTooltip:AddLine(SPELL_REAGENTS..BuildColoredListString(unpack(stringArgs)), 1, 1, 1, true)
end
if ( text ) then
AtlasLootTooltip:AddLine(text, 1, 0.82, 0, true)
end
end end
if ( AtlasLootCharDB.ItemIDs ) then if ( AtlasLootCharDB.ItemIDs ) then
AtlasLootTooltip:AddLine(AL["SpellID:"].." "..spellID, nil, nil, nil, 1); AtlasLootTooltip:AddLine(AL["SpellID:"].." "..spellID, nil, nil, nil, 1);
end end
AtlasLootTooltip:Show(); AtlasLootTooltip:Show();
local craftItem = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"] local craftItem = tonumber(GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"])
local extra = GetSpellInfoAtlasLootDB["craftspells"][spellID]["extra"] local extra = GetSpellInfoAtlasLootDB["craftspells"][spellID]["extra"]
if ( craftItem and craftItem ~= "" ) then if ( not ( craftItem and craftItem ~= 0 ) ) then
return
end
AtlasLootTooltip2:SetOwner(this, "ANCHOR_NONE"); AtlasLootTooltip2:SetOwner(this, "ANCHOR_NONE");
AtlasLootTooltip2:SetPoint("TOPLEFT", AtlasLootTooltip, "BOTTOMLEFT", 0, 0) AtlasLootTooltip2:SetPoint("TOPLEFT", AtlasLootTooltip, "BOTTOMLEFT", 0, 0)
AtlasLootTooltip2:ClearLines(); AtlasLootTooltip2:ClearLines();
if ( not GetItemInfo(craftItem) ) then
AtlasLootTooltip2:SetText(AL["Retrieving item information"], RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b)
else
AtlasLootTooltip2:SetHyperlink("item:"..craftItem); AtlasLootTooltip2:SetHyperlink("item:"..craftItem);
if ( extra ) then if ( extra ) then
AtlasLootTooltip2:AddLine(extra, nil, nil, nil, 1); AtlasLootTooltip2:AddLine(extra, 1, 1, 1, 1);
end
end end
if ( AtlasLootCharDB.ItemIDs ) then if ( AtlasLootCharDB.ItemIDs ) then
AtlasLootTooltip2:AddLine(AL["ItemID:"].." "..craftItem, nil, nil, nil, 1); AtlasLootTooltip2:AddLine(AL["ItemID:"].." "..craftItem, nil, nil, nil, 1);
@@ -3138,34 +3173,12 @@ function AtlasLootItem_OnEnter()
end end
end end
end end
end
end
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Item OnLeave -- Item OnLeave
-- Called when the mouse cursor leaves a loot item -- Called when the mouse cursor leaves a loot item
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
function AtlasLootItem_OnLeave() function AtlasLootItem_OnLeave()
-- -- Hide the necessary tooltips
-- if ( AtlasLootCharDB.LootlinkTT ) then
-- AtlasLootTooltip:Hide();
-- AtlasLootTooltip2:Hide();
-- elseif ( AtlasLootCharDB.ItemSyncTT ) then
-- if ( GameTooltip:IsVisible() ) then
-- GameTooltip:Hide();
-- AtlasLootTooltip2:Hide();
-- end
-- else
-- if ( this.itemID ) then
-- AtlasLootTooltip:Hide();
-- GameTooltip:Hide();
-- AtlasLootTooltip2:Hide();
-- end
-- end
-- if ( ShoppingTooltip2:IsVisible() or ShoppingTooltip1.IsVisible ) then
-- ShoppingTooltip2:Hide();
-- ShoppingTooltip1:Hide();
-- end
AtlasLootTooltip:Hide(); AtlasLootTooltip:Hide();
AtlasLootTooltip2:Hide(); AtlasLootTooltip2:Hide();
GameTooltip:Hide(); GameTooltip:Hide();
@@ -3179,9 +3192,10 @@ end
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
function AtlasLootItem_OnClick(arg1) function AtlasLootItem_OnClick(arg1)
local isItem, isEnchant, isSpell; local isItem, isEnchant, isSpell;
local color = strsub(_G["AtlasLootItem_"..this:GetID().."_Name"]:GetText(), 1, 10); local _, _, color = strfind(_G["AtlasLootItem_"..this:GetID().."_Name"]:GetText(), "(|cff%x%x%x%x%x%x)");
color = color or NORMAL_FONT_COLOR_CODE
local id = this:GetID(); local id = this:GetID();
local name = strsub(_G["AtlasLootItem_"..this:GetID().."_Name"]:GetText(), 11); local name = _G["AtlasLootItem_"..this:GetID().."_Name"]:GetText();
local _, _, texture = strfind(_G["AtlasLootItem_"..this:GetID().."_Icon"]:GetTexture() or "", ".+\\(.+)$") local _, _, texture = strfind(_G["AtlasLootItem_"..this:GetID().."_Icon"]:GetTexture() or "", ".+\\(.+)$")
texture = texture or "INV_Misc_QuestionMark" texture = texture or "INV_Misc_QuestionMark"
local dataID = AtlasLootItemsFrame.refresh[1] local dataID = AtlasLootItemsFrame.refresh[1]
@@ -3207,7 +3221,7 @@ function AtlasLootItem_OnClick(arg1)
if ( AtlasFrame and AtlasFrame:IsVisible() and arg1 == "RightButton" ) then if ( AtlasFrame and AtlasFrame:IsVisible() and arg1 == "RightButton" ) then
_G["AtlasLootItem_"..id.."_Unsafe"]:Hide(); _G["AtlasLootItem_"..id.."_Unsafe"]:Hide();
elseif ( arg1 == "RightButton" and not itemName and this.itemID ~= 0 ) then elseif ( arg1 == "RightButton" and not itemName and this.itemID ~= 0 ) then
AtlasLootTooltip:SetHyperlink("item:"..this.itemID..":0:0:0"); AtlasLootTooltip:SetHyperlink("item:"..this.itemID);
if ( not AtlasLootCharDB.ItemSpam ) then if ( not AtlasLootCharDB.ItemSpam ) then
DEFAULT_CHAT_FRAME:AddMessage(AL["Server queried for "]..color.."["..name.."]".."|r"..AL[". Right click on any other item to refresh the loot page."]); DEFAULT_CHAT_FRAME:AddMessage(AL["Server queried for "]..color.."["..name.."]".."|r"..AL[". Right click on any other item to refresh the loot page."]);
end end
@@ -3231,9 +3245,9 @@ function AtlasLootItem_OnClick(arg1)
end end
elseif ( AtlasLootCharDB.AllLinks ) then elseif ( AtlasLootCharDB.AllLinks ) then
if ( WIM_EditBoxInFocus ) then if ( WIM_EditBoxInFocus ) then
WIM_EditBoxInFocus:Insert("|"..string.sub(color, 2).."|Hitem:"..this.itemID.."|h["..name.."]|h|r"); WIM_EditBoxInFocus:Insert(color.."|Hitem:"..this.itemID.."|h["..name.."]|h|r");
elseif ( ChatFrameEditBox:IsVisible() ) then elseif ( ChatFrameEditBox:IsVisible() ) then
ChatFrameEditBox:Insert("|"..string.sub(color, 2).."|Hitem:"..this.itemID.."|h["..name.."]|h|r"); ChatFrameEditBox:Insert(color.."|Hitem:"..this.itemID.."|h["..name.."]|h|r");
else else
AtlasLoot_SayItemReagents(this.itemID, color, name) AtlasLoot_SayItemReagents(this.itemID, color, name)
end end
@@ -3267,7 +3281,7 @@ function AtlasLootItem_OnClick(arg1)
end end
elseif ( isEnchant ) then elseif ( isEnchant ) then
if ( IsShiftKeyDown() ) then if ( IsShiftKeyDown() ) then
AtlasLoot_SayItemReagents(this.itemID) AtlasLoot_SayItemReagents(this.itemID, color, name)
elseif ( IsAltKeyDown() and (this.itemID ~= 0) ) then elseif ( IsAltKeyDown() and (this.itemID ~= 0) ) then
if ( dataID == "WishList" ) then if ( dataID == "WishList" ) then
AtlasLoot_DeleteFromWishList(this.itemID); AtlasLoot_DeleteFromWishList(this.itemID);
@@ -3287,46 +3301,22 @@ function AtlasLootItem_OnClick(arg1)
elseif ( isSpell ) then elseif ( isSpell ) then
if ( IsShiftKeyDown() ) then if ( IsShiftKeyDown() ) then
local spellID = tonumber(string.sub(this.itemID, 2)) local spellID = tonumber(string.sub(this.itemID, 2))
local craftitem = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"] local craftitem = tonumber(GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"])
local craftname = GetItemInfo(craftitem or 0) local craftname = GetItemInfo(craftitem or 0)
if ( spellID < 100000 ) then
if ( WIM_EditBoxInFocus ) then if ( WIM_EditBoxInFocus ) then
if ( craftitem and craftitem ~= "" ) then if ( craftitem and craftitem ~= 0 ) then
WIM_EditBoxInFocus:Insert("|"..string.sub(color, 2).."|Hitem:"..craftitem.."|h["..craftname.."]|h|r"); WIM_EditBoxInFocus:Insert(color.."|Hitem:"..craftitem..":0:0:0|h["..craftname.."]|h|r");
else else
WIM_EditBoxInFocus:Insert(name); WIM_EditBoxInFocus:Insert(color.."|Henchant:"..spellID.."|h["..name.."]|h|r");
end end
elseif ( ChatFrameEditBox:IsVisible() ) then elseif ( ChatFrameEditBox:IsVisible() ) then
if ( craftitem and craftitem ~= "" ) then if ( craftitem and craftitem ~= 0 ) then
ChatFrameEditBox:Insert("|"..string.sub(color, 2).."|Hitem:"..craftitem..":0:0:0|h["..craftname.."]|h|r"); -- Fix for Gurky's discord chat bot ChatFrameEditBox:Insert(color.."|Hitem:"..craftitem..":0:0:0|h["..craftname.."]|h|r"); -- Fix for Gurky's discord chat bot
else else
ChatFrameEditBox:Insert(name); ChatFrameEditBox:Insert(color.."|Henchant:"..spellID.."|h["..name.."]|h|r");
end end
else else
AtlasLoot_SayItemReagents(this.itemID) AtlasLoot_SayItemReagents(this.itemID, color, name)
end
else
if ( WIM_EditBoxInFocus ) then
if ( craftitem and craftitem ~= "" ) then
WIM_EditBoxInFocus:Insert(AtlasLoot_GetChatLink(craftItem));
else
WIM_EditBoxInFocus:Insert(name);
end
elseif ( ChatFrameEditBox:IsVisible() ) then
if ( craftitem and craftitem ~= "" ) then
ChatFrameEditBox:Insert(AtlasLoot_GetChatLink(craftItem));
else
ChatFrameEditBox:Insert(name);
end
else
local chatnumber
if ( channel == "WHISPER" ) then
chatnumber = ChatFrameEditBox.tellTarget
elseif ( channel == "CHANNEL" ) then
chatnumber = ChatFrameEditBox.channelTarget
end
SendChatMessage(AtlasLoot_GetChatLink(craftItem), channel, nil, chatnumber);
end
end end
elseif ( IsAltKeyDown() and (this.itemID ~= 0) ) then elseif ( IsAltKeyDown() and (this.itemID ~= 0) ) then
if ( dataID == "WishList" ) then if ( dataID == "WishList" ) then
@@ -3347,34 +3337,35 @@ function AtlasLootItem_OnClick(arg1)
end end
end end
-- retun true if item is cached, false if argument is a valid link or id, but its not cahced yet, nil otherwise
function AtlasLoot_CacheItem(linkOrID) function AtlasLoot_CacheItem(linkOrID)
if ( not linkOrID or linkOrID == 0 ) then if ( not linkOrID or linkOrID == 0 ) then
return false return nil
end end
if ( tonumber(linkOrID )) then if ( tonumber(linkOrID )) then
if ( GetItemInfo(linkOrID) ) then if GetItemInfo(linkOrID) then
return true return true
else else
local item = "item:" .. linkOrID .. ":0:0:0" GameTooltip:SetHyperlink("item:"..linkOrID)
local _, _, itemLink = string.find(item, "(item:%d+:%d+:%d+:%d+)") return false
linkOrID = itemLink
end end
else else
if ( type(linkOrID) ~= "string" ) then if ( type(linkOrID) ~= "string" ) then
return nil
end
local _, _, item = strfind(linkOrID, "(item:%d+:%d+:%d+:%d+)")
if ( item ) then
if ( GetItemInfo(item) ) then
return true
else
GameTooltip:SetHyperlink(item)
return false return false
end end
if ( string.find(linkOrID, "|", 1, true) ) then
local _, _, id = string.find(linkOrID or "", "item:(%d+)")
linkOrID = tonumber(id)
if ( GetItemInfo(linkOrID) ) then
return true
end end
end end
end end
GameTooltip:SetHyperlink(linkOrID)
end
local containerItems = {} local containerItemFrames = {}
local lastSelectedButton local lastSelectedButton
function AtlasLoot_ShowContainerFrame() function AtlasLoot_ShowContainerFrame()
local containerTable = this.container local containerTable = this.container
@@ -3392,8 +3383,7 @@ function AtlasLoot_ShowContainerFrame()
if ( not AtlasLootItemsFrameContainer:IsVisible() and lastSelectedButton == this ) then if ( not AtlasLootItemsFrameContainer:IsVisible() and lastSelectedButton == this ) then
AtlasLootItemsFrameContainer:Show() AtlasLootItemsFrameContainer:Show()
end end
local getn = table.getn for i = 1, getn(containerItemFrames) do
for i =1, getn(containerItems) do
_G["AtlasLootContainerItem"..i]:Hide() _G["AtlasLootContainerItem"..i]:Hide()
end end
local row = 0 local row = 0
@@ -3404,8 +3394,8 @@ function AtlasLoot_ShowContainerFrame()
for i = 1, getn(containerTable) do for i = 1, getn(containerTable) do
col = 0 col = 0
for j = 1, getn(containerTable[i]) do for j = 1, getn(containerTable[i]) do
if ( not containerItems[buttonIndex] ) then if ( not containerItemFrames[buttonIndex] ) then
containerItems[buttonIndex] = CreateFrame("Button", "AtlasLootContainerItem"..buttonIndex, AtlasLootItemsFrameContainer, "AtlasLootContainerItemTemplate") containerItemFrames[buttonIndex] = CreateFrame("Button", "AtlasLootContainerItem"..buttonIndex, AtlasLootItemsFrameContainer, "AtlasLootContainerItemTemplate")
end end
local itemButton = _G["AtlasLootContainerItem"..buttonIndex] local itemButton = _G["AtlasLootContainerItem"..buttonIndex]
local itemID = containerTable[i][j][1] local itemID = containerTable[i][j][1]
@@ -3485,14 +3475,14 @@ function AtlasLoot_ContainerItem_OnClick(arg1)
if ( IsShiftKeyDown() and arg1 == "LeftButton" ) then if ( IsShiftKeyDown() and arg1 == "LeftButton" ) then
if ( AtlasLootCharDB.AllLinks ) then if ( AtlasLootCharDB.AllLinks ) then
if ( WIM_EditBoxInFocus ) then if ( WIM_EditBoxInFocus ) then
WIM_EditBoxInFocus:Insert("|"..string.sub(color, 2).."|Hitem:"..itemID.."|h["..name.."]|h|r"); WIM_EditBoxInFocus:Insert(color.."|Hitem:"..itemID.."|h["..name.."]|h|r");
elseif ( ChatFrameEditBox:IsVisible() ) then elseif ( ChatFrameEditBox:IsVisible() ) then
ChatFrameEditBox:Insert("|"..string.sub(color, 2).."|Hitem:"..itemID.."|h["..name.."]|h|r"); ChatFrameEditBox:Insert(color.."|Hitem:"..itemID.."|h["..name.."]|h|r");
end end
end end
elseif ( IsControlKeyDown() and name ) then elseif ( IsControlKeyDown() and name ) then
DressUpItemLink(link); DressUpItemLink(link);
elseif ( IsAltKeyDown() and (itemID ~= 0) ) then elseif ( IsAltKeyDown() and itemID ~= 0 ) then
if ( lootpage ) then if ( lootpage ) then
AtlasLoot_AddToWishlist(itemID, tex, name, extra, lootpage.."|"..dataSource) AtlasLoot_AddToWishlist(itemID, tex, name, extra, lootpage.."|"..dataSource)
elseif ( AtlasLootItemsFrame.refresh ) then elseif ( AtlasLootItemsFrame.refresh ) then
@@ -3538,29 +3528,21 @@ function AtlasLoot_CheckBagsForItems(id, qty)
if ( not id ) then DEFAULT_CHAT_FRAME:AddMessage("AtlasLoot_CheckBagsForItems: no ID specified!") return end if ( not id ) then DEFAULT_CHAT_FRAME:AddMessage("AtlasLoot_CheckBagsForItems: no ID specified!") return end
if ( not qty ) then qty = 1 end if ( not qty ) then qty = 1 end
local itemsfound = 0; local itemsfound = 0;
if ( not GetItemInfo ) then return RED..AL["Unknown"] end
local itemName = GetItemInfo(id); local itemName = GetItemInfo(id);
if ( not itemName ) then itemName = AL["Uncached"] end if ( not itemName ) then return nil end
for i = 0, NUM_BAG_FRAMES do for i = 0, NUM_BAG_FRAMES do
for j = 1, GetContainerNumSlots(i) do for j = 1, GetContainerNumSlots(i) do
local itemLink = GetContainerItemLink(i, j) local itemLink = GetContainerItemLink(i, j)
if ( itemLink and idFromLink(itemLink) == tonumber(id) ) then if ( itemLink and idFromLink(itemLink) == tonumber(id) ) then
local _, stackCount = GetContainerItemInfo(i, j) local _, stackCount = GetContainerItemInfo(i, j)
itemsfound = itemsfound + stackCount itemsfound = itemsfound + stackCount
if ( itemsfound >= qty ) then end
if ( qty == 1 ) then end
return WHITE..itemName end
if ( itemsfound < qty ) then
return nil
else else
return WHITE..itemName.." ("..qty..")" return 1
end
end
end
end
end
if ( qty == 1 ) then
return RED..itemName
else
return RED..itemName.." ("..qty..")"
end end
end end
@@ -3568,7 +3550,8 @@ function AtlasLoot_SayItemReagents(id, color, name, safe)
if ( not id ) then return end if ( not id ) then return end
local chatline = ""; local chatline = "";
local itemCount = 0; local itemCount = 0;
name = gsub(name, "|cff%x%x%x%x%x%x", "")
color = color or NORMAL_FONT_COLOR_CODE
local tListActivity = {} local tListActivity = {}
local tCount = 0 local tCount = 0
@@ -3594,8 +3577,8 @@ function AtlasLoot_SayItemReagents(id, color, name, safe)
end end
if ( string.sub(id, 1, 1) == "s" ) then if ( string.sub(id, 1, 1) == "s" ) then
local spellID = tonumber(string.sub(id, 2)) local spellID = tonumber(string.sub(id, 2))
local craftItem = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"] local craftItem = tonumber(GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"])
if ( craftItem and craftItem ~= "" ) then if ( craftItem and craftItem ~= 0 ) then
local craftnumber = ""; local craftnumber = "";
local qtyMin = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftQuantityMin"]; local qtyMin = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftQuantityMin"];
local qtyMax = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftQuantityMax"]; local qtyMax = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftQuantityMax"];
@@ -3627,9 +3610,8 @@ function AtlasLoot_SayItemReagents(id, color, name, safe)
SendChatMessage(chatline, channel, nil, chatnumber); SendChatMessage(chatline, channel, nil, chatnumber);
end end
else else
local name = GetSpellInfoAtlasLootDB["craftspells"][spellID]["name"]
local reagents = GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"] local reagents = GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"]
SendChatMessage(AL["To cast "]..name..AL[" the following items are needed:"], channel, nil, chatnumber); SendChatMessage(AL["To cast "]..NORMAL_FONT_COLOR_CODE.."|Henchant:"..spellID.."|h["..name.."]|h|r"..AL[" the following items are needed:"], channel, nil, chatnumber);
if ( type(reagents) == "table" ) then if ( type(reagents) == "table" ) then
for j = 1, table.getn(reagents) do for j = 1, table.getn(reagents) do
local tempnumber = reagents[j][2] local tempnumber = reagents[j][2]
@@ -3651,32 +3633,31 @@ function AtlasLoot_SayItemReagents(id, color, name, safe)
end end
elseif ( string.sub(id, 1, 1) == "e" ) then elseif ( string.sub(id, 1, 1) == "e" ) then
local spellID = tonumber(string.sub(id, 2)) local spellID = tonumber(string.sub(id, 2))
local name = GetSpellInfoAtlasLootDB["enchants"][spellID]["name"] local item = tonumber(GetSpellInfoAtlasLootDB["enchants"][spellID]["item"])
local item = GetSpellInfoAtlasLootDB["enchants"][spellID]["item"]
if ( tListActivity[1] and WIM_Windows[tListActivity[1]].is_visible ) then if ( tListActivity[1] and WIM_Windows[tListActivity[1]].is_visible ) then
if ( not item ) then if ( not item ) then
SendChatMessage("|cffFFd200|Henchant:"..spellID..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber); SendChatMessage(NORMAL_FONT_COLOR_CODE.."|Henchant:"..spellID.."|h["..name.."]|h|r", channel, nil, chatnumber);
else else
SendChatMessage(AL["To craft "]..AtlasLoot_GetChatLink(item)..AL[" you need this: "].."|cffFFd200|Henchant:"..spellID..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber); SendChatMessage(AL["To craft "]..AtlasLoot_GetChatLink(item)..AL[" you need this: "]..NORMAL_FONT_COLOR_CODE.."|Henchant:"..spellID.."|h["..name.."]|h|r", channel, nil, chatnumber);
end end
elseif ( ChatFrameEditBox:IsVisible() ) then elseif ( ChatFrameEditBox:IsVisible() ) then
if ( not item ) then if ( not item ) then
ChatFrameEditBox:Insert("|cffFFd200|Henchant:"..spellID..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber); ChatFrameEditBox:Insert(NORMAL_FONT_COLOR_CODE.."|Henchant:"..spellID.."|h["..name.."]|h|r", channel, nil, chatnumber);
else else
ChatFrameEditBox:Insert(AL["To craft "]..AtlasLoot_GetChatLink(item)..AL[" you need this: "].."|cffFFd200|Henchant:"..spellID..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber); ChatFrameEditBox:Insert(AL["To craft "]..AtlasLoot_GetChatLink(item)..AL[" you need this: "]..NORMAL_FONT_COLOR_CODE.."|Henchant:"..spellID.."|h["..name.."]|h|r", channel, nil, chatnumber);
end end
else else
if ( not item ) then if ( not item ) then
SendChatMessage("|cffFFd200|Henchant:"..spellID..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber); SendChatMessage(color.."|Henchant:"..spellID.."|h["..name.."]|h|r", channel, nil, chatnumber);
else else
SendChatMessage(AL["To craft "]..AtlasLoot_GetChatLink(item)..AL[" you need this: "].."|cffFFd200|Henchant:"..spellID..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber); SendChatMessage(AL["To craft "]..AtlasLoot_GetChatLink(item)..AL[" you need this: "]..NORMAL_FONT_COLOR_CODE.."|Henchant:"..spellID.."|h["..name.."]|h|r", channel, nil, chatnumber);
end end
end end
else else
if ( safe ) then if ( safe ) then
SendChatMessage("["..name.."]", channel, nil, chatnumber); SendChatMessage("["..name.."]", channel, nil, chatnumber);
else else
SendChatMessage("|"..string.sub(color, 2).."|Hitem:"..id..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber); SendChatMessage(color.."|Hitem:"..id..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber);
end end
end end
end end
@@ -3684,8 +3665,7 @@ end
function AtlasLoot_GetChatLink(id) function AtlasLoot_GetChatLink(id)
local itemName, itemLink, quality = GetItemInfo(tonumber(id)) local itemName, itemLink, quality = GetItemInfo(tonumber(id))
local _, _, _, color = GetItemQualityColor(quality) local _, _, _, color = GetItemQualityColor(quality)
color = string.sub(color, 2) return color.."|H"..itemLink.."|h["..itemName.."]|h|r"
return "|"..color.."|H"..itemLink.."|h["..itemName.."]|h|r"
end end
function AtlasLoot_QuickLook_OnClick(id) function AtlasLoot_QuickLook_OnClick(id)
+3 -15
View File
@@ -1,20 +1,5 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/"> <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
<Script file="ButtonRegistry.lua"/>
<Script file="TextParsing.lua"/>
<Script file="Spells.lua"/>
<Script file="Sets.lua"/>
<Script file="Factions.lua"/>
<Script file="WorldEvents.lua"/>
<Script file="PvP.lua"/>
<Script file="Crafting.lua"/>
<Script file="AtlasLoot.lua"/>
<Script file="WishList.lua"/>
<Script file="Search.lua"/>
<Script file="WorldBoss.lua"/>
<Script file="Dungeons.lua"/>
<Script file="Tooltip.lua"/>
<Button name="AtlasLootContainerItemTemplate" virtual="true"> <Button name="AtlasLootContainerItemTemplate" virtual="true">
<Size x="40" y="40"/> <Size x="40" y="40"/>
<Backdrop name="$parentBackdrop" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true"> <Backdrop name="$parentBackdrop" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
@@ -1354,6 +1339,9 @@
<OnEvent> <OnEvent>
AtlasLoot_OnEvent(); AtlasLoot_OnEvent();
</OnEvent> </OnEvent>
<OnUpdate>
AtlasLootItemsFrame_OnUpdate()
</OnUpdate>
<OnMouseWheel> <OnMouseWheel>
if arg1 == 1 and AtlasLootItemsFrame_NEXT:IsVisible() then if arg1 == 1 and AtlasLootItemsFrame_NEXT:IsVisible() then
AtlasLootItemsFrame_NEXT:Click() AtlasLootItemsFrame_NEXT:Click()
+1 -1
View File
@@ -4651,7 +4651,7 @@ AtlasLoot_ButtonRegistry = {
Next_Page = "JewelcraftingOffHands1"; Next_Page = "JewelcraftingOffHands1";
}; };
["JewelcraftingOffHands1"] = { ["JewelcraftingOffHands1"] = {
Title = AL["Jewelcrafting"] .. ": " .. AL["Off-hand"]; Title = AL["Jewelcrafting"] .. ": " .. AL["Off Hand"];
Back_Page = "JEWELCRAFTMENU"; Back_Page = "JEWELCRAFTMENU";
Prev_Page = "JewelcraftingBracers1"; Prev_Page = "JewelcraftingBracers1";
Next_Page = "JewelcraftingStaves1"; Next_Page = "JewelcraftingStaves1";
+1 -1
View File
@@ -947,7 +947,7 @@ function AtlasLoot_JewelcraftingMenu()
AtlasLootMenuItem_11.lootpage="JewelcraftingBracers1"; AtlasLootMenuItem_11.lootpage="JewelcraftingBracers1";
AtlasLootMenuItem_11:Show(); AtlasLootMenuItem_11:Show();
--Offhands --Offhands
AtlasLootMenuItem_12_Name:SetText(AL["Jewelcrafting"]..": "..AL["Off-hand"]); AtlasLootMenuItem_12_Name:SetText(AL["Jewelcrafting"]..": "..AL["Off Hand"]);
AtlasLootMenuItem_12_Extra:SetText(""); AtlasLootMenuItem_12_Extra:SetText("");
AtlasLootMenuItem_12_Icon:SetTexture("Interface\\Icons\\INV_Jewelry_Necklace_01"); AtlasLootMenuItem_12_Icon:SetTexture("Interface\\Icons\\INV_Jewelry_Necklace_01");
AtlasLootMenuItem_12.lootpage="JewelcraftingOffHands1"; AtlasLootMenuItem_12.lootpage="JewelcraftingOffHands1";
+54 -9
View File
@@ -277,8 +277,13 @@ function AtlasLootPRE60SetMenu()
for i = 1, 30 do for i = 1, 30 do
local button = _G["AtlasLootMenuItem_" .. i] local button = _G["AtlasLootMenuItem_" .. i]
button.dataSource = AtlasLoot_GetDataSource(button.lootpage) button.dataSource = AtlasLoot_GetDataSource(button.lootpage)
if button.container then if ( type(button.container) == "table" ) then
_G["AtlasLootMenuItem_"..i.."Border"]:Show() _G["AtlasLootMenuItem_"..i.."Border"]:Show()
for row = 1, getn(button.container) do
for item = 1, getn(button.container[row]) do
AtlasLoot_CacheItem(button.container[row][item][1])
end
end
end end
end end
end end
@@ -372,8 +377,13 @@ function AtlasLootZGSetMenu()
for i = 1, 30 do for i = 1, 30 do
local button = _G["AtlasLootMenuItem_" .. i] local button = _G["AtlasLootMenuItem_" .. i]
button.dataSource = AtlasLoot_GetDataSource(button.lootpage) button.dataSource = AtlasLoot_GetDataSource(button.lootpage)
if button.container then if ( type(button.container) == "table" ) then
_G["AtlasLootMenuItem_"..i.."Border"]:Show() _G["AtlasLootMenuItem_"..i.."Border"]:Show()
for row = 1, getn(button.container) do
for item = 1, getn(button.container[row]) do
AtlasLoot_CacheItem(button.container[row][item][1])
end
end
end end
end end
end end
@@ -446,8 +456,13 @@ function AtlasLootAQ40SetMenu()
for i = 1, 30 do for i = 1, 30 do
local button = _G["AtlasLootMenuItem_" .. i] local button = _G["AtlasLootMenuItem_" .. i]
button.dataSource = AtlasLoot_GetDataSource(button.lootpage) button.dataSource = AtlasLoot_GetDataSource(button.lootpage)
if button.container then if ( type(button.container) == "table" ) then
_G["AtlasLootMenuItem_"..i.."Border"]:Show() _G["AtlasLootMenuItem_"..i.."Border"]:Show()
for row = 1, getn(button.container) do
for item = 1, getn(button.container[row]) do
AtlasLoot_CacheItem(button.container[row][item][1])
end
end
end end
end end
end end
@@ -520,8 +535,13 @@ function AtlasLootAQ20SetMenu()
for i = 1, 30 do for i = 1, 30 do
local button = _G["AtlasLootMenuItem_" .. i] local button = _G["AtlasLootMenuItem_" .. i]
button.dataSource = AtlasLoot_GetDataSource(button.lootpage) button.dataSource = AtlasLoot_GetDataSource(button.lootpage)
if button.container then if ( type(button.container) == "table" ) then
_G["AtlasLootMenuItem_"..i.."Border"]:Show() _G["AtlasLootMenuItem_"..i.."Border"]:Show()
for row = 1, getn(button.container) do
for item = 1, getn(button.container[row]) do
AtlasLoot_CacheItem(button.container[row][item][1])
end
end
end end
end end
end end
@@ -594,8 +614,13 @@ function AtlasLootT0SetMenu()
for i = 1, 30 do for i = 1, 30 do
local button = _G["AtlasLootMenuItem_" .. i] local button = _G["AtlasLootMenuItem_" .. i]
button.dataSource = AtlasLoot_GetDataSource(button.lootpage) button.dataSource = AtlasLoot_GetDataSource(button.lootpage)
if button.container then if ( type(button.container) == "table" ) then
_G["AtlasLootMenuItem_"..i.."Border"]:Show() _G["AtlasLootMenuItem_"..i.."Border"]:Show()
for row = 1, getn(button.container) do
for item = 1, getn(button.container[row]) do
AtlasLoot_CacheItem(button.container[row][item][1])
end
end
end end
end end
end end
@@ -668,8 +693,13 @@ function AtlasLootT1SetMenu()
for i = 1, 30 do for i = 1, 30 do
local button = _G["AtlasLootMenuItem_" .. i] local button = _G["AtlasLootMenuItem_" .. i]
button.dataSource = AtlasLoot_GetDataSource(button.lootpage) button.dataSource = AtlasLoot_GetDataSource(button.lootpage)
if button.container then if ( type(button.container) == "table" ) then
_G["AtlasLootMenuItem_"..i.."Border"]:Show() _G["AtlasLootMenuItem_"..i.."Border"]:Show()
for row = 1, getn(button.container) do
for item = 1, getn(button.container[row]) do
AtlasLoot_CacheItem(button.container[row][item][1])
end
end
end end
end end
end end
@@ -742,8 +772,13 @@ function AtlasLootT2SetMenu()
for i = 1, 30 do for i = 1, 30 do
local button = _G["AtlasLootMenuItem_" .. i] local button = _G["AtlasLootMenuItem_" .. i]
button.dataSource = AtlasLoot_GetDataSource(button.lootpage) button.dataSource = AtlasLoot_GetDataSource(button.lootpage)
if button.container then if ( type(button.container) == "table" ) then
_G["AtlasLootMenuItem_"..i.."Border"]:Show() _G["AtlasLootMenuItem_"..i.."Border"]:Show()
for row = 1, getn(button.container) do
for item = 1, getn(button.container[row]) do
AtlasLoot_CacheItem(button.container[row][item][1])
end
end
end end
end end
end end
@@ -816,8 +851,13 @@ function AtlasLootT3SetMenu()
for i = 1, 30 do for i = 1, 30 do
local button = _G["AtlasLootMenuItem_" .. i] local button = _G["AtlasLootMenuItem_" .. i]
button.dataSource = AtlasLoot_GetDataSource(button.lootpage) button.dataSource = AtlasLoot_GetDataSource(button.lootpage)
if button.container then if ( type(button.container) == "table" ) then
_G["AtlasLootMenuItem_"..i.."Border"]:Show() _G["AtlasLootMenuItem_"..i.."Border"]:Show()
for row = 1, getn(button.container) do
for item = 1, getn(button.container[row]) do
AtlasLoot_CacheItem(button.container[row][item][1])
end
end
end end
end end
end end
@@ -890,8 +930,13 @@ function AtlasLoot_Kara40SetMenu()
for i = 1, 30 do for i = 1, 30 do
local button = _G["AtlasLootMenuItem_" .. i] local button = _G["AtlasLootMenuItem_" .. i]
button.dataSource = AtlasLoot_GetDataSource(button.lootpage) button.dataSource = AtlasLoot_GetDataSource(button.lootpage)
if button.container then if ( type(button.container) == "table" ) then
_G["AtlasLootMenuItem_"..i.."Border"]:Show() _G["AtlasLootMenuItem_"..i.."Border"]:Show()
for row = 1, getn(button.container) do
for item = 1, getn(button.container[row]) do
AtlasLoot_CacheItem(button.container[row][item][1])
end
end
end end
end end
end end
+16617 -14404
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -985,7 +985,7 @@ AtlasLoot_TableNames = {
["JewelcraftingAmulets1"] = { AL["Jewelcrafting"] .. ": " .. AL["Amulets"], "AtlasLootCrafting" }, ["JewelcraftingAmulets1"] = { AL["Jewelcrafting"] .. ": " .. AL["Amulets"], "AtlasLootCrafting" },
["JewelcraftingHelm1"] = { AL["Jewelcrafting"] .. ": " .. AL["Head"], "AtlasLootCrafting" }, ["JewelcraftingHelm1"] = { AL["Jewelcrafting"] .. ": " .. AL["Head"], "AtlasLootCrafting" },
["JewelcraftingBracers1"] = { AL["Jewelcrafting"] .. ": " .. AL["Bracers"], "AtlasLootCrafting" }, ["JewelcraftingBracers1"] = { AL["Jewelcrafting"] .. ": " .. AL["Bracers"], "AtlasLootCrafting" },
["JewelcraftingOffHands1"] = { AL["Jewelcrafting"] .. ": " .. AL["Off-hand"], "AtlasLootCrafting" }, ["JewelcraftingOffHands1"] = { AL["Jewelcrafting"] .. ": " .. AL["Off Hand"], "AtlasLootCrafting" },
["JewelcraftingStaves1"] = { AL["Jewelcrafting"] .. ": " .. AL["Staff"], "AtlasLootCrafting" }, ["JewelcraftingStaves1"] = { AL["Jewelcrafting"] .. ": " .. AL["Staff"], "AtlasLootCrafting" },
["JewelcraftingTrinkets1"] = { AL["Jewelcrafting"] .. ": " .. AL["Trinkets"], "AtlasLootCrafting" }, ["JewelcraftingTrinkets1"] = { AL["Jewelcrafting"] .. ": " .. AL["Trinkets"], "AtlasLootCrafting" },
["JewelcraftingMisc1"] = { AL["Jewelcrafting"] .. ": " .. AL["Misc"], "AtlasLootCrafting" }, ["JewelcraftingMisc1"] = { AL["Jewelcrafting"] .. ": " .. AL["Misc"], "AtlasLootCrafting" },
@@ -2174,7 +2174,7 @@ AtlasLoot_TableNamesBoss = {
["JewelcraftingAmulets1"] = { AL["Jewelcrafting"] .. ": " .. AL["Amulets"], "AtlasLootCrafting" }, ["JewelcraftingAmulets1"] = { AL["Jewelcrafting"] .. ": " .. AL["Amulets"], "AtlasLootCrafting" },
["JewelcraftingHelm1"] = { AL["Jewelcrafting"] .. ": " .. AL["Head"], "AtlasLootCrafting" }, ["JewelcraftingHelm1"] = { AL["Jewelcrafting"] .. ": " .. AL["Head"], "AtlasLootCrafting" },
["JewelcraftingBracers1"] = { AL["Jewelcrafting"] .. ": " .. AL["Bracers"], "AtlasLootCrafting" }, ["JewelcraftingBracers1"] = { AL["Jewelcrafting"] .. ": " .. AL["Bracers"], "AtlasLootCrafting" },
["JewelcraftingOffHands1"] = { AL["Jewelcrafting"] .. ": " .. AL["Off-hand"], "AtlasLootCrafting" }, ["JewelcraftingOffHands1"] = { AL["Jewelcrafting"] .. ": " .. AL["Off Hand"], "AtlasLootCrafting" },
["JewelcraftingStaves1"] = { AL["Jewelcrafting"] .. ": " .. AL["Staff"], "AtlasLootCrafting" }, ["JewelcraftingStaves1"] = { AL["Jewelcrafting"] .. ": " .. AL["Staff"], "AtlasLootCrafting" },
["JewelcraftingTrinkets1"] = { AL["Jewelcrafting"] .. ": " .. AL["Trinkets"], "AtlasLootCrafting" }, ["JewelcraftingTrinkets1"] = { AL["Jewelcrafting"] .. ": " .. AL["Trinkets"], "AtlasLootCrafting" },
["JewelcraftingMisc1"] = { AL["Jewelcrafting"] .. ": " .. AL["Misc"], "AtlasLootCrafting" }, ["JewelcraftingMisc1"] = { AL["Jewelcrafting"] .. ": " .. AL["Misc"], "AtlasLootCrafting" },
-10
View File
@@ -1,10 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
<Script file="locale.en.lua"/>
<Script file="locale.ru.lua"/>
<Script file="locale.de.lua"/>
<Script file="locale.fr.lua"/>
<Script file="locale.cn.lua"/>
<Script file="locale.kr.lua"/>
<Script file="locale.tw.lua"/>
<Script file="locale.es.lua"/>
</Ui>
+1610 -1
View File
File diff suppressed because it is too large Load Diff
+1610 -1
View File
File diff suppressed because it is too large Load Diff
+1653 -47
View File
File diff suppressed because it is too large Load Diff
+1609 -1
View File
File diff suppressed because it is too large Load Diff