rebuilt wishlist
This commit is contained in:
@@ -400,12 +400,12 @@ function AtlasLoot:CreateToken(dataID)
|
||||
item:ContinueOnLoad(function(itemID)
|
||||
if itemType == select(9, GetItemInfo(itemID)) or itemType2 == select(9, GetItemInfo(itemID)) then
|
||||
table.insert(AtlasLoot_TokenData[orgID][1], {#AtlasLoot_TokenData[orgID][1] + 1, v[2], v[3], v[4], t.Name});
|
||||
end
|
||||
end)
|
||||
if #AtlasLoot_Data[dataID] == n and #t == c then
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]);
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -456,7 +456,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
|
||||
dataSource = _G[dataSource] or AtlasLoot_Data;
|
||||
|
||||
-- Check to see if Atlas is loaded and the table has a map
|
||||
if dataSource[dataID].Map and ATLASLOOT_ATLASLOADED then
|
||||
if dataSource_backup ~= "AtlasLoot_TokenData" and dataSource[dataID].Map and ATLASLOOT_ATLASLOADED then
|
||||
AtlasLootDefaultFrame_MapButton:Enable();
|
||||
AtlasLootDefaultFrame_MapSelectButton:Enable();
|
||||
-- Stops map reseting to default while still in the same raid/instance table
|
||||
@@ -487,6 +487,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
|
||||
|
||||
-- Set current type
|
||||
ATLASLOOT_CURRENTTYPE = dataSource[dataID].Type or "Default";
|
||||
|
||||
AtlasLoot:ScrollFrameUpdate();
|
||||
AtlasLoot_BossName:SetText(dataSource[dataID][tablenum].Name);
|
||||
|
||||
@@ -588,7 +589,11 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
|
||||
|
||||
--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, tablenum};
|
||||
--and dataSource[dataID].Back ~= true
|
||||
|
||||
if dataID ~= "FilterList" then
|
||||
AtlasLootItemsFrame.refreshFilter = {dataID, dataSource_backup, tablenum};
|
||||
end
|
||||
|
||||
if dataID ~= "WishList" and dataID ~= "FilterList" and dataSource[dataID].Back ~= true then
|
||||
AtlasLootItemsFrame.refreshOri = {dataID, dataSource_backup, tablenum};
|
||||
end
|
||||
@@ -704,7 +709,11 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
|
||||
|
||||
AtlasLootItemsFrame.refresh = {dataID, dataSource_backup, tablenum};
|
||||
|
||||
if dataID ~= "WishList" and dataID ~= "FilterList" and dataSource[dataID].Back ~= true and dataID ~= "EmptyTable" then
|
||||
if dataID ~= "FilterList" then
|
||||
AtlasLootItemsFrame.refreshFilter = {dataID, dataSource_backup, tablenum};
|
||||
end
|
||||
|
||||
if dataSource_backup ~= "AtlasLootWishList" and dataID ~= "FilterList" and dataSource[dataID].Back ~= true and dataID ~= "EmptyTable" then
|
||||
AtlasLootItemsFrame.refreshOri = {dataID, dataSource_backup, tablenum};
|
||||
AtlasLoot.db.profile.LastBoss = {dataID, dataSource_backup, tablenum, ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLoot.db.profile[ATLASLOOT_CURRENTTABLE] = {dataID, dataSource_backup, tablenum, ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
@@ -726,7 +735,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
|
||||
end
|
||||
|
||||
-- Show the Filter Check-Box
|
||||
if dataID ~= "WishList" and dataID ~= "SearchResult" and filterCheck(dataID) ~= true and dataSource ~= AtlasLoot_TokenData then
|
||||
if dataID ~= "SearchResult" and filterCheck(dataID) ~= true and dataSource_backup ~= "AtlasLoot_TokenData" and dataSource_backup ~= "AtlasLootWishList" then
|
||||
AtlasLootFilterCheck:Show();
|
||||
end
|
||||
|
||||
@@ -739,13 +748,14 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
|
||||
tablebase = {AtlasLootItemsFrame.refreshOri[1],AtlasLootItemsFrame.refreshOri[2]};
|
||||
tablenum = AtlasLootItemsFrame.refreshOri[3];
|
||||
end
|
||||
if tablenum ~= #dataSource[dataID] then
|
||||
|
||||
if tablenum ~= #_G[AtlasLootItemsFrame.refreshOri[2]][AtlasLootItemsFrame.refreshOri[1]] and dataSource_backup ~= "AtlasLoot_TokenData" then
|
||||
_G["AtlasLootItemsFrame_NEXT"]:Show();
|
||||
_G["AtlasLootItemsFrame_NEXT"].tablenum = tablenum + 1;
|
||||
_G["AtlasLootItemsFrame_NEXT"].tablebase = tablebase;
|
||||
|
||||
end
|
||||
if tablenum ~= 1 then
|
||||
|
||||
if tablenum ~= 1 and dataSource_backup ~= "AtlasLoot_TokenData" then
|
||||
_G["AtlasLootItemsFrame_PREV"]:Show();
|
||||
_G["AtlasLootItemsFrame_PREV"].tablenum = tablenum - 1;
|
||||
_G["AtlasLootItemsFrame_PREV"].tablebase = tablebase;
|
||||
@@ -757,7 +767,7 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
|
||||
end
|
||||
|
||||
--Anchor the item frame where it is supposed to be
|
||||
if ATLASLOOT_FILTER_ENABLE and dataID ~= "FilterList" and dataSource ~= AtlasLoot_TokenData then
|
||||
if ATLASLOOT_FILTER_ENABLE and dataID ~= "FilterList" then
|
||||
AtlasLoot:HideNoUsableItems();
|
||||
end
|
||||
|
||||
@@ -877,7 +887,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], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLootCharDB["QuickLooks"][1]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE, _G[AtlasLootItemsFrame.refreshOri[2]][AtlasLootItemsFrame.refreshOri[1]][AtlasLootItemsFrame.refreshOri[3]].Name};
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
@@ -887,7 +897,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], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLootCharDB["QuickLooks"][2]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE, _G[AtlasLootItemsFrame.refreshOri[2]][AtlasLootItemsFrame.refreshOri[1]][AtlasLootItemsFrame.refreshOri[3]].Name};
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
@@ -897,7 +907,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], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLootCharDB["QuickLooks"][3]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE, _G[AtlasLootItemsFrame.refreshOri[2]][AtlasLootItemsFrame.refreshOri[1]][AtlasLootItemsFrame.refreshOri[3]].Name};
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
@@ -907,7 +917,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], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLootCharDB["QuickLooks"][4]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE, _G[AtlasLootItemsFrame.refreshOri[2]][AtlasLootItemsFrame.refreshOri[1]][AtlasLootItemsFrame.refreshOri[3]].Name};
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
|
||||
@@ -103,7 +103,7 @@ function AtlasLoot_Testabc()
|
||||
end
|
||||
|
||||
function AtlasLoot:HideNoUsableItems()
|
||||
local dataID, dataSource, tablenum = AtlasLootItemsFrame.refreshOri[1], _G[AtlasLootItemsFrame.refreshOri[2]], AtlasLootItemsFrame.refreshOri[3];
|
||||
local dataID, dataSource, tablenum = AtlasLootItemsFrame.refreshFilter[1], _G[AtlasLootItemsFrame.refreshFilter[2]], AtlasLootItemsFrame.refreshFilter[3];
|
||||
|
||||
local tablebase = dataSource[dataID][tablenum]
|
||||
if not tablebase or dataID == "WishList" or dataID == "SearchResult" then return end
|
||||
@@ -112,7 +112,7 @@ function AtlasLoot:HideNoUsableItems()
|
||||
local count = 0
|
||||
local leatherworking = GetSpellInfo(2108)
|
||||
|
||||
AtlasLoot_Data["FilterList"] = { Type = dataSource[dataID].Type; Name = dataSource[dataID].Name;Map = dataSource[dataID].Map; [tablenum] = {Name = dataSource[dataID][tablenum].Name}; };
|
||||
AtlasLoot_Data["FilterList"] = { Type = dataSource[dataID].Type; Name = dataSource[dataID].Name; Back = dataSource[dataID].Back; Map = dataSource[dataID].Map; [tablenum] = {Name = dataSource[dataID][tablenum].Name}; };
|
||||
|
||||
for i=1,30 do
|
||||
local info = _G["AtlasLootItem_"..i.."_Extra"]:GetText()
|
||||
@@ -205,13 +205,13 @@ function AtlasLoot:HideNoUsableItems()
|
||||
end
|
||||
end
|
||||
|
||||
AtlasLoot:ShowItemsFrame("FilterList", AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3])
|
||||
AtlasLoot:ShowItemsFrame("FilterList", "AtlasLoot_Data", 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]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refreshFilter[1], AtlasLootItemsFrame.refreshFilter[2], AtlasLootItemsFrame.refreshFilter[3]);
|
||||
else
|
||||
ATLASLOOT_FILTER_ENABLE = true
|
||||
AtlasLoot:HideNoUsableItems();
|
||||
|
||||
@@ -240,7 +240,7 @@ function AtlasLootItem_OnClick(self ,arg1)
|
||||
elseif(IsControlKeyDown() and iteminfo) then
|
||||
DressUpItemLink(itemLink);
|
||||
elseif(IsAltKeyDown() and (self.itemID ~= 0)) then
|
||||
if AtlasLootItemsFrame.refresh[1] == "WishList" then
|
||||
if AtlasLootItemsFrame.refresh[2] == "AtlasLootWishList" then
|
||||
AtlasLoot_DeleteFromWishList(self.itemID);
|
||||
else
|
||||
if(AtlasLootItemsFrame.refresh[1] == "SearchResult") then
|
||||
@@ -270,7 +270,7 @@ function AtlasLootItem_OnClick(self ,arg1)
|
||||
spellID = string.sub(self.itemID, 2);
|
||||
ChatEdit_InsertLink(AtlasLoot_GetEnchantLink(spellID));
|
||||
elseif(IsAltKeyDown() and (self.itemID ~= 0)) then
|
||||
if AtlasLootItemsFrame.refresh[1] == "WishList" then
|
||||
if AtlasLootItemsFrame.refresh[2] == "AtlasLootWishList" then
|
||||
AtlasLoot_DeleteFromWishList(self.itemID);
|
||||
else
|
||||
spellName, _, _, _, _, _, _, _, _ = GetSpellInfo(string.sub(self.itemID, 2));
|
||||
|
||||
+88
-768
File diff suppressed because it is too large
Load Diff
@@ -295,7 +295,7 @@ local function presetcreate(preset,num)
|
||||
if self:IsEnabled() then
|
||||
GameTooltip:ClearLines();
|
||||
GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 5);
|
||||
GameTooltip:AddLine(AtlasLootCharDB["QuickLooks"][num][3]);
|
||||
GameTooltip:AddLine(AtlasLootCharDB["QuickLooks"][num][6]);
|
||||
GameTooltip:Show();
|
||||
end
|
||||
end);
|
||||
|
||||
@@ -309,6 +309,7 @@ if AL then
|
||||
AL["Send"] = true;
|
||||
AL["Cancel"] = true;
|
||||
AL["Delete Wishlist %s?"] = true;
|
||||
AL["Delete Wishlist"] = true;
|
||||
AL["%s sends you a Wishlist. Accept?"] = true;
|
||||
AL[" tried to send you a Wishlist. Rejected because you are in combat."] = true;
|
||||
AL[" rejects your Wishlist."] = true;
|
||||
|
||||
Reference in New Issue
Block a user