removed pframe fixed filter
This commit is contained in:
@@ -63,7 +63,7 @@ local ORANGE = "|cffFF8400";
|
||||
|
||||
--Search panel open and close save variables
|
||||
--dataID, dataSource, pFrame, tablenumber
|
||||
SearchPrevData = {"", "", "", ""};
|
||||
SearchPrevData = {"", "", ""};
|
||||
|
||||
AtlasLootCharDB = {};
|
||||
AtlasLoot_TokenData = {};
|
||||
@@ -411,7 +411,7 @@ function AtlasLoot:CreateToken(dataID)
|
||||
end
|
||||
end)
|
||||
if #AtlasLoot_Data[dataID] == n and #t == c then
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]);
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -419,14 +419,14 @@ function AtlasLoot:CreateToken(dataID)
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot:ShowItemsFrame(dataID, dataSource, pFrame, tablenum):
|
||||
AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum):
|
||||
dataID - Name of the loot table
|
||||
dataSource - Table in the database where the loot table is stored
|
||||
tablenum - Number of the table with the loot in it
|
||||
tablenum - Table number of the loot table being displayed
|
||||
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, pFrame, tablenum)
|
||||
function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
|
||||
--Set up local variables needed for GetItemInfo, etc
|
||||
local itemName, itemLink, itemQuality, itemLevel, itemType, itemSubType, itemCount, itemEquipLoc, itemTexture, itemColor;
|
||||
local iconFrame, nameFrame, extraFrame, itemButton;
|
||||
@@ -434,7 +434,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
local isValid, isItem, toShow, IDfound;
|
||||
local spellName, spellIcon;
|
||||
|
||||
SearchPrevData = {dataID, dataSource, pFrame, tablenum};
|
||||
SearchPrevData = {dataID, dataSource, tablenum};
|
||||
|
||||
--If the loot table name has not been passed, throw up a debugging statement
|
||||
if dataID == nil then
|
||||
@@ -501,7 +501,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
--For stopping the subtable from changing if its a token table
|
||||
if dataSource[dataID].NoSubt == nil and dataID ~= "FilterList" then
|
||||
AtlasLootDefaultFrame_SubMenu:SetText(dataSource[dataID].Name);
|
||||
AtlasLoot:SubTableScrollFrameUpdate(dataID, dataSource, pFrame, tablenum);
|
||||
AtlasLoot:SubTableScrollFrameUpdate(dataID, dataSource, tablenum);
|
||||
end
|
||||
|
||||
--Hide UI objects so that only needed ones are shown
|
||||
@@ -565,7 +565,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
for i = 1, 30, 1 do
|
||||
--Check for a valid object (that it exists, and that it has a name
|
||||
getProperItemConditionals(dataSource[dataID][tablenum][i]);
|
||||
|
||||
|
||||
if isValid and toShow then
|
||||
if isItem then
|
||||
itemName, itemLink, itemQuality, itemLevel, itemMinLevel, itemType, itemSubType, itemCount, itemEquipLoc, itemTexture = GetItemInfo(IDfound);
|
||||
@@ -595,10 +595,10 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
end
|
||||
|
||||
--Store data about the state of the items frame to allow minor tweaks or a recall of the current loot page
|
||||
AtlasLootItemsFrame.refresh = {dataID, dataSource_backup, pFrame, tablenum};
|
||||
AtlasLootItemsFrame.refresh = {dataID, dataSource_backup, tablenum};
|
||||
--and dataSource[dataID].Back ~= true
|
||||
if dataID ~= "WishList" and dataID ~= "FilterList" and dataSource[dataID].Back ~= true then
|
||||
AtlasLootItemsFrame.refreshOri = {dataID, dataSource_backup, pFrame, tablenum};
|
||||
AtlasLootItemsFrame.refreshOri = {dataID, dataSource_backup, tablenum};
|
||||
end
|
||||
|
||||
--Insert the item description
|
||||
@@ -710,11 +710,11 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
end
|
||||
end
|
||||
|
||||
AtlasLootItemsFrame.refresh = {dataID, dataSource, pFrame, tablenum};
|
||||
AtlasLootItemsFrame.refresh = {dataID, dataSource, tablenum};
|
||||
|
||||
if dataID ~= "WishList" and dataID ~= "FilterList" and dataSource[dataID].Back ~= true then
|
||||
AtlasLootItemsFrame.refreshOri = {dataID, dataSource, pFrame, tablenum};
|
||||
AtlasLoot.db.profile.LastBoss = {dataID, dataSource, pFrame, tablenum, ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLootItemsFrame.refreshOri = {dataID, dataSource, tablenum};
|
||||
AtlasLoot.db.profile.LastBoss = {dataID, dataSource, tablenum, ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
end
|
||||
|
||||
--This is a valid QuickLook, so show the UI objects
|
||||
@@ -733,7 +733,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
end
|
||||
|
||||
-- Show the Filter Check-Box
|
||||
if dataID ~= "WishList" and dataID ~= "SearchResult" and filterCheck(dataID) ~= true then
|
||||
if dataID ~= "WishList" and dataID ~= "SearchResult" and filterCheck(dataID) ~= true and dataSource ~= AtlasLoot_TokenData then
|
||||
AtlasLootFilterCheck:Show();
|
||||
end
|
||||
|
||||
@@ -744,7 +744,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
local tablebase = {dataID, dataSource};
|
||||
if dataID == "FilterList" then
|
||||
tablebase = {AtlasLootItemsFrame.refreshOri[1],AtlasLootItemsFrame.refreshOri[2]};
|
||||
tablenum = AtlasLootItemsFrame.refreshOri[4];
|
||||
tablenum = AtlasLootItemsFrame.refreshOri[3];
|
||||
end
|
||||
if tablenum ~= #tablebase[2][tablebase[1]] then
|
||||
getglobal("AtlasLootItemsFrame_NEXT"):Show();
|
||||
@@ -764,8 +764,8 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
end
|
||||
|
||||
--Anchor the item frame where it is supposed to be
|
||||
if ATLASLOOT_FILTER_ENABLE and dataID ~= "FilterList" then
|
||||
AtlasLoot_HideNoUsableItems();
|
||||
if ATLASLOOT_FILTER_ENABLE and dataID ~= "FilterList" and dataSource ~= AtlasLoot_TokenData then
|
||||
AtlasLoot:HideNoUsableItems();
|
||||
end
|
||||
|
||||
AtlasLoot:QueryLootPage();
|
||||
@@ -777,7 +777,7 @@ Called when <-, -> are pressed and calls up the appropriate loot page
|
||||
]]
|
||||
function AtlasLoot:NavButton_OnClick(self)
|
||||
local tablenum, dataID, dataSource = self.tablenum, self.tablebase[1], self.tablebase[2];
|
||||
AtlasLoot:ShowItemsFrame(dataID, dataSource, AtlasLootItemsFrame.refresh[3], tablenum);
|
||||
AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum);
|
||||
end
|
||||
|
||||
--[[
|
||||
@@ -785,7 +785,7 @@ AtlasLoot:NavButton_OnClick:
|
||||
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]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3]);
|
||||
end
|
||||
|
||||
--[[
|
||||
@@ -880,7 +880,7 @@ function AtlasLoot:ShowQuickLooks(button)
|
||||
"tooltipTitle", AL["QuickLook"].." 1",
|
||||
"tooltipText", AL["Assign this loot table\n to QuickLook"].." 1",
|
||||
"func", function()
|
||||
AtlasLootCharDB["QuickLooks"][1]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLootCharDB["QuickLooks"][1]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[3], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
@@ -890,7 +890,7 @@ function AtlasLoot:ShowQuickLooks(button)
|
||||
"tooltipTitle", AL["QuickLook"].." 2",
|
||||
"tooltipText", AL["Assign this loot table\n to QuickLook"].." 2",
|
||||
"func", function()
|
||||
AtlasLootCharDB["QuickLooks"][2]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLootCharDB["QuickLooks"][2]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[3], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
@@ -900,7 +900,7 @@ function AtlasLoot:ShowQuickLooks(button)
|
||||
"tooltipTitle", AL["QuickLook"].." 3",
|
||||
"tooltipText", AL["Assign this loot table\n to QuickLook"].." 3",
|
||||
"func", function()
|
||||
AtlasLootCharDB["QuickLooks"][3]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLootCharDB["QuickLooks"][3]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[3], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
@@ -910,7 +910,7 @@ function AtlasLoot:ShowQuickLooks(button)
|
||||
"tooltipTitle", AL["QuickLook"].." 4",
|
||||
"tooltipText", AL["Assign this loot table\n to QuickLook"].." 4",
|
||||
"func", function()
|
||||
AtlasLootCharDB["QuickLooks"][4]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLootCharDB["QuickLooks"][4]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[3], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
@@ -961,7 +961,7 @@ function AtlasLoot:QueryLootPage()
|
||||
COUNTED = COUNTED + 1;
|
||||
if not REFRESHED and (COUNTED == MAX_BUTTONS) then
|
||||
REFRESHED = true;
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]);
|
||||
end
|
||||
end)
|
||||
else
|
||||
@@ -997,7 +997,7 @@ local lastitem
|
||||
if not (item:GetInfo()) then
|
||||
item:ContinueOnLoad(function(itemId)
|
||||
if i == lastitem then
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]);
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
+17
-20
@@ -5,7 +5,7 @@ Loot browser associating loot with instance bosses
|
||||
Can be integrated with Atlas (http://www.atlasmod.com)
|
||||
|
||||
Functions:
|
||||
AtlasLoot_HideNoUsableItems()
|
||||
AtlasLoot:HideNoUsableItems()
|
||||
AtlasLoot_FilterEnableButton()
|
||||
<local> CreateCheckButton(parrent, text, num)
|
||||
AtlasLoote_CreateFilterOptions()
|
||||
@@ -92,7 +92,7 @@ local ClassHides = {
|
||||
|
||||
-- **********************************************************************
|
||||
-- ItemFilter:
|
||||
-- AtlasLoot_HideNoUsableItems()
|
||||
-- AtlasLoot:HideNoUsableItems()
|
||||
-- AtlasLoot_FilterEnableButton()
|
||||
-- **********************************************************************
|
||||
|
||||
@@ -100,15 +100,12 @@ AtlasLoot_Data["FilterList"] = { [1] = {}; };
|
||||
|
||||
function AtlasLoot_Testabc()
|
||||
print(BabbleInventory["Two-Hand"])
|
||||
end
|
||||
|
||||
|
||||
function AtlasLoot_HideNoUsableItems()
|
||||
local dataID = AtlasLootItemsFrame.refreshOri[1]
|
||||
local dataSource = AtlasLootItemsFrame.refreshOri[2]
|
||||
local pFrame = AtlasLootItemsFrame.refreshOri[3]
|
||||
local tablenum = AtlasLootItemsFrame.refreshOri[4]
|
||||
local tablebase = AtlasLoot_Data[dataID][tablenum]
|
||||
end
|
||||
|
||||
function AtlasLoot:HideNoUsableItems()
|
||||
local dataID, dataSource, tablenum = AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3];
|
||||
|
||||
local tablebase = dataSource[dataID][tablenum]
|
||||
if not tablebase or dataID == "WishList" or dataID == "SearchResult" then return end
|
||||
local itemCount = 0
|
||||
local countAll = 1
|
||||
@@ -133,7 +130,7 @@ function AtlasLoot_HideNoUsableItems()
|
||||
-- remove the "-"
|
||||
xitemExtraText = gsub(xitemExtraText, "-", "")
|
||||
local xitemNameText = getglobal("AtlasLootItem_"..i.."_Name"):GetText()
|
||||
|
||||
|
||||
if xitemExtraText and xitemExtraText ~= "" then
|
||||
for k = 1,#FilterSort do
|
||||
k = FilterSort[k]
|
||||
@@ -165,7 +162,7 @@ function AtlasLoot_HideNoUsableItems()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- Sort the items
|
||||
if xgo == true then
|
||||
if i==16 and countOld > 0 then
|
||||
@@ -183,7 +180,7 @@ function AtlasLoot_HideNoUsableItems()
|
||||
else
|
||||
AtlasLoot_Data["FilterList"][tablenum][countAll] = { countAll, xitemID, xitemTexture, xitemNameText, xitemExtraTextSave}
|
||||
end
|
||||
|
||||
|
||||
if tablebase[itemCount][6] and countAll==16 then
|
||||
AtlasLoot_Data["FilterList"][tablenum][16][6] = tablebase[itemCount][6]
|
||||
elseif tablebase[itemCount][6] and countAll~=16 then
|
||||
@@ -205,25 +202,25 @@ function AtlasLoot_HideNoUsableItems()
|
||||
end
|
||||
else
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
AtlasLoot:ShowItemsFrame("FilterList", AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4])
|
||||
|
||||
AtlasLoot:ShowItemsFrame("FilterList", AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3])
|
||||
end
|
||||
|
||||
function AtlasLoot_FilterEnableButton()
|
||||
if ATLASLOOT_FILTER_ENABLE == true then
|
||||
ATLASLOOT_FILTER_ENABLE = false;
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3]);
|
||||
else
|
||||
ATLASLOOT_FILTER_ENABLE = true
|
||||
AtlasLoot_HideNoUsableItems();
|
||||
AtlasLoot:HideNoUsableItems();
|
||||
end
|
||||
end
|
||||
|
||||
-- **********************************************************************
|
||||
-- Options:
|
||||
-- AtlasLoot_HideNoUsableItems()
|
||||
-- AtlasLoot:HideNoUsableItems()
|
||||
-- <local> CreateCheckButton(parrent, text, num)
|
||||
-- AtlasLoote_CreateFilterOptions()
|
||||
-- **********************************************************************
|
||||
|
||||
@@ -255,7 +255,7 @@ function AtlasLootItem_OnClick(self ,arg1)
|
||||
elseif((AtlasLootItemsFrame.refresh[1] == "SearchResult" or AtlasLootItemsFrame.refresh[1] == "WishList") and self.sourcePage) then
|
||||
local dataID, dataSource, dataPage = strsplit("|", self.sourcePage);
|
||||
if(dataID and dataSource) then
|
||||
AtlasLoot:ShowItemsFrame(dataID, AtlasLoot_Data, AtlasLootItemsFrame.refresh[3], tonumber(dataPage));
|
||||
AtlasLoot:ShowItemsFrame(dataID, AtlasLoot_Data, tonumber(dataPage));
|
||||
end
|
||||
elseif (arg1=="LeftButton") and self.sourcePage then
|
||||
--Create token table if there isnt one
|
||||
@@ -263,7 +263,7 @@ function AtlasLootItem_OnClick(self ,arg1)
|
||||
AtlasLoot:CreateToken(self.sourcePage)
|
||||
end
|
||||
--Show token table
|
||||
AtlasLoot:ShowItemsFrame(self.sourcePage, AtlasLoot_TokenData, AtlasLootItemsFrame.refresh[3], 1);
|
||||
AtlasLoot:ShowItemsFrame(self.sourcePage, AtlasLoot_TokenData, 1);
|
||||
end
|
||||
else
|
||||
if IsShiftKeyDown() then
|
||||
@@ -288,7 +288,7 @@ function AtlasLootItem_OnClick(self ,arg1)
|
||||
elseif((AtlasLootItemsFrame.refresh[1] == "SearchResult" or AtlasLootItemsFrame.refresh[1] == "WishList") and self.sourcePage) then
|
||||
local dataID, dataSource, dataPage = strsplit("|", self.sourcePage);
|
||||
if(dataID and dataSource) then
|
||||
AtlasLoot:ShowItemsFrame(dataID, AtlasLoot_Data, AtlasLootItemsFrame.refresh[3], tonumber(dataPage));
|
||||
AtlasLoot:ShowItemsFrame(dataID, AtlasLoot_Data, tonumber(dataPage));
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -692,7 +692,7 @@ local function DoSearch(searchText)
|
||||
end
|
||||
|
||||
function AtlasLoot:ShowSearchResult()
|
||||
AtlasLoot:ShowItemsFrame("SearchResult", AtlasLootCharDB, pFrame, 1);
|
||||
AtlasLoot:ShowItemsFrame("SearchResult", AtlasLootCharDB, 1);
|
||||
end
|
||||
|
||||
function AtlasLoot:Search(Text)
|
||||
@@ -743,8 +743,7 @@ function AtlasLoot:Search(Text)
|
||||
end
|
||||
DEFAULT_CHAT_FRAME:AddMessage(RED .. AL["AtlasLoot"] .. ": " .. WHITE .. AL["No match found for"] .. " \"" .. Text .. "\"." .. itemFilterErrorMessage);
|
||||
else
|
||||
--SearchResult = AtlasLoot_CategorizeWishList(AtlasLootCharDB["SearchResult"]);
|
||||
AtlasLoot:ShowItemsFrame("SearchResult", AtlasLootCharDB, pFrame, 1);
|
||||
AtlasLoot:ShowItemsFrame("SearchResult", AtlasLootCharDB, 1);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ function AtlasLoot_AdvancedSearchClose()
|
||||
AtlasLootDefaultFrame_AdvancedSearchPanel:Hide();
|
||||
|
||||
if (SearchPrevData[1] ~= "") then
|
||||
AtlasLoot:ShowItemsFrame(SearchPrevData[1], SearchPrevData[2], SearchPrevData[3], SearchPrevData[4]);
|
||||
AtlasLoot:ShowItemsFrame(SearchPrevData[1], SearchPrevData[2], SearchPrevData[3]);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -68,21 +68,21 @@ function AtlasLoot_ShowWishList()
|
||||
AtlasLootWishList["WishList"].Name = "Wish List";
|
||||
AtlasLootWishList["WishList"].Back = true;
|
||||
AtlasLootWishList["WishList"][1].Name = AtlasLootWishList["Own"][playerName][lastWishListarg2]["info"][1];
|
||||
AtlasLoot:ShowItemsFrame("WishList", AtlasLootWishList, pFrame, 1);
|
||||
AtlasLoot:ShowItemsFrame("WishList", AtlasLootWishList, 1);
|
||||
elseif lastWishListtyp == "addOther" then
|
||||
AtlasLootWishList["WishList"] = AtlasLootWishList["Own"][lastWishListarg2];
|
||||
sort();
|
||||
AtlasLootWishList["WishList"].Name = "Wish List";
|
||||
AtlasLootWishList["WishList"].Back = true;
|
||||
AtlasLootWishList["WishList"][1].Name = AtlasLootWishList["Own"][lastWishListarg2][lastWishListarg3]["info"][1];
|
||||
AtlasLoot:ShowItemsFrame("WishList", AtlasLootWishList, pFrame, 1);
|
||||
AtlasLoot:ShowItemsFrame("WishList", AtlasLootWishList, 1);
|
||||
elseif lastWishListtyp == "addShared" then
|
||||
AtlasLootWishList["WishList"] = AtlasLootWishList["Shared"][lastWishListarg2];
|
||||
sort();
|
||||
AtlasLootWishList["WishList"].Name = "Wish List";
|
||||
AtlasLootWishList["WishList"].Back = true;
|
||||
AtlasLootWishList["WishList"][1].Name = AtlasLootWishList["Shared"][lastWishListarg2][lastWishListarg3]["info"][1];
|
||||
AtlasLoot:ShowItemsFrame("WishList", AtlasLootWishList, pFrame, 1);
|
||||
AtlasLoot:ShowItemsFrame("WishList", AtlasLootWishList, 1);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -40,15 +40,15 @@ function AtlasLootDefaultFrame_OnShow()
|
||||
--Set the item table to the loot table
|
||||
--Show the last displayed loot table
|
||||
local lastboss = AtlasLoot.db.profile.LastBoss;
|
||||
if lastboss and lastboss[5] then
|
||||
ATLASLOOT_CURRENTTABLE = lastboss[6];
|
||||
ATLASLOOT_LASTMODULE = lastboss[5];
|
||||
AtlasLoot:IsLootTableAvailable(lastboss[5]);
|
||||
AtlasLoot:ShowItemsFrame(lastboss[1], AtlasLoot_Data, pFrame, lastboss[4]);
|
||||
if lastboss and lastboss[4] then
|
||||
ATLASLOOT_CURRENTTABLE = lastboss[5];
|
||||
ATLASLOOT_LASTMODULE = lastboss[4];
|
||||
AtlasLoot:IsLootTableAvailable(lastboss[4]);
|
||||
AtlasLoot:ShowItemsFrame(lastboss[1], AtlasLoot_Data, lastboss[3]);
|
||||
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
|
||||
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[lastboss[6]]);
|
||||
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[lastboss[5]]);
|
||||
else
|
||||
AtlasLoot:ShowItemsFrame("EmptyTable", AtlasLoot_Data, pFrame,1);
|
||||
AtlasLoot:ShowItemsFrame("EmptyTable", AtlasLoot_Data, 1);
|
||||
end
|
||||
end
|
||||
|
||||
@@ -91,12 +91,10 @@ text - Heading for the loot table
|
||||
Called when a button in AtlasLoot_DewdropSubMenu is clicked
|
||||
]]
|
||||
function AtlasLoot:DewDropSubMenuClick(tablename)
|
||||
--Definition of where I want the loot table to be shown
|
||||
--Show the select loot table
|
||||
local tablenum = AtlasLoot_Data[tablename].Loadfirst or 1;
|
||||
|
||||
--Show the table that has been selected
|
||||
AtlasLoot:ShowItemsFrame(tablename, AtlasLoot_Data, pFrame, tablenum);
|
||||
AtlasLoot:ShowItemsFrame(tablename, AtlasLoot_Data, tablenum);
|
||||
AtlasLoot_DewdropSubMenu:Close(1);
|
||||
end
|
||||
|
||||
|
||||
@@ -301,10 +301,10 @@ local function presetcreate(preset,num)
|
||||
end
|
||||
end);
|
||||
preset:SetScript("OnClick", function()
|
||||
if AtlasLoot:IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][num][5]) then
|
||||
ATLASLOOT_LASTMODULE = AtlasLootCharDB["QuickLooks"][num][5];
|
||||
ATLASLOOT_CURRENTTABLE = AtlasLootCharDB["QuickLooks"][num][6];
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootCharDB["QuickLooks"][num][1], AtlasLootCharDB["QuickLooks"][num][2], pFrame, AtlasLootCharDB["QuickLooks"][num][4]);
|
||||
if AtlasLoot:IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][num][4]) then
|
||||
ATLASLOOT_LASTMODULE = AtlasLootCharDB["QuickLooks"][num][4];
|
||||
ATLASLOOT_CURRENTTABLE = AtlasLootCharDB["QuickLooks"][num][5];
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootCharDB["QuickLooks"][num][1], AtlasLootCharDB["QuickLooks"][num][2], AtlasLootCharDB["QuickLooks"][num][3]);
|
||||
end
|
||||
end);
|
||||
preset:SetScript("OnShow", function(self)
|
||||
@@ -457,7 +457,7 @@ local rows = setmetatable({}, { __index = function(t, i)
|
||||
row:SetScript("OnClick", function()
|
||||
ItemindexID = row.itemIndex;
|
||||
if not AtlasLootDefaultFrame_AdvancedSearchPanel:IsVisible() then
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]);
|
||||
end
|
||||
AtlasLoot:ScrollFrameUpdate();
|
||||
end)
|
||||
@@ -485,12 +485,11 @@ local subtableFrame = CreateFrame("Frame", "Atlasloot_SubTableFrame", AtlasLootD
|
||||
insets = { left = 4, right = 4, top = 4, bottom = 4 },
|
||||
});
|
||||
|
||||
function AtlasLoot:SubTableScrollFrameUpdate(tablename, dataSource, pFrame, tablenum)
|
||||
function AtlasLoot:SubTableScrollFrameUpdate(tablename, dataSource, tablenum)
|
||||
local maxValue = #dataSource[tablename];
|
||||
subtableFrame.tablename = tablename;
|
||||
subtableFrame.dataSource = dataSource;
|
||||
subtableFrame.tablenum = tablenum;
|
||||
subtableFrame.pFrame = pFrame;
|
||||
FauxScrollFrame_Update(subtableFrame.scrollBar, maxValue, MAX_ROWS2, ROW_HEIGHT);
|
||||
local offset = FauxScrollFrame_GetOffset(subtableFrame.scrollBar);
|
||||
for i = 1, MAX_ROWS2 do
|
||||
@@ -502,7 +501,6 @@ function AtlasLoot:SubTableScrollFrameUpdate(tablename, dataSource, pFrame, tabl
|
||||
row.dataSource = dataSource;
|
||||
row.tablename = tablename;
|
||||
row.tablenum = value;
|
||||
row.pFrame = pFrame;
|
||||
if dataSource == AtlasLoot_MapData then
|
||||
row.Text:SetText(dataSource[tablename][value][1]);
|
||||
row:SetScript("OnEnter", function(self)
|
||||
@@ -549,7 +547,7 @@ local rows2 = setmetatable({}, { __index = function(t, i)
|
||||
row.Text:SetJustifyH("LEFT");
|
||||
row:SetScript("OnClick", function()
|
||||
if row.dataSource ~= AtlasLoot_MapData then
|
||||
AtlasLoot:ShowItemsFrame(row.tablename, row.dataSource, row.pFrame, row.tablenum);
|
||||
AtlasLoot:ShowItemsFrame(row.tablename, row.dataSource, row.tablenum);
|
||||
else
|
||||
row:SetChecked(false);
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user