This commit is contained in:
@@ -15,16 +15,16 @@ AtlasLoot_Difficulty = {
|
||||
["ClassicDungeonExt"] = {
|
||||
{"Bloodforged", 1},
|
||||
{"Normal", 2},
|
||||
{"Heroic", 3, "=q4="},
|
||||
{"Mythic", 4, "=q4="},
|
||||
{"Mythic 1", 5, "=q4=" }, {"Mythic 2", 6, "=q4=" }, {"Mythic 3", 7, "=q4=" }, {"Mythic 4", 8, "=q4=" }, {"Mythic 5", 9, "=q4=" },
|
||||
{"Mythic 6", 10, "=q4=" }, {"Mythic 7", 11, "=q4=" }, {"Mythic 8", 12, "=q4=" }, {"Mythic 9", 13, "=q4=" }, {"Mythic 10", 14, "=q4=" },
|
||||
{"Mythic 11", 15, "=q4=" }, {"Mythic 12", 16, "=q4=" }, {"Mythic 13", 17, "=q4=" }, {"Mythic 14", 18, "=q4=" }, {"Mythic 15", 19, "=q4=" },
|
||||
{"Mythic 16", 20, "=q4=" }, {"Mythic 17", 21, "=q4=" }, {"Mythic 18", 22, "=q4=" }, {"Mythic 19", 23, "=q4=" }, {"Mythic 20", 24, "=q4=" },
|
||||
{"Mythic 21", 25, "=q4=" }, {"Mythic 22", 26, "=q4=" }, {"Mythic 23", 27, "=q4=" }, {"Mythic 24", 28, "=q4=" }, {"Mythic 25", 29, "=q4=" },
|
||||
{"Mythic 26", 30, "=q4=" }, {"Mythic 27", 31, "=q4=" }, {"Mythic 28", 32, "=q4=" }, {"Mythic 29", 33, "=q4=" }, {"Mythic 30", 34, "=q4=" },
|
||||
{"Mythic 31", 35, "=q4=" }, {"Mythic 32", 36, "=q4=" }, {"Mythic 33", 37, "=q4=" }, {"Mythic 34", 38, "=q4=" }, {"Mythic 35", 39, "=q4=" },
|
||||
{"Mythic 36", 40, "=q4=" }, {"Mythic 37", 41, "=q4=" }, {"Mythic 38", 42, "=q4=" }, {"Mythic 39", 43, "=q4=" }, {"Mythic 40", 44, "=q4=" },
|
||||
{"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 },
|
||||
{"Mythic 11", 15 }, {"Mythic 12", 16 }, {"Mythic 13", 17 }, {"Mythic 14", 18 }, {"Mythic 15", 19 },
|
||||
{"Mythic 16", 20 }, {"Mythic 17", 21 }, {"Mythic 18", 22 }, {"Mythic 19", 23 }, {"Mythic 20", 24 },
|
||||
{"Mythic 21", 25 }, {"Mythic 22", 26 }, {"Mythic 23", 27 }, {"Mythic 24", 28 }, {"Mythic 25", 29 },
|
||||
{"Mythic 26", 30 }, {"Mythic 27", 31 }, {"Mythic 28", 32 }, {"Mythic 29", 33 }, {"Mythic 30", 34 },
|
||||
{"Mythic 31", 35 }, {"Mythic 32", 36 }, {"Mythic 33", 37 }, {"Mythic 34", 38 }, {"Mythic 35", 39 },
|
||||
{"Mythic 36", 40 }, {"Mythic 37", 41 }, {"Mythic 38", 42 }, {"Mythic 39", 43 }, {"Mythic 40", 44 },
|
||||
};
|
||||
|
||||
["ClassicRaid"] = {
|
||||
@@ -37,29 +37,15 @@ AtlasLoot_Difficulty = {
|
||||
["BCDungeon"] = {
|
||||
{"Bloodforged", 1},
|
||||
{"Normal/Heroic", 2},
|
||||
{"Mythic", 4, "=q4="},
|
||||
{"Mythic 1", 5, "=q4=" }, {"Mythic 2", 6, "=q4=" }, {"Mythic 3", 7, "=q4=" }, {"Mythic 4", 8, "=q4=" }, {"Mythic 5", 9, "=q4=" },
|
||||
{"Mythic 6", 10, "=q4=" }, {"Mythic 7", 11, "=q4=" }, {"Mythic 8", 12, "=q4=" }, {"Mythic 9", 13, "=q4=" }, {"Mythic 10", 14, "=q4=" },
|
||||
{"Mythic 11", 15, "=q4=" }, {"Mythic 12", 16, "=q4=" }, {"Mythic 13", 17, "=q4=" }, {"Mythic 14", 18, "=q4=" }, {"Mythic 15", 19, "=q4=" },
|
||||
{"Mythic 16", 20, "=q4=" }, {"Mythic 17", 21, "=q4=" }, {"Mythic 18", 22, "=q4=" }, {"Mythic 19", 23, "=q4=" }, {"Mythic 20", 24, "=q4=" },
|
||||
{"Mythic 21", 25, "=q4=" }, {"Mythic 22", 26, "=q4=" }, {"Mythic 23", 27, "=q4=" }, {"Mythic 24", 28, "=q4=" }, {"Mythic 25", 29, "=q4=" },
|
||||
{"Mythic 26", 30, "=q4=" }, {"Mythic 27", 31, "=q4=" }, {"Mythic 28", 32, "=q4=" }, {"Mythic 29", 33, "=q4=" }, {"Mythic 30", 34, "=q4=" },
|
||||
{"Mythic 31", 35, "=q4=" }, {"Mythic 32", 36, "=q4=" }, {"Mythic 33", 37, "=q4=" }, {"Mythic 34", 38, "=q4=" }, {"Mythic 35", 39, "=q4=" },
|
||||
{"Mythic 36", 40, "=q4=" }, {"Mythic 37", 41, "=q4=" }, {"Mythic 38", 42, "=q4=" }, {"Mythic 39", 43, "=q4=" }, {"Mythic 40", 44, "=q4=" },
|
||||
};
|
||||
|
||||
["D3Set"] = {
|
||||
{"Bloodforged", 1},
|
||||
{"Normal/Heroic", 2},
|
||||
{"Mythic", 4, "=q4="},
|
||||
{"Mythic 1", 5, "=q4=" }, {"Mythic 2", 6, "=q4=" }, {"Mythic 3", 7, "=q4=" }, {"Mythic 4", 8, "=q4=" }, {"Mythic 5", 9, "=q4=" },
|
||||
{"Mythic 6", 10, "=q4=" }, {"Mythic 7", 11, "=q4=" }, {"Mythic 8", 12, "=q4=" }, {"Mythic 9", 13, "=q4=" }, {"Mythic 10", 14, "=q4=" },
|
||||
{"Mythic 11", 15, "=q4=" }, {"Mythic 12", 16, "=q4=" }, {"Mythic 13", 17, "=q4=" }, {"Mythic 14", 18, "=q4=" }, {"Mythic 15", 19, "=q4=" },
|
||||
{"Mythic 16", 20, "=q4=" }, {"Mythic 17", 21, "=q4=" }, {"Mythic 18", 22, "=q4=" }, {"Mythic 19", 23, "=q4=" }, {"Mythic 20", 24, "=q4=" },
|
||||
{"Mythic 21", 25, "=q4=" }, {"Mythic 22", 26, "=q4=" }, {"Mythic 23", 27, "=q4=" }, {"Mythic 24", 28, "=q4=" }, {"Mythic 25", 29, "=q4=" },
|
||||
{"Mythic 26", 30, "=q4=" }, {"Mythic 27", 31, "=q4=" }, {"Mythic 28", 32, "=q4=" }, {"Mythic 29", 33, "=q4=" }, {"Mythic 30", 34, "=q4=" },
|
||||
{"Mythic 31", 35, "=q4=" }, {"Mythic 32", 36, "=q4=" }, {"Mythic 33", 37, "=q4=" }, {"Mythic 34", 38, "=q4=" }, {"Mythic 35", 39, "=q4=" },
|
||||
{"Mythic 36", 40, "=q4=" }, {"Mythic 37", 41, "=q4=" }, {"Mythic 38", 42, "=q4=" }, {"Mythic 39", 43, "=q4=" }, {"Mythic 40", 44, "=q4=" },
|
||||
{"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 },
|
||||
{"Mythic 11", 15 }, {"Mythic 12", 16 }, {"Mythic 13", 17 }, {"Mythic 14", 18 }, {"Mythic 15", 19 },
|
||||
{"Mythic 16", 20 }, {"Mythic 17", 21 }, {"Mythic 18", 22 }, {"Mythic 19", 23 }, {"Mythic 20", 24 },
|
||||
{"Mythic 21", 25 }, {"Mythic 22", 26 }, {"Mythic 23", 27 }, {"Mythic 24", 28 }, {"Mythic 25", 29 },
|
||||
{"Mythic 26", 30 }, {"Mythic 27", 31 }, {"Mythic 28", 32 }, {"Mythic 29", 33 }, {"Mythic 30", 34 },
|
||||
{"Mythic 31", 35 }, {"Mythic 32", 36 }, {"Mythic 33", 37 }, {"Mythic 34", 38 }, {"Mythic 35", 39 },
|
||||
{"Mythic 36", 40 }, {"Mythic 37", 41 }, {"Mythic 38", 42 }, {"Mythic 39", 43 }, {"Mythic 40", 44 },
|
||||
};
|
||||
|
||||
["BCRaid"] = {
|
||||
@@ -71,12 +57,12 @@ AtlasLoot_Difficulty = {
|
||||
|
||||
["WrathDungeon"] = {
|
||||
{"Normal/Heroic", 2},
|
||||
{"Mythic", 4, "=q4="},
|
||||
{"Mythic", 4},
|
||||
{"Bloodforged", 1},
|
||||
{"Mythic 1", 5, "=q4=" }, {"Mythic 2", 6, "=q4=" }, {"Mythic 3", 7, "=q4=" }, {"Mythic 4", 8, "=q4=" }, {"Mythic 5", 9, "=q4=" },
|
||||
{"Mythic 6", 10, "=q4=" }, {"Mythic 7", 11, "=q4=" }, {"Mythic 8", 12, "=q4=" }, {"Mythic 9", 13, "=q4=" }, {"Mythic 10", 14, "=q4=" },
|
||||
{"Mythic 11", 15, "=q4=" }, {"Mythic 12", 16, "=q4=" }, {"Mythic 13", 17, "=q4=" }, {"Mythic 14", 18, "=q4=" }, {"Mythic 15", 19, "=q4=" },
|
||||
{"Mythic 16", 20, "=q4=" }, {"Mythic 17", 21, "=q4=" }, {"Mythic 18", 22, "=q4=" }, {"Mythic 19", 23, "=q4=" }, {"Mythic 20", 24, "=q4=" },
|
||||
{"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 },
|
||||
{"Mythic 11", 15 }, {"Mythic 12", 16 }, {"Mythic 13", 17 }, {"Mythic 14", 18 }, {"Mythic 15", 19 },
|
||||
{"Mythic 16", 20 }, {"Mythic 17", 21 }, {"Mythic 18", 22 }, {"Mythic 19", 23 }, {"Mythic 20", 24 },
|
||||
};
|
||||
|
||||
["WrathRaid"] = {
|
||||
@@ -92,12 +78,20 @@ AtlasLoot_Difficulty = {
|
||||
{"Bloodforged", 1 },
|
||||
};
|
||||
|
||||
["Search"] = {"Bloodforged", "Normal", "Heroic", "Mythic",
|
||||
"Mythic 1", "Mythic 2","Mythic 3","Mythic 4","Mythic 5", "Mythic 6","Mythic 7", "Mythic 8","Mythic 9", "Mythic 10",
|
||||
"Mythic 11", "Mythic 12","Mythic 13","Mythic 14","Mythic 15", "Mythic 16","Mythic 17","Mythic 18", "Mythic 19", "Mythic 20",
|
||||
"Mythic 21", "Mythic 22","Mythic 23","Mythic 24","Mythic 25", "Mythic 26","Mythic 27", "Mythic 28","Mythic 29", "Mythic 30",
|
||||
"Mythic 31", "Mythic 32","Mythic 33","Mythic 34","Mythic 35", "Mythic 36","Mythic 37","Mythic 38", "Mythic 39", "Mythic 40",
|
||||
[99] = "Ascended"};
|
||||
["Search"] = {
|
||||
{"Bloodforged", 1},
|
||||
{"Normal", 2},
|
||||
{"Heroic", 3},
|
||||
{"Mythic/Ascended", 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 },
|
||||
{"Mythic 11", 15 }, {"Mythic 12", 16 }, {"Mythic 13", 17 }, {"Mythic 14", 18 }, {"Mythic 15", 19 },
|
||||
{"Mythic 16", 20 }, {"Mythic 17", 21 }, {"Mythic 18", 22 }, {"Mythic 19", 23 }, {"Mythic 20", 24 },
|
||||
{"Mythic 21", 25 }, {"Mythic 22", 26 }, {"Mythic 23", 27 }, {"Mythic 24", 28 }, {"Mythic 25", 29 },
|
||||
{"Mythic 26", 30 }, {"Mythic 27", 31 }, {"Mythic 28", 32 }, {"Mythic 29", 33 }, {"Mythic 30", 34 },
|
||||
{"Mythic 31", 35 }, {"Mythic 32", 36 }, {"Mythic 33", 37 }, {"Mythic 34", 38 }, {"Mythic 35", 39 },
|
||||
{"Mythic 36", 40 }, {"Mythic 37", 41 }, {"Mythic 38", 42 }, {"Mythic 39", 43 }, {"Mythic 40", 44 },
|
||||
};
|
||||
|
||||
--Enums for comparisons in code
|
||||
Bloodforged = 1;
|
||||
|
||||
@@ -45,6 +45,7 @@ ATLASLOOT_PREVIEW_ATLAS = {"1.17.3", "1.17.2"};
|
||||
|
||||
ATLASLOOT_POSITION = AL["Position:"];
|
||||
ATLASLOOT_DEBUGMESSAGES = false;
|
||||
ATLASLOOT_LOOP = false;
|
||||
|
||||
--Standard indent to line text up with Atlas text
|
||||
ATLASLOOT_INDENT = " ";
|
||||
@@ -89,8 +90,8 @@ notPattern = false;
|
||||
Updated_dataID = "";
|
||||
|
||||
--Search panel open and close save variables
|
||||
--dataID, dataSource, boss, pFrame
|
||||
SearchPrevData = {"", "", "", ""};
|
||||
--dataID, dataSource, boss, pFrame, tablenumber
|
||||
SearchPrevData = {"", "", "", "", ""};
|
||||
|
||||
AtlasLootCharDB={};
|
||||
|
||||
@@ -479,6 +480,12 @@ function AtlasLoot_OnLoad()
|
||||
|
||||
end
|
||||
|
||||
--Used to refresh the page after its loaded all the items
|
||||
function AtlasLoot:callShowloot()
|
||||
ATLASLOOT_LOOP = true;
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4], AtlasLootItemsFrame.refresh[5])
|
||||
end
|
||||
|
||||
function AtlasLoot_CleandataID(newID, listnum)
|
||||
local cleanlist = { [1] = {"CLASSIC", "TBC", "WRATH"} };
|
||||
for i = 1, #cleanlist[listnum] do
|
||||
@@ -512,23 +519,20 @@ function Atlasloot_CreateToken(dataID)
|
||||
newData.Back = true;
|
||||
newData[1] = {};
|
||||
newData[1].Name = itemName;
|
||||
--used to refresh the page after its loaded all the items
|
||||
function AtlasLoot:callShowloot()
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4], AtlasLootItemsFrame.refresh[5])
|
||||
end
|
||||
--Adds all the items to the new data set
|
||||
--Uses a timer so that AtlasLoot:callShowloot() only fires once after all then items have been loaded
|
||||
for i, v in ipairs(AtlasLoot_Data[dataID]) do
|
||||
for t, id in ipairs(v) do
|
||||
local itemID = id[2];
|
||||
local itemID = AL_FindId(id[2], ItemindexID);
|
||||
local item = Item:CreateFromID(itemID);
|
||||
item:ContinueOnLoad(function(itemID)
|
||||
AtlasLoot:CancelTimer(AtlasLoot.refreshTimer);
|
||||
if itemType == select(9,GetItemInfo(itemID)) or itemType2 == select(9,GetItemInfo(itemID)) then
|
||||
local newTable = rawset(id, 1, i);
|
||||
newTable = rawset(id, 5, v.Name);
|
||||
table.insert(newData[1],newTable);
|
||||
end
|
||||
AtlasLoot.refreshTimer = AtlasLoot:ScheduleTimer("callShowloot", .5);
|
||||
AtlasLoot.refreshTimer = AtlasLoot:ScheduleTimer("callShowloot", .1);
|
||||
end)
|
||||
end
|
||||
end
|
||||
@@ -541,7 +545,6 @@ dataSource - Table in the database where the loot table is stored
|
||||
boss - Text string to use as a title for the loot page
|
||||
pFrame - Data structure describing how and where to anchor the item frame (more details, see the function AtlasLoot_SetItemInfoFrame)
|
||||
tablenum - Table number of the loot table being displayed
|
||||
This fuction is not normally called directly, it is usually invoked by AtlasLoot_ShowBossLoot.
|
||||
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, tablenum)
|
||||
@@ -575,27 +578,14 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame, tablenum)
|
||||
-- Hide the Filter Check-Box
|
||||
AtlasLootFilterCheck:Hide();
|
||||
|
||||
|
||||
dataSource_backup = dataSource;
|
||||
|
||||
if dataID == "SearchResult" or dataID == "WishList" then
|
||||
ItemindexID = "";
|
||||
dataSource = {};
|
||||
-- Match the page number to display
|
||||
wlPage = tonumber(dataSource_backup:match("%d+$"));
|
||||
-- Aquiring items of the page
|
||||
if dataID == "SearchResult" then
|
||||
dataSource[dataID], wlPageMax = AtlasLoot:GetSearchResultPage(wlPage);
|
||||
elseif dataID == "WishList" then
|
||||
dataSource[dataID], wlPageMax = AtlasLoot_GetWishListPage(wlPage);
|
||||
end
|
||||
-- Make page number reasonable
|
||||
if wlPage < 1 then wlPage = 1 end
|
||||
if wlPage > wlPageMax then wlPage = wlPageMax end
|
||||
else
|
||||
if dataID ~= "SearchResult" and dataID ~= "WishList" then
|
||||
dataSource = AtlasLoot_Data;
|
||||
end
|
||||
|
||||
|
||||
AtlasLoot_CurrentType = dataSource[dataID].Type or "";
|
||||
AtlasLootDefaultFrame_ScrollFrameUpdate();
|
||||
|
||||
--Hide UI objects so that only needed ones are shown
|
||||
for i = 1, 30, 1 do
|
||||
getglobal("AtlasLootItem_"..i.."_Unsafe"):Hide();
|
||||
@@ -604,14 +594,8 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame, tablenum)
|
||||
getglobal("AtlasLootItem_"..i).spellitemID = 0;
|
||||
end
|
||||
|
||||
--[[ if AtlasLoot_TableNames[dataID] ~= nil and AtlasLoot_TableNames[dataID][2] == "Menu" then
|
||||
AtlasLoot_GenerateAtlasMenu(dataID, pFrame);
|
||||
lastType = dataSource[dataID].Type
|
||||
return;
|
||||
end ]]
|
||||
|
||||
AtlasLoot_CurrentType = dataSource[dataID].Type or "";
|
||||
AtlasLootDefaultFrame_ScrollFrameUpdate();
|
||||
|
||||
|
||||
-- Create the loottable
|
||||
if (dataID == "SearchResult") or (dataID == "WishList") or dataSource[dataID][tablenum] then
|
||||
@@ -809,10 +793,10 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame, tablenum)
|
||||
end
|
||||
end
|
||||
|
||||
AtlasLootItemsFrame.refresh = {dataID, dataSource_backup, boss, pFrame, tablenum};
|
||||
if dataID ~= "FilterList" and dataSource[dataID].Back ~= true then
|
||||
AtlasLootItemsFrame.refreshOri = {dataID, dataSource_backup, boss, pFrame, tablenum};
|
||||
AtlasLoot.db.profile.LastBoss = {dataID, dataSource_backup, boss, pFrame, tablenum, ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLootItemsFrame.refresh = {dataID, dataSource, boss, pFrame, tablenum};
|
||||
if dataID ~= "WishList" and dataID ~= "SearchResult" and dataID ~= "FilterList" and dataSource[dataID].Back ~= true then
|
||||
AtlasLootItemsFrame.refreshOri = {dataID, dataSource, boss, pFrame, tablenum};
|
||||
AtlasLoot.db.profile.LastBoss = {dataID, dataSource, boss, pFrame, tablenum, ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
end
|
||||
|
||||
--This is a valid QuickLook, so show the UI objects
|
||||
@@ -846,36 +830,20 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame, tablenum)
|
||||
AtlasLootDefaultFrame_SubMenu:SetText(dataSource[dataID].Name);
|
||||
end
|
||||
|
||||
--Consult the button registry to determine what nav buttons are required
|
||||
if dataID == "SearchResult" or dataID == "WishList" then
|
||||
if wlPage < wlPageMax then
|
||||
if tablenum + 1 ~= AtlasLoot_GetNumOfRows(dataSource[dataID]) then
|
||||
getglobal("AtlasLootItemsFrame_NEXT"):Show();
|
||||
getglobal("AtlasLootItemsFrame_NEXT").lootpage = dataID.."Page"..(wlPage + 1);
|
||||
end
|
||||
if wlPage > 1 then
|
||||
getglobal("AtlasLootItemsFrame_PREV"):Show();
|
||||
getglobal("AtlasLootItemsFrame_PREV").lootpage = dataID.."Page"..(wlPage - 1);
|
||||
end
|
||||
else
|
||||
local tablebase = dataID;
|
||||
if ATLASLOOT_FILTER_ENABLE and dataID == "FilterList" then
|
||||
tablebase = AtlasLootItemsFrame.refreshOri[1];
|
||||
end
|
||||
|
||||
if tablenum + 1 ~= AtlasLoot_GetNumOfRows(dataSource[tablebase]) then
|
||||
getglobal("AtlasLootItemsFrame_NEXT"):Show();
|
||||
getglobal("AtlasLootItemsFrame_NEXT").lootpage = tablebase;
|
||||
getglobal("AtlasLootItemsFrame_NEXT").lootpage = dataID;
|
||||
getglobal("AtlasLootItemsFrame_NEXT").tablenum = tablenum + 1;
|
||||
end
|
||||
if tablenum -1 ~= 0 then
|
||||
getglobal("AtlasLootItemsFrame_PREV"):Show();
|
||||
getglobal("AtlasLootItemsFrame_PREV").lootpage = tablebase;
|
||||
getglobal("AtlasLootItemsFrame_PREV").lootpage = dataID;
|
||||
getglobal("AtlasLootItemsFrame_PREV").tablenum = tablenum - 1;
|
||||
end
|
||||
if dataSource[tablebase].Back then
|
||||
if dataSource[dataID].Back then
|
||||
getglobal("AtlasLootItemsFrame_BACK"):Show();
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--Anchor the item frame where it is supposed to be
|
||||
@@ -884,7 +852,11 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame, tablenum)
|
||||
AtlasLoot_HideNoUsableItems();
|
||||
end
|
||||
|
||||
if ATLASLOOT_LOOP then
|
||||
ATLASLOOT_LOOP = false;
|
||||
else
|
||||
AtlasLoot_QueryLootPage();
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -972,6 +944,7 @@ Called when 'Back'Button is pressed and calls up the appropriate loot page
|
||||
]]
|
||||
function AtlasLoot_BackButton_OnClick()
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4], AtlasLootItemsFrame.refreshOri[5]);
|
||||
AtlasLootDefaultFrame_SubTableScrollFrameUpdate(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[5]);
|
||||
end
|
||||
|
||||
--[[
|
||||
@@ -1168,9 +1141,11 @@ function AtlasLoot_QueryLootPage()
|
||||
if (queryitem) and (queryitem ~= nil) and (queryitem ~= "") and (queryitem ~= 0) and (string.sub(queryitem, 1, 1) ~= "s") then
|
||||
local item = Item:CreateFromID(queryitem);
|
||||
item:ContinueOnLoad(function(itemId)
|
||||
AtlasLoot:CancelTimer(AtlasLoot.refreshTimer);
|
||||
if item:GetInfo() then
|
||||
AtlasLootTooltip:SetHyperlink("item:"..itemId..":0:0:0:0:0:0:0");
|
||||
end
|
||||
AtlasLoot.refreshTimer = AtlasLoot:ScheduleTimer("callShowloot", .1);
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -295,33 +295,3 @@ function AtlasLoot_AtlasScrollBar_Update()
|
||||
Hooked_AtlasScrollBar_Update();
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_ShowBossLoot(dataID, boss, pFrame):
|
||||
dataID - Name of the loot table
|
||||
boss - Text string to be used as the title for the loot page
|
||||
pFrame - Data structure describing how and where to anchor the item frame (more details, see the function AtlasLoot_SetItemInfoFrame)
|
||||
This is the intended API for external mods to use for displaying loot pages.
|
||||
This function figures out where the loot table is stored, then sends the relevant info to AtlasLoot_ShowItemsFrame
|
||||
]]
|
||||
function AtlasLoot_ShowBossLoot(dataID, boss, pFrame)
|
||||
|
||||
local tableavailable = AtlasLoot_IsLootTableAvailable(dataID);
|
||||
|
||||
if (tableavailable) then
|
||||
AtlasLootItemsFrame:Hide();
|
||||
|
||||
--If the loot table is already being displayed, it is hidden and the current table selection cancelled
|
||||
if ( dataID == AtlasLootItemsFrame.externalBoss ) and (AtlasLootItemsFrame:GetParent() ~= AtlasFrame) and (AtlasLootItemsFrame:GetParent() ~= AtlasLootDefaultFrame_LootBackground) then
|
||||
AtlasLootItemsFrame.externalBoss = nil;
|
||||
else
|
||||
--Use the original WoW instance data by default
|
||||
local dataSource = AtlasLoot_TableNames[dataID][2];
|
||||
|
||||
--Set anchor point, set selected table and call AtlasLoot_ShowItemsFrame
|
||||
AtlasLoot_AnchorFrame = pFrame;
|
||||
AtlasLootItemsFrame.externalBoss = dataID;
|
||||
AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -260,8 +260,8 @@ function AtlasLootItem_OnClick(arg1)
|
||||
end
|
||||
elseif((AtlasLootItemsFrame.refresh[1] == "SearchResult" or AtlasLootItemsFrame.refresh[1] == "WishList") and this.sourcePage) then
|
||||
local dataID, dataSource = strsplit("|", this.sourcePage);
|
||||
if(dataID and dataSource and AtlasLoot_IsLootTableAvailable(dataID)) then
|
||||
AtlasLoot_ShowItemsFrame(dataID, dataSource, AtlasLoot_TableNames[dataID][1], AtlasLootItemsFrame.refresh[4]);
|
||||
if(dataID and dataSource) then
|
||||
AtlasLoot_ShowItemsFrame(dataID, dataSource, dataSource[dataID].Name, AtlasLootItemsFrame.refresh[4], 1);
|
||||
end
|
||||
elseif (arg1=="LeftButton") and this.sourcePage ~= nil then
|
||||
--Holds AtlasLoot_Lastboss so back button works
|
||||
|
||||
+25
-16
@@ -663,12 +663,23 @@ local function GetSpellName(itemId, atlasName)
|
||||
end
|
||||
|
||||
local function DoSearch(searchText)
|
||||
AtlasLootCharDB["SearchResult"] = {};
|
||||
AtlasLootCharDB["SearchResult"] = {Name = "Search Result" , Type = "Search", Back = true};
|
||||
AtlasLootCharDB.LastSearchedText = searchText;
|
||||
|
||||
local count = 1;
|
||||
local tablenum = 1;
|
||||
local function AddItemToSearchResult(itemId, itemType, itemName, dataID)
|
||||
local lootPage = AtlasLoot_TableNames[dataID] and AtlasLoot_TableNames[dataID][1] or "Argh!";
|
||||
table.insert(AtlasLootCharDB["SearchResult"], {0, itemId, itemType, itemName, lootPage, "", "", dataID .. "|" .. "\"\""});
|
||||
local lootPage = AtlasLoot_Data[dataID].Name or "Argh!";
|
||||
if AtlasLootCharDB["SearchResult"][tablenum] == nil then
|
||||
AtlasLootCharDB["SearchResult"][tablenum] = {Name = "Page "..tablenum};
|
||||
end
|
||||
if count == 30 then
|
||||
table.insert(AtlasLootCharDB["SearchResult"][tablenum], {count, itemId, itemType, itemName, lootPage, "", "", dataID .. "|" .. "\"\""});
|
||||
tablenum = tablenum + 1
|
||||
count = 1;
|
||||
else
|
||||
table.insert(AtlasLootCharDB["SearchResult"][tablenum], {count, itemId, itemType, itemName, lootPage, "", "", dataID .. "|" .. "\"\""});
|
||||
count = count + 1;
|
||||
end
|
||||
end
|
||||
|
||||
local searchTerms = ParseQuery(searchText);
|
||||
@@ -676,17 +687,13 @@ local function DoSearch(searchText)
|
||||
local difficulty = TermsContainDifficulty(searchTerms);
|
||||
|
||||
for dataID, data in pairs(AtlasLoot_Data) do
|
||||
for _, datatable in pairs(data) do
|
||||
for _, v in ipairs(datatable) do
|
||||
for _, t in ipairs(data) do
|
||||
for _, v in ipairs(t) do
|
||||
if type(v) == "table" then
|
||||
local _, itemId, itemType, atlasName = unpack(v)
|
||||
|
||||
if type(itemId) == "number" and itemId > 0 then
|
||||
if difficulty ~= 2 then
|
||||
itemId = AL_FindId(itemId, difficulty) or itemId;
|
||||
end
|
||||
|
||||
local itemDetails = {GetItemDetails(itemId, atlasName)};
|
||||
itemDetails[8] = difficulty;
|
||||
--itemDetails[8] = ItemindexID;
|
||||
|
||||
if #searchTerms == 1 and searchTerms[1].name then
|
||||
if nameMatches(atlasName, searchTerms[1].name) then
|
||||
@@ -706,9 +713,11 @@ local function DoSearch(searchText)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function AtlasLoot:ShowSearchResult()
|
||||
AtlasLoot_ShowItemsFrame("SearchResult", "SearchResultPage" .. currentPage, (AL["Search Result: %s"]):format(AtlasLootCharDB.LastSearchedText or ""), pFrame);
|
||||
AtlasLoot_ShowItemsFrame("SearchResult", AtlasLootCharDB, (AL["Search Result: %s"]):format(AtlasLootCharDB.LastSearchedText or ""), pFrame, 1);
|
||||
AtlasLootDefaultFrame_SubTableScrollFrameUpdate("SearchResult", AtlasLootCharDB, pFrame, 1);
|
||||
end
|
||||
|
||||
function AtlasLoot:Search(Text)
|
||||
@@ -759,9 +768,9 @@ You might also have to query the server for item informations to load them into
|
||||
end
|
||||
DEFAULT_CHAT_FRAME:AddMessage(RED .. AL["AtlasLoot"] .. ": " .. WHITE .. AL["No match found for"] .. " \"" .. Text .. "\"." .. itemFilterErrorMessage);
|
||||
else
|
||||
currentPage = 1;
|
||||
SearchResult = AtlasLoot_CategorizeWishList(AtlasLootCharDB["SearchResult"]);
|
||||
AtlasLoot_ShowItemsFrame("SearchResult", "SearchResultPage1", (AL["Search Result: %s"]):format(AtlasLootCharDB.LastSearchedText or ""), pFrame);
|
||||
--SearchResult = AtlasLoot_CategorizeWishList(AtlasLootCharDB["SearchResult"]);
|
||||
AtlasLoot_ShowItemsFrame("SearchResult", AtlasLootCharDB, (AL["Search Result: %s"]):format(AtlasLootCharDB.LastSearchedText or ""), pFrame, 1);
|
||||
AtlasLootDefaultFrame_SubTableScrollFrameUpdate("SearchResult", AtlasLootCharDB, pFrame, 1);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -290,8 +290,6 @@ function AtlasLoot_AdvancedSearchShow()
|
||||
AdvSearchSubMenuEnabled = 1;
|
||||
end
|
||||
|
||||
AtlasLootServerQueryButton:Hide();
|
||||
|
||||
-- Ditch the Quicklook selector
|
||||
AtlasLoot_QuickLooks:Hide();
|
||||
AtlasLootQuickLooksButton:Hide();
|
||||
@@ -301,7 +299,6 @@ function AtlasLoot_AdvancedSearchShow()
|
||||
|
||||
for i = 1, 30, 1 do
|
||||
getglobal("AtlasLootItem_" .. i .. "_Unsafe"):Hide();
|
||||
getglobal("AtlasLootMenuItem_" .. i):Hide();
|
||||
getglobal("AtlasLootItem_" .. i):Hide();
|
||||
getglobal("AtlasLootItem_" .. i).itemID = 0;
|
||||
getglobal("AtlasLootItem_" .. i).spellitemID = 0;
|
||||
@@ -314,22 +311,20 @@ function AtlasLoot_AdvancedSearchShow()
|
||||
AtlasLootAdvancedSearch:ClearAllPoints();
|
||||
AtlasLootAdvancedSearch:SetPoint(pFrame[1], pFrame[2], pFrame[3], pFrame[4], pFrame[5]);
|
||||
AtlasLootAdvancedSearch:Show();
|
||||
|
||||
AtlasLoot_CurrentType = "Search";
|
||||
AtlasLootDefaultFrame_ScrollFrameUpdate();
|
||||
AtlasLootDefaultFrame_SubTableScrollFrameUpdate("", "", "", "");
|
||||
end
|
||||
|
||||
function AtlasLoot_AdvancedSearchClose()
|
||||
AtlasLootAdvancedSearch:Hide();
|
||||
AtlasLootServerQueryButton:Show();
|
||||
|
||||
if AdvSearchSubMenuEnabled then
|
||||
AtlasLootDefaultFrame_SubMenu:Enable();
|
||||
AtlasLootDefaultFrame_SelectedTable:SetText(AdvSearchSubMenuText);
|
||||
end
|
||||
|
||||
AdvSearchSubMenuEnabled = 0;
|
||||
AdvSearchSubMenu2Enabled = 0;
|
||||
|
||||
if (SearchPrevData[1] ~= "") then
|
||||
AtlasLoot_ShowItemsFrame(SearchPrevData[1], SearchPrevData[2], SearchPrevData[3], SearchPrevData[4]);
|
||||
AtlasLoot_ShowItemsFrame(SearchPrevData[1], SearchPrevData[2], SearchPrevData[3], SearchPrevData[4], SearchPrevData[5]);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,583 +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="Menu.lua"/>
|
||||
<Script file="AtlaslootDefaultFrame.lua"/>
|
||||
|
||||
<Button name="AtlasLootDefaultFrameButtonTemplate" inherits="OptionsButtonTemplate" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="105" y="20"/>
|
||||
</Size>
|
||||
</Button>
|
||||
|
||||
<Frame name="AtlasLootDefaultFrame" toplevel="true" movable="true" enableMouse="true" hidden="true" parent="UIParent" enableKeyboard="true">
|
||||
<Size>
|
||||
<AbsDimension x="600" y="690"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER"/>
|
||||
</Anchors>
|
||||
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
|
||||
<BackgroundInsets>
|
||||
<AbsInset left="11" right="12" top="12" bottom="11"/>
|
||||
</BackgroundInsets>
|
||||
<TileSize>
|
||||
<AbsValue val="32"/>
|
||||
</TileSize>
|
||||
<EdgeSize>
|
||||
<AbsValue val="32"/>
|
||||
</EdgeSize>
|
||||
</Backdrop>
|
||||
<Frames>
|
||||
<Button name="$parent_CloseButton" inherits="UIPanelCloseButton">
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT" relativeTo="AtlasLootDefaultFrame" relativePoint="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-10" y="-10"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
AtlasLootDefaultFrame:Hide();
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_LoadModules" inherits="AtlasLootDefaultFrameButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT" relativeTo="$parent" relativePoint="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-38" y="-15"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
AtlasLoot_LoadAllModules();
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["Load Modules"]);
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_Options" inherits="AtlasLootDefaultFrameButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="15" y="-15"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
AtlasLootOptions_Toggle();
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["Options"]);
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_Menu" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="$parent" relativePoint="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="-160" y="-40"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_Dewdrop:IsOpen() then
|
||||
AtlasLoot_Dewdrop:Close();
|
||||
else
|
||||
AtlasLoot_Dewdrop:Open(this);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["Select Loot Table"]);
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_SubMenu" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="$parent" relativePoint="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="160" y="-40"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_DewdropSubMenu:IsOpen() then
|
||||
AtlasLoot_DewdropSubMenu:Close();
|
||||
else
|
||||
AtlasLoot_DewdropSubMenu:Open(this);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["Select Sub-Table"]);
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_SubMenu2" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="$parent" relativePoint="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-40"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_DewdropSubMenu2:IsOpen() then
|
||||
AtlasLoot_DewdropSubMenu2:Close();
|
||||
else
|
||||
AtlasLoot_DewdropSubMenu2:Open(this);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["Select Difficulty"]);
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Frame name="$parent_LootBackground">
|
||||
<Size>
|
||||
<AbsDimension x="515" y="515"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="90"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture name="$parent_Back">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT"/>
|
||||
<Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="BOTTOMRIGHT"/>
|
||||
</Anchors>
|
||||
<Color r="0" g="0" b="0.5" a="0.5"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</Frame>
|
||||
<Button name="$parent_Preset2" inherits="AtlasLootDefaultFrameButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOM" relativeTo="$parent" relativePoint="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="63"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
if this:IsEnabled() then
|
||||
GameTooltip:ClearLines();
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
|
||||
GameTooltip:AddLine(AtlasLootCharDB["QuickLooks"][2][3]);
|
||||
GameTooltip:Show();
|
||||
end
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
if(GameTooltip:IsVisible()) then
|
||||
GameTooltip:Hide();
|
||||
end
|
||||
</OnLeave>
|
||||
<OnClick>
|
||||
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][2][1]) then
|
||||
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][2][1], AtlasLootCharDB["QuickLooks"][2][2], AtlasLootCharDB["QuickLooks"][2][3], pFrame);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["QuickLook"].." 2");
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
if ((not AtlasLootCharDB["QuickLooks"][2]) or (not AtlasLootCharDB["QuickLooks"][2][1])) or (AtlasLootCharDB["QuickLooks"][2][1]==nil) then
|
||||
this:Disable();
|
||||
end
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_Preset1" inherits="AtlasLootDefaultFrameButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT" relativeTo="$parent_Preset2" relativePoint="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-5" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
if this:IsEnabled() then
|
||||
GameTooltip:ClearLines();
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
|
||||
GameTooltip:AddLine(AtlasLootCharDB["QuickLooks"][1][3]);
|
||||
GameTooltip:Show();
|
||||
end
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
if(GameTooltip:IsVisible()) then
|
||||
GameTooltip:Hide();
|
||||
end
|
||||
</OnLeave>
|
||||
<OnClick>
|
||||
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][1][1]) then
|
||||
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][1][1], AtlasLootCharDB["QuickLooks"][1][2], AtlasLootCharDB["QuickLooks"][1][3], pFrame);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["QuickLook"].." 1");
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
if ((not AtlasLootCharDB["QuickLooks"][1]) or (not AtlasLootCharDB["QuickLooks"][1][1])) or (AtlasLootCharDB["QuickLooks"][1][1]==nil) then
|
||||
this:Disable();
|
||||
end
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_Preset3" inherits="AtlasLootDefaultFrameButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parent_Preset1" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="5" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
if this:IsEnabled() then
|
||||
GameTooltip:ClearLines();
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
|
||||
GameTooltip:AddLine(AtlasLootCharDB["QuickLooks"][3][3]);
|
||||
GameTooltip:Show();
|
||||
end
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
if(GameTooltip:IsVisible()) then
|
||||
GameTooltip:Hide();
|
||||
end
|
||||
</OnLeave>
|
||||
<OnClick>
|
||||
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][3][1]) then
|
||||
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][3][1], AtlasLootCharDB["QuickLooks"][3][2], AtlasLootCharDB["QuickLooks"][3][3], pFrame);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["QuickLook"].." 3");
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
if ((not AtlasLootCharDB["QuickLooks"][3]) or (not AtlasLootCharDB["QuickLooks"][3][1])) or (AtlasLootCharDB["QuickLooks"][3][1]==nil) then
|
||||
this:Disable();
|
||||
end
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_Preset4" inherits="AtlasLootDefaultFrameButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parent_Preset3" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="5" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
if this:IsEnabled() then
|
||||
GameTooltip:ClearLines();
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
|
||||
GameTooltip:AddLine(AtlasLootCharDB["QuickLooks"][4][3]);
|
||||
GameTooltip:Show();
|
||||
end
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
if(GameTooltip:IsVisible()) then
|
||||
GameTooltip:Hide();
|
||||
end
|
||||
</OnLeave>
|
||||
<OnClick>
|
||||
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][4][1]) then
|
||||
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][4][1], AtlasLootCharDB["QuickLooks"][4][2], AtlasLootCharDB["QuickLooks"][4][3], pFrame);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["QuickLook"].." 4");
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
if ((not AtlasLootCharDB["QuickLooks"][4]) or (not AtlasLootCharDB["QuickLooks"][4][1])) or (AtlasLootCharDB["QuickLooks"][4][1]==nil) then
|
||||
this:Disable();
|
||||
end
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="AtlasLootDefaultFrameWishListButton" inherits="AtlasLootDefaultFrameButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT" relativeTo="$parent_Preset1" relativePoint="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-5" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
AtlasLoot_ShowWishListDropDown("","","","","",this,true)
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["Wishlist"]);
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<EditBox name="AtlasLootDefaultFrameSearchBox" inherits="InputBoxTemplate" letters="100">
|
||||
<Size>
|
||||
<AbsDimension x="190" y="32" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="AtlasLootDefaultFrameWishListButton" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="7" y="-3"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetAutoFocus(false);
|
||||
this:SetTextInsets(0, 8, 0, 0);
|
||||
</OnLoad>
|
||||
<OnEnterPressed>
|
||||
AtlasLoot:Search(this:GetText());
|
||||
this:ClearFocus();
|
||||
</OnEnterPressed>
|
||||
</Scripts>
|
||||
<FontString name="AtlasLootDefaultFrameSearchString" inherits="GameFontNormal"></FontString>
|
||||
</EditBox>
|
||||
<Button name="AtlasLootDefaultFrameSearchButton" inherits="UIPanelButtonTemplate2">
|
||||
<Size>
|
||||
<AbsDimension x="69" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="AtlasLootDefaultFrameSearchBox" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["Search"]);
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
<OnClick>
|
||||
AtlasLoot:Search(AtlasLootDefaultFrameSearchBox:GetText());
|
||||
AtlasLootDefaultFrameSearchBox:ClearFocus();
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="AtlasLootDefaultFrameSearchOptionsButton" parent="AtlasLootDefaultFrameSearchButton">
|
||||
<Size>
|
||||
<AbsDimension x="28" y="28" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="AtlasLootDefaultFrameSearchButton" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-5" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up"/>
|
||||
<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down"/>
|
||||
<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled"/>
|
||||
<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
|
||||
<Scripts>
|
||||
<OnShow>
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
<OnClick>
|
||||
AtlasLoot:ShowSearchOptions(this);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="AtlasLootDefaultFrameSearchClearButton" inherits="UIPanelButtonTemplate2" parent="AtlasLootDefaultFrameSearchBox">
|
||||
<Size>
|
||||
<AbsDimension x="58" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="AtlasLootDefaultFrameSearchOptionsButton" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-2" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["Clear"]);
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
<OnClick>
|
||||
AtlasLootDefaultFrameSearchBox:SetText("");
|
||||
AtlasLootDefaultFrameSearchBox:ClearFocus();
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="AtlasLootDefaultFrameLastResultButton" inherits="UIPanelButtonTemplate2" parent="AtlasLootDefaultFrameSearchBox">
|
||||
<Size>
|
||||
<AbsDimension x="100" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="AtlasLootDefaultFrameSearchClearButton" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="1" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText(AL["Last Result"]);
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
<OnClick>
|
||||
AtlasLoot:ShowSearchResult();
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="AtlasLootDefaultFrameAdvancedSearchButton" inherits="UIPanelButtonTemplate2">
|
||||
<Size>
|
||||
<AbsDimension x="95" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="AtlasLootDefaultFrameLastResultButton" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText("Advanced");
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
<OnClick>
|
||||
AtlasLoot_AdvancedSearchShow();
|
||||
AtlasLootDefaultFrameSearchBox:ClearFocus();
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="$parentHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
|
||||
<Size>
|
||||
<AbsDimension x="425" y="64"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="12"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<FontString inherits="GameFontNormal" text="ATLASLOOT_VERSION">
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="$parent_Notice" inherits="GameFontNormal">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="17"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parent_SelectedCategory" inherits="GameFontNormal" text="">
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-50"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="$parent_SelectedTable" inherits="GameFontNormal" text="Cannot read files">
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-50"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="$parent_SelectedTable2" inherits="GameFontNormal" text="Cannot read files">
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-50"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:RegisterForDrag("LeftButton");
|
||||
this:SetMovable(1);
|
||||
this:SetBackdropColor(0.75, 0, 0.75);
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
getglobal("AtlasLootDefaultFrame_Notice"):SetText(AL["This is a loot browser only. To view maps as well, install either Atlas or Alphamap."]);
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
AtlasLootDefaultFrame_OnShow();
|
||||
</OnShow>
|
||||
<OnHide>
|
||||
AtlasLootDefaultFrame_OnHide();
|
||||
</OnHide>
|
||||
<OnDragStart>
|
||||
this:StartMoving();
|
||||
this.isMoving = true;
|
||||
</OnDragStart>
|
||||
<OnDragStop>
|
||||
this:StopMovingOrSizing();
|
||||
this.isMoving = false;
|
||||
</OnDragStop>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -417,8 +417,9 @@ local rows2 = setmetatable({}, { __index = function(t, i)
|
||||
row:SetNormalFontObject(GameFontHighlightLeft)
|
||||
row:SetCheckedTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
|
||||
row:SetScript("OnClick", function()
|
||||
AtlasLootDefaultFrame_SubTableScrollFrameUpdate(row.tablename, row.dataSource, row.pFrame, row.tablenum);
|
||||
AtlasLoot_ShowItemsFrame(row.tablename, row.dataSource, row.dataSource[row.tablename][row.tablenum].Name, row.pFrame, row.tablenum);
|
||||
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
|
||||
AtlasLootDefaultFrame_SubTableScrollFrameUpdate(row.tablename, row.dataSource, pFrame, row.tablenum);
|
||||
AtlasLoot_ShowItemsFrame(row.tablename, row.dataSource, row.dataSource[row.tablename][row.tablenum].Name, pFrame, row.tablenum);
|
||||
end)
|
||||
if i == 1 then
|
||||
row:SetPoint("TOPLEFT", subtableFrame, 8, -8)
|
||||
|
||||
Reference in New Issue
Block a user