more wishlist changes
-added options button menu -added set default wishlist to menu -added add list to menu -added delete to menu -added edit to menu -added clone shared wishlist to own lists to menu -fixed not being able to send shared wishlists
This commit is contained in:
@@ -400,9 +400,9 @@ function AtlasLoot:CreateToken(dataID)
|
|||||||
item:ContinueOnLoad(function(itemID)
|
item:ContinueOnLoad(function(itemID)
|
||||||
if itemType == select(9, GetItemInfo(itemID)) or itemType2 == select(9, GetItemInfo(itemID)) then
|
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});
|
table.insert(AtlasLoot_TokenData[orgID][1], {#AtlasLoot_TokenData[orgID][1] + 1, v[2], v[3], v[4], t.Name});
|
||||||
if #AtlasLoot_Data[dataID] == n and #t == c then
|
end
|
||||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]);
|
if #AtlasLoot_Data[dataID] == n and #t == c then
|
||||||
end
|
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]);
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@@ -743,17 +743,15 @@ function AtlasLoot:ShowItemsFrame(dataID, dataSource, tablenum)
|
|||||||
_G["AtlasLootItemsFrame_BACK"]:Hide();
|
_G["AtlasLootItemsFrame_BACK"]:Hide();
|
||||||
_G["AtlasLootItemsFrame_NEXT"]:Hide();
|
_G["AtlasLootItemsFrame_NEXT"]:Hide();
|
||||||
_G["AtlasLootItemsFrame_PREV"]:Hide();
|
_G["AtlasLootItemsFrame_PREV"]:Hide();
|
||||||
_G["AtlasLootItemsFrame_Wishlist_EDIT"]:Hide();
|
_G["AtlasLootItemsFrame_Wishlist_Options"]:Hide();
|
||||||
_G["AtlasLootItemsFrame_Wishlist_DELETE"]:Hide();
|
|
||||||
_G["AtlasLootItemsFrame_Wishlist_ADD"]:Hide();
|
|
||||||
_G["AtlasLootItemsFrame_Wishlist_Share"]:Hide();
|
_G["AtlasLootItemsFrame_Wishlist_Share"]:Hide();
|
||||||
|
|
||||||
|
-- Show Wishlist buttons when a wishlist in showing
|
||||||
if dataSource_backup == "AtlasLootWishList" then
|
if dataSource_backup == "AtlasLootWishList" then
|
||||||
_G["AtlasLootItemsFrame_Wishlist_EDIT"]:Show();
|
_G["AtlasLootItemsFrame_Wishlist_Options"]:Show();
|
||||||
_G["AtlasLootItemsFrame_Wishlist_DELETE"]:Show();
|
|
||||||
_G["AtlasLootItemsFrame_Wishlist_ADD"]:Show();
|
|
||||||
_G["AtlasLootItemsFrame_Wishlist_Share"]:Show();
|
_G["AtlasLootItemsFrame_Wishlist_Share"]:Show();
|
||||||
end
|
end
|
||||||
|
|
||||||
local tablebase = {dataID, dataSource_backup};
|
local tablebase = {dataID, dataSource_backup};
|
||||||
if dataID == "FilterList" then
|
if dataID == "FilterList" then
|
||||||
tablebase = {AtlasLootItemsFrame.refreshOri[1],AtlasLootItemsFrame.refreshOri[2]};
|
tablebase = {AtlasLootItemsFrame.refreshOri[1],AtlasLootItemsFrame.refreshOri[2]};
|
||||||
|
|||||||
+158
-174
@@ -5,7 +5,6 @@ Functions:
|
|||||||
AtlasLoot_AddToWishlist(itemID, itemTexture, itemName, lootPage, sourcePage)
|
AtlasLoot_AddToWishlist(itemID, itemTexture, itemName, lootPage, sourcePage)
|
||||||
AtlasLoot_DeleteFromWishList(itemID)
|
AtlasLoot_DeleteFromWishList(itemID)
|
||||||
AtlasLoot_WishListCheck(itemID, all)
|
AtlasLoot_WishListCheck(itemID, all)
|
||||||
AtlasLoot_CheckWishlistItem(itemID ,[playerName ,[wishlist] ])
|
|
||||||
|
|
||||||
<local> ClearLines()
|
<local> ClearLines()
|
||||||
<local> AddWishListOptions(parrent,name,icon,xxx,tabname,tab2)
|
<local> AddWishListOptions(parrent,name,icon,xxx,tabname,tab2)
|
||||||
@@ -19,12 +18,14 @@ local BabbleFaction = AtlasLoot_GetLocaleLibBabble("LibBabble-Faction-3.0")
|
|||||||
local ALModule = AtlasLoot:NewModule("WishList", "AceSerializer-3.0", "AceComm-3.0")
|
local ALModule = AtlasLoot:NewModule("WishList", "AceSerializer-3.0", "AceComm-3.0")
|
||||||
|
|
||||||
AtlasLoot_WishListDrop = AceLibrary("Dewdrop-2.0");
|
AtlasLoot_WishListDrop = AceLibrary("Dewdrop-2.0");
|
||||||
|
AtlasLoot_WishListOptions = AceLibrary("Dewdrop-2.0");
|
||||||
|
|
||||||
AtlasLoot_WishList = nil;
|
AtlasLoot_WishList = nil;
|
||||||
local playerName = UnitName("player");
|
local playerName = UnitName("player");
|
||||||
local itemID, itemTexture, itemName, lootPage, sourcePage, xtyp, xarg2, xarg3, difficulty;
|
local itemID, itemTexture, itemName, lootPage, sourcePage, xtyp, xarg2, xarg3, difficulty;
|
||||||
local OptionsLoadet = false;
|
local OptionsLoadet = false;
|
||||||
local curaddicon, curaddname, curtablenum = "","","";
|
local curaddicon, curaddname = "","";
|
||||||
|
local curtable = {"","",""};
|
||||||
local editName = false;
|
local editName = false;
|
||||||
|
|
||||||
AtlasLootWishList = {}
|
AtlasLootWishList = {}
|
||||||
@@ -54,7 +55,6 @@ function AtlasLoot_WishListAddDropClick(typ, arg2, arg3, arg4)
|
|||||||
else
|
else
|
||||||
xtyp = typ
|
xtyp = typ
|
||||||
xarg2 = arg2
|
xarg2 = arg2
|
||||||
xarg3 = arg3
|
|
||||||
if typ == "addOwn" then
|
if typ == "addOwn" then
|
||||||
if AtlasLoot_WishListCheck(itemID) then
|
if AtlasLoot_WishListCheck(itemID) then
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(BLUE..AL["AtlasLoot"]..": "..AtlasLoot_FixText(itemName)..RED..AL[" already in the WishList!"]..WHITE.." ("..AtlasLootWishList["Own"][arg2].Name..")");
|
DEFAULT_CHAT_FRAME:AddMessage(BLUE..AL["AtlasLoot"]..": "..AtlasLoot_FixText(itemName)..RED..AL[" already in the WishList!"]..WHITE.." ("..AtlasLootWishList["Own"][arg2].Name..")");
|
||||||
@@ -65,11 +65,11 @@ function AtlasLoot_WishListAddDropClick(typ, arg2, arg3, arg4)
|
|||||||
AtlasLoot_WishListDrop:Close(1)
|
AtlasLoot_WishListDrop:Close(1)
|
||||||
elseif typ == "addShared" then
|
elseif typ == "addShared" then
|
||||||
if AtlasLoot_WishListCheck(itemID) then
|
if AtlasLoot_WishListCheck(itemID) then
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(BLUE..AL["AtlasLoot"]..": "..AtlasLoot_FixText(itemName)..RED..AL[" already in the WishList!"]..WHITE.." ("..AtlasLootWishList["Shared"][arg2].Name.." - "..arg2..")");
|
DEFAULT_CHAT_FRAME:AddMessage(BLUE..AL["AtlasLoot"]..": "..AtlasLoot_FixText(itemName)..RED..AL[" already in the WishList!"]..WHITE.." ("..AtlasLootWishList["Shared"][arg2].Name);
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
table.insert(AtlasLootWishList["Shared"][arg2][arg3], { 0, itemID, itemTexture, itemName, lootPage, "", "", sourcePage, [AtlasLoot_Difficulty.DIF_SEARCH] = difficulty});
|
table.insert(AtlasLootWishList["Shared"][arg2], { #AtlasLootWishList["Shared"][arg2] + 1, itemID, itemTexture, itemName, lootPage, "", "", sourcePage});
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot"]..": "..AtlasLoot_FixText(itemName)..GREY..AL[" added to the WishList."]..WHITE.." ("..AtlasLootWishList["Shared"][arg2].Name.." - "..arg2..")");
|
DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot"]..": "..AtlasLoot_FixText(itemName)..GREY..AL[" added to the WishList."]..WHITE.." ("..AtlasLootWishList["Shared"][arg2].Name..")");
|
||||||
AtlasLoot_WishListDrop:Close(1)
|
AtlasLoot_WishListDrop:Close(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -105,6 +105,20 @@ function AtlasLoot:AddWishList()
|
|||||||
AtlasLoot_WishListDrop:Close(1);
|
AtlasLoot_WishListDrop:Close(1);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Clones a shared wishlist to personal table
|
||||||
|
function AtlasLoot:CloneSharedWishList()
|
||||||
|
table.insert(AtlasLootWishList["Own"],AtlasLootWishList[AtlasLootItemsFrame.refresh[1]][AtlasLootItemsFrame.refresh[3]]);
|
||||||
|
AtlasLoot_WishListDrop:Close(1);
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Clones a shared wishlist to personal table
|
||||||
|
function AtlasLoot:SetDefaultWishList()
|
||||||
|
if AtlasLootItemsFrame.refresh[1] == "Own" then
|
||||||
|
AtlasLootWishList["Options"][playerName]["DefaultWishList"] = {AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]};
|
||||||
|
end
|
||||||
|
AtlasLoot_WishListDrop:Close(1);
|
||||||
|
end
|
||||||
|
|
||||||
-- Deletes current wishlist
|
-- Deletes current wishlist
|
||||||
function AtlasLoot:DeleteWishList()
|
function AtlasLoot:DeleteWishList()
|
||||||
if AtlasLootItemsFrame.refresh[2] == "AtlasLootWishList" then
|
if AtlasLootItemsFrame.refresh[2] == "AtlasLootWishList" then
|
||||||
@@ -118,111 +132,105 @@ function AtlasLoot:ShareWishList()
|
|||||||
StaticPopup_Show ("ATLASLOOT_SEND_WISHLIST",AtlasLootWishList["Own"][AtlasLootItemsFrame.refresh[3]].Name);
|
StaticPopup_Show ("ATLASLOOT_SEND_WISHLIST",AtlasLootWishList["Own"][AtlasLootItemsFrame.refresh[3]].Name);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--[[
|
||||||
|
AtlasLoot:WishListButton
|
||||||
|
Main panel wishlist button
|
||||||
|
]]
|
||||||
|
function AtlasLoot:WishListButton(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show, buttonclick)
|
||||||
|
if buttonclick == "RightButton" then
|
||||||
|
AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show, "Enable")
|
||||||
|
elseif buttonclick == "LeftButton" then
|
||||||
|
AtlasLoot_WishListAddDropClick("addOwn", AtlasLootWishList["Options"][playerName]["DefaultWishList"][3] or 1, "", show)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show)
|
AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show)
|
||||||
Show the dropdownlist with the wishlists
|
Show the dropdownlist with the wishlists
|
||||||
]]
|
]]
|
||||||
function AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show)
|
function AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show, panelButton)
|
||||||
itemID, itemTexture, itemName, lootPage, sourcePage = xitemID, xitemTexture, xitemName, xlootPage, xsourcePage
|
itemID, itemTexture, itemName, lootPage, sourcePage = xitemID, xitemTexture, xitemName, xlootPage, xsourcePage
|
||||||
if AtlasLootWishList["Options"][playerName]["UseDefaultWishlist"] == false then
|
if AtlasLootWishList["Options"][playerName]["UseDefaultWishlist"] == true and panelButton ~= "Enable" then
|
||||||
if AtlasLoot_WishListDrop:IsOpen(button) then
|
AtlasLoot_WishListAddDropClick("addOwn", AtlasLootWishList["Options"][playerName]["DefaultWishList"][3], "", nil)
|
||||||
AtlasLoot_WishListDrop:Close(1);
|
return
|
||||||
else
|
else
|
||||||
local setOptions = function(level, value)
|
if AtlasLoot_WishListDrop:IsOpen(button) then
|
||||||
if level == 1 then
|
AtlasLoot_WishListDrop:Close(1);
|
||||||
AtlasLoot_WishListDrop:AddLine(
|
else
|
||||||
"text", AL["Own Wishlists"],
|
local setOptions = function(level, value)
|
||||||
"tooltipTitle", AL["Own Wishlists"],
|
if level == 1 then
|
||||||
"value", "OwnWishlists",
|
AtlasLoot_WishListDrop:AddLine(
|
||||||
"arg1", "1",
|
"text", AL["Own Wishlists"],
|
||||||
"hasArrow", true,
|
"tooltipTitle", AL["Own Wishlists"],
|
||||||
"func", AtlasLoot_WishListAddDropClick,
|
"value", "OwnWishlists",
|
||||||
"notCheckable", true
|
"arg1", "1",
|
||||||
);
|
"hasArrow", true,
|
||||||
AtlasLoot_WishListDrop:AddLine(
|
"func", AtlasLoot_WishListAddDropClick,
|
||||||
"text", AL["Shared Wishlists"],
|
"notCheckable", true
|
||||||
"tooltipTitle", AL["Shared Wishlists"],
|
);
|
||||||
"value", "SharedWishlists",
|
AtlasLoot_WishListDrop:AddLine(
|
||||||
"arg1", "1",
|
"text", AL["Shared Wishlists"],
|
||||||
"hasArrow", true,
|
"tooltipTitle", AL["Shared Wishlists"],
|
||||||
"func", AtlasLoot_WishListAddDropClick,
|
"value", "SharedWishlists",
|
||||||
"notCheckable", true
|
"arg1", "1",
|
||||||
);
|
"hasArrow", true,
|
||||||
AtlasLoot_WishListDrop:AddLine(
|
"func", AtlasLoot_WishListAddDropClick,
|
||||||
"text", AL["Add Wishlist"],
|
"notCheckable", true
|
||||||
"func", function() AtlasLoot:AddWishList() end,
|
);
|
||||||
"notCheckable", true
|
AtlasLoot_WishListDrop:AddLine(
|
||||||
);
|
"text", AL["Add Wishlist"],
|
||||||
AtlasLoot_WishListDrop:AddLine(
|
"func", function() AtlasLoot:AddWishList() end,
|
||||||
"text", AL["Close"],
|
"notCheckable", true
|
||||||
"func", function() AtlasLoot_WishListDrop:Close(1) end,
|
);
|
||||||
"notCheckable", true
|
AtlasLoot_WishListDrop:AddLine(
|
||||||
);
|
"text", AL["Close"],
|
||||||
elseif level == 2 then
|
"func", function() AtlasLoot_WishListDrop:Close(1) end,
|
||||||
if value == "OwnWishlists" then
|
"notCheckable", true
|
||||||
for k,v in pairs(AtlasLootWishList["Own"]) do
|
);
|
||||||
if type(v) == "table" then
|
elseif level == 2 then
|
||||||
AtlasLoot_WishListDrop:AddLine(
|
if value == "OwnWishlists" then
|
||||||
"text", v.Name,
|
for k,v in pairs(AtlasLootWishList["Own"]) do
|
||||||
"tooltipTitle", v.Name,
|
if type(v) == "table" then
|
||||||
"func", AtlasLoot_WishListAddDropClick,
|
AtlasLoot_WishListDrop:AddLine(
|
||||||
"arg1", "addOwn",
|
"text", v.Name,
|
||||||
"arg2", k,
|
"tooltipTitle", v.Name,
|
||||||
"arg3", "",
|
"func", AtlasLoot_WishListAddDropClick,
|
||||||
"arg4", show,
|
"arg1", "addOwn",
|
||||||
"notCheckable", true
|
"arg2", k,
|
||||||
);
|
"arg3", "",
|
||||||
end
|
"arg4", show,
|
||||||
end
|
"notCheckable", true
|
||||||
elseif value == "SharedWishlists" then
|
);
|
||||||
for k,v in pairs(AtlasLootWishList["Shared"]) do
|
end
|
||||||
if type(v) == "table" then
|
end
|
||||||
AtlasLoot_WishListDrop:AddLine(
|
elseif value == "SharedWishlists" then
|
||||||
"text", v.Name,
|
for k,v in pairs(AtlasLootWishList["Shared"]) do
|
||||||
"tooltipTitle", v.Name,
|
if type(v) == "table" then
|
||||||
"func", AtlasLoot_WishListAddDropClick,
|
AtlasLoot_WishListDrop:AddLine(
|
||||||
"arg1", "addShared",
|
"text", v.Name,
|
||||||
"arg2", k,
|
"tooltipTitle", v.Name,
|
||||||
"arg3", "",
|
"func", AtlasLoot_WishListAddDropClick,
|
||||||
"arg4", show,
|
"arg1", "addShared",
|
||||||
"notCheckable", true
|
"arg2", k,
|
||||||
);
|
"arg3", "",
|
||||||
end
|
"arg4", show,
|
||||||
end
|
"notCheckable", true
|
||||||
|
);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
AtlasLoot_WishListDrop:Open(button,
|
|
||||||
"point", function(parent)
|
|
||||||
return "TOPLEFT", "TOPRIGHT";
|
|
||||||
end,
|
|
||||||
"children", setOptions
|
|
||||||
);
|
|
||||||
end
|
|
||||||
else
|
|
||||||
for k,v in pairs(AtlasLootWishList["Own"][playerName]) do
|
|
||||||
if AtlasLootWishList["Own"][playerName][k]["info"] then
|
|
||||||
if AtlasLootWishList["Own"][playerName][k]["info"][2][playerName] == true then
|
|
||||||
AtlasLoot_WishListAddDropClick("addOwn", k, "", show)
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
AtlasLoot_WishListDrop:Open(button,
|
||||||
|
"point", function(parent)
|
||||||
|
return "TOP", "BOTTOM";
|
||||||
|
end,
|
||||||
|
"children", setOptions
|
||||||
|
);
|
||||||
end
|
end
|
||||||
|
|
||||||
for k,v in pairs(AtlasLootWishList["Own"]) do
|
-- DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot"]..": "..AL["Please set a default Wishlist."]);
|
||||||
if AtlasLootWishList["Own"][k] then
|
|
||||||
for i,j in pairs(AtlasLootWishList["Own"][k]) do
|
|
||||||
if AtlasLootWishList["Own"][k][i]["info"] then
|
|
||||||
if AtlasLootWishList["Own"][k][i]["info"][2][playerName] == true then
|
|
||||||
AtlasLoot_WishListAddDropClick("addOther", k, i, show)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot"]..": "..AL["Please set a default Wishlist."]);
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -322,81 +330,56 @@ function AtlasLoot_WishListCheck(itemID, all)
|
|||||||
end
|
end
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
AtlasLoot_CheckWishlistItem(itemID ,[playerName ,[wishlist] ])
|
AtlasLoot:WishListOptionsRegister:
|
||||||
Returns a Table with infos about the item.
|
Constructs the wishlist options category menu.
|
||||||
itemID -> Enter a ItemID
|
|
||||||
[playerName] -> Enter a PlayerName, needed if you want to check only wishlists from a particular player (if you need to check all players, enter nil)
|
|
||||||
[wishlist] -> Checks only this wishlist (playerName can be nil)
|
|
||||||
|
|
||||||
return:
|
|
||||||
table = {
|
|
||||||
[index] = {
|
|
||||||
[1] = "playerName",
|
|
||||||
[2] = "WishListName"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]]
|
]]
|
||||||
function AtlasLoot_CheckWishlistItem(itemID, playerName, wishList)
|
function AtlasLoot:WishListOptionsRegister()
|
||||||
if not itemID then return nil end
|
AtlasLoot_WishListOptions:Register(AtlasLootItemsFrame_Wishlist_Options,
|
||||||
local returnTable = {}
|
'point', function(parent)
|
||||||
local returnIndex = 1
|
return "TOP", "BOTTOM"
|
||||||
|
end,
|
||||||
if playerName and not wishList then
|
'children', function(level, value)
|
||||||
if not AtlasLootWishList["Own"][playerName] then return nil end
|
AtlasLoot_WishListOptions:AddLine(
|
||||||
for listIndex,_ in pairs(AtlasLootWishList["Own"][playerName]) do
|
"text", AL["Add Wishlist"],
|
||||||
for itemIndex,_ in pairs(AtlasLootWishList["Own"][playerName][listIndex]) do
|
"func", function() AtlasLoot:AddWishList() end,
|
||||||
if AtlasLootWishList["Own"][playerName][listIndex][itemIndex][2] == itemID then
|
"notCheckable", true
|
||||||
returnTable[returnIndex] = {}
|
);
|
||||||
returnTable[returnIndex][1] = playerName
|
AtlasLoot_WishListOptions:AddLine(
|
||||||
returnTable[returnIndex][2] = AtlasLootWishList["Own"][playerName][listIndex]["info"][1]
|
"text", AL["Edit Wishlist"],
|
||||||
returnIndex = returnIndex + 1
|
"func", function() AtlasLoot:EditWishList() end,
|
||||||
break
|
"notCheckable", true
|
||||||
|
);
|
||||||
|
if AtlasLootItemsFrame.refresh[1] == "Shared" then
|
||||||
|
AtlasLoot_WishListOptions:AddLine(
|
||||||
|
"text", AL["Copy Wishlist To Own"],
|
||||||
|
"func", function() AtlasLoot:CloneSharedWishList() end,
|
||||||
|
"notCheckable", true
|
||||||
|
);
|
||||||
end
|
end
|
||||||
end
|
if AtlasLootItemsFrame.refresh[1] == "Own" then
|
||||||
end
|
AtlasLoot_WishListOptions:AddLine(
|
||||||
elseif wishList then
|
"text", AL["Make Default Wishlist"],
|
||||||
for name,_ in pairs(AtlasLootWishList["Own"]) do
|
"func", function() AtlasLoot:SetDefaultWishList() end,
|
||||||
for listIndex,_ in pairs(AtlasLootWishList["Own"][name]) do
|
"notCheckable", true
|
||||||
if wishList ~= AtlasLootWishList["Own"][name][listIndex]["info"][1] then break end
|
);
|
||||||
for itemIndex,_ in pairs(AtlasLootWishList["Own"][name][listIndex]) do
|
|
||||||
if AtlasLootWishList["Own"][name][listIndex][itemIndex][2] == itemID then
|
|
||||||
if playerName and playerName == name then
|
|
||||||
returnTable[returnIndex] = {}
|
|
||||||
returnTable[returnIndex][1] = name
|
|
||||||
returnTable[returnIndex][2] = AtlasLootWishList["Own"][name][listIndex]["info"][1]
|
|
||||||
returnIndex = returnIndex + 1
|
|
||||||
break
|
|
||||||
elseif not playerName then
|
|
||||||
returnTable[returnIndex] = {}
|
|
||||||
returnTable[returnIndex][1] = name
|
|
||||||
returnTable[returnIndex][2] = AtlasLootWishList["Own"][name][listIndex]["info"][1]
|
|
||||||
returnIndex = returnIndex + 1
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
AtlasLoot_WishListOptions:AddLine(
|
||||||
end
|
"text", AL["Delete Wishlist"],
|
||||||
else
|
"func", function() AtlasLoot:DeleteWishList() end,
|
||||||
for name,_ in pairs(AtlasLootWishList["Own"]) do
|
"notCheckable", true
|
||||||
for listIndex,_ in pairs(AtlasLootWishList["Own"][name]) do
|
);
|
||||||
for itemIndex,_ in pairs(AtlasLootWishList["Own"][name][listIndex]) do
|
--Close button
|
||||||
if AtlasLootWishList["Own"][name][listIndex][itemIndex][2] == itemID then
|
AtlasLoot_WishListOptions:AddLine(
|
||||||
returnTable[returnIndex] = {}
|
'text', AL["Close Menu"],
|
||||||
returnTable[returnIndex][1] = name
|
'textR', 0,
|
||||||
returnTable[returnIndex][2] = AtlasLootWishList["Own"][name][listIndex]["info"][1]
|
'textG', 1,
|
||||||
returnIndex = returnIndex + 1
|
'textB', 1,
|
||||||
break
|
'func', function() AtlasLoot_WishListOptions:Close() end,
|
||||||
end
|
'notCheckable', true
|
||||||
end
|
);
|
||||||
end
|
end,
|
||||||
end
|
'dontHook', true
|
||||||
end
|
)
|
||||||
if type(returnTable) == "table" and #returnTable < 1 then
|
|
||||||
return nil
|
|
||||||
else
|
|
||||||
return returnTable
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- **********************************************************************
|
-- **********************************************************************
|
||||||
@@ -429,6 +412,7 @@ StaticPopupDialogs["ATLASLOOT_DELETE_WISHLIST"] = {
|
|||||||
end,
|
end,
|
||||||
OnAccept = function()
|
OnAccept = function()
|
||||||
table.remove(AtlasLootWishList[AtlasLootItemsFrame.refresh[1]], AtlasLootItemsFrame.refresh[3]);
|
table.remove(AtlasLootWishList[AtlasLootItemsFrame.refresh[1]], AtlasLootItemsFrame.refresh[3]);
|
||||||
|
AtlasLootWishList["Options"][playerName]["DefaultWishList"][3] = 1;
|
||||||
if AtlasLootWishList[AtlasLootItemsFrame.refresh[1]][1] == nil then
|
if AtlasLootWishList[AtlasLootItemsFrame.refresh[1]][1] == nil then
|
||||||
AtlasLoot:ShowItemsFrame("EmptyTable", "AtlasLoot_Data", 1);
|
AtlasLoot:ShowItemsFrame("EmptyTable", "AtlasLoot_Data", 1);
|
||||||
else
|
else
|
||||||
@@ -855,7 +839,7 @@ function ALModule:OnCommReceived(prefix, message, distribution, sender)
|
|||||||
elseif message == "FinishSend" then
|
elseif message == "FinishSend" then
|
||||||
SpamFilter[string.lower(sender)] = GetTime()
|
SpamFilter[string.lower(sender)] = GetTime()
|
||||||
elseif message == "AcceptWishlist" then
|
elseif message == "AcceptWishlist" then
|
||||||
local wsltable = CloneTable(AtlasLootWishList["Own"][curtablenum]);
|
local wsltable = CloneTable(_G[curtable[2]][curtable[1]][curtable[3]]);
|
||||||
for i,v in ipairs(wsltable) do
|
for i,v in ipairs(wsltable) do
|
||||||
v[4] = ""
|
v[4] = ""
|
||||||
local dataID, dataSource, dataPage = strsplit("|", v[8])
|
local dataID, dataSource, dataPage = strsplit("|", v[8])
|
||||||
@@ -916,7 +900,7 @@ StaticPopupDialogs["ATLASLOOT_SEND_WISHLIST"] = {
|
|||||||
|
|
||||||
else
|
else
|
||||||
if SpamProtect(string.lower(name)) then
|
if SpamProtect(string.lower(name)) then
|
||||||
curtablenum = AtlasLootItemsFrame.refresh[3];
|
curtable = {AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3]};
|
||||||
ALModule:SendCommMessage("AtlasLootWishlist", "WishlistRequest", "WHISPER", name);
|
ALModule:SendCommMessage("AtlasLootWishlist", "WishlistRequest", "WHISPER", name);
|
||||||
else
|
else
|
||||||
local _,_,timeleft = string.find( 10-(GetTime() - SpamFilter[string.lower(name)]), "(%d+)%.")
|
local _,_,timeleft = string.find( 10-(GetTime() - SpamFilter[string.lower(name)]), "(%d+)%.")
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ local BabbleZone = AtlasLoot_GetLocaleLibBabble("LibBabble-Zone-3.0")
|
|||||||
AtlasLoot_Dewdrop = AceLibrary("Dewdrop-2.0");
|
AtlasLoot_Dewdrop = AceLibrary("Dewdrop-2.0");
|
||||||
AtlasLoot_DewdropSubMenu = AceLibrary("Dewdrop-2.0");
|
AtlasLoot_DewdropSubMenu = AceLibrary("Dewdrop-2.0");
|
||||||
AtlasLoot_DewdropExpansionMenu = AceLibrary("Dewdrop-2.0");
|
AtlasLoot_DewdropExpansionMenu = AceLibrary("Dewdrop-2.0");
|
||||||
AtlasLoot_DifficultyAtlas = AceLibrary("Dewdrop-2.0");
|
|
||||||
|
|
||||||
ItemindexID = 2;
|
ItemindexID = 2;
|
||||||
|
|
||||||
@@ -47,6 +46,7 @@ function AtlasLootDefaultFrame_OnShow()
|
|||||||
AtlasLoot:ShowItemsFrame(lastboss[1], "AtlasLoot_Data", lastboss[3]);
|
AtlasLoot:ShowItemsFrame(lastboss[1], "AtlasLoot_Data", lastboss[3]);
|
||||||
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
|
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
|
||||||
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[lastboss[5]]);
|
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[lastboss[5]]);
|
||||||
|
AtlasLoot:WishListOptionsRegister();
|
||||||
else
|
else
|
||||||
AtlasLoot:ShowItemsFrame("EmptyTable", "AtlasLoot_Data", 1);
|
AtlasLoot:ShowItemsFrame("EmptyTable", "AtlasLoot_Data", 1);
|
||||||
end
|
end
|
||||||
@@ -144,7 +144,6 @@ function AtlasLoot:DewdropExpansionMenuRegister()
|
|||||||
for k,v in ipairs(AtlasLoot_ExpansionMenu) do
|
for k,v in ipairs(AtlasLoot_ExpansionMenu) do
|
||||||
if type(v) == "table" then
|
if type(v) == "table" then
|
||||||
--If a link to show a expansion menu
|
--If a link to show a expansion menu
|
||||||
local checked = false;
|
|
||||||
AtlasLoot_Dewdrop:AddLine(
|
AtlasLoot_Dewdrop:AddLine(
|
||||||
'text', v[1],
|
'text', v[1],
|
||||||
'textR', 1,
|
'textR', 1,
|
||||||
@@ -236,7 +235,6 @@ function AtlasLoot:DewdropRegister()
|
|||||||
if AtlasLoot_Modules then
|
if AtlasLoot_Modules then
|
||||||
for k,v in ipairs(AtlasLoot_Modules) do
|
for k,v in ipairs(AtlasLoot_Modules) do
|
||||||
--If a link to show a submenu
|
--If a link to show a submenu
|
||||||
local checked = false;
|
|
||||||
AtlasLoot_Dewdrop:AddLine(
|
AtlasLoot_Dewdrop:AddLine(
|
||||||
'text', v[1],
|
'text', v[1],
|
||||||
'textR', 1,
|
'textR', 1,
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ local lootbground = CreateFrame("Frame", "AtlasLootDefaultFrame_LootBackground",
|
|||||||
elseif AtlasLootDefaultFrame_AdvancedSearchPanel:IsVisible() and button == "RightButton" then
|
elseif AtlasLootDefaultFrame_AdvancedSearchPanel:IsVisible() and button == "RightButton" then
|
||||||
AtlasLoot_AdvancedSearchClose();
|
AtlasLoot_AdvancedSearchClose();
|
||||||
end
|
end
|
||||||
|
AtlasLoot_Dewdrop:Close();
|
||||||
|
AtlasLoot_DewdropSubMenu:Close();
|
||||||
|
AtlasLoot_DewdropExpansionMenu:Close();
|
||||||
|
AtlasLoot_WishListDrop:Close();
|
||||||
|
AtlasLoot_WishListOptions:Close();
|
||||||
end);
|
end);
|
||||||
|
|
||||||
----------------------------------- Item Loot Panel -------------------------------------------
|
----------------------------------- Item Loot Panel -------------------------------------------
|
||||||
@@ -172,30 +177,22 @@ local backbtn = CreateFrame("Button", "AtlasLootItemsFrame_BACK", AtlasLootItems
|
|||||||
backbtn:SetScript("OnClick", function(self) AtlasLoot:BackButton_OnClick() end)
|
backbtn:SetScript("OnClick", function(self) AtlasLoot:BackButton_OnClick() end)
|
||||||
backbtn:Hide();
|
backbtn:Hide();
|
||||||
|
|
||||||
-- Wishlist Edit button
|
-- Wishlist Options button
|
||||||
local editbtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_EDIT", AtlasLootItemsFrame, "OptionsButtonTemplate");
|
local optionsbtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_Options", AtlasLootItemsFrame, "OptionsButtonTemplate");
|
||||||
editbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame", "BOTTOM",-50,4);
|
optionsbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame", "BOTTOM",-50,4);
|
||||||
editbtn:SetText(AL["Edit"]);
|
optionsbtn:SetText(AL["Options"]);
|
||||||
editbtn:SetScript("OnClick", function() AtlasLoot:EditWishList() end)
|
optionsbtn:SetScript("OnClick", function(self)
|
||||||
editbtn:Hide();
|
if AtlasLoot_WishListOptions:IsOpen() then
|
||||||
|
AtlasLoot_WishListOptions:Close();
|
||||||
-- Wishlist Add button
|
else
|
||||||
local addbtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_ADD", AtlasLootItemsFrame, "OptionsButtonTemplate");
|
AtlasLoot_WishListOptions:Open(self);
|
||||||
addbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame_Wishlist_EDIT", "BOTTOM",-100,0);
|
end
|
||||||
addbtn:SetText(AL["Add"]);
|
end);
|
||||||
addbtn:SetScript("OnClick", function() AtlasLoot:AddWishList() end)
|
optionsbtn:Hide();
|
||||||
addbtn:Hide();
|
|
||||||
|
|
||||||
-- Wishlist Delete button
|
|
||||||
local deletebtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_DELETE", AtlasLootItemsFrame, "OptionsButtonTemplate");
|
|
||||||
deletebtn:SetPoint("BOTTOM", "AtlasLootItemsFrame_Wishlist_EDIT", "BOTTOM",100,0);
|
|
||||||
deletebtn:SetText(AL["Delete"]);
|
|
||||||
deletebtn:SetScript("OnClick", function() AtlasLoot:DeleteWishList() end)
|
|
||||||
deletebtn:Hide();
|
|
||||||
|
|
||||||
-- Wishlist Share button
|
-- Wishlist Share button
|
||||||
local sharebtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_Share", AtlasLootItemsFrame, "OptionsButtonTemplate");
|
local sharebtn = CreateFrame("Button", "AtlasLootItemsFrame_Wishlist_Share", AtlasLootItemsFrame, "OptionsButtonTemplate");
|
||||||
sharebtn:SetPoint("BOTTOM", "AtlasLootItemsFrame_Wishlist_DELETE", "BOTTOM",100,0);
|
sharebtn:SetPoint("BOTTOM", "AtlasLootItemsFrame_Wishlist_Options", "BOTTOM",100,0);
|
||||||
sharebtn:SetText(AL["Share"]);
|
sharebtn:SetText(AL["Share"]);
|
||||||
sharebtn:SetScript("OnClick", function() AtlasLoot:ShareWishList() end)
|
sharebtn:SetScript("OnClick", function() AtlasLoot:ShareWishList() end)
|
||||||
sharebtn:Hide();
|
sharebtn:Hide();
|
||||||
@@ -313,7 +310,8 @@ local expansionmenubtn = CreateFrame("Button", "AtlasLootDefaultFrame_ExpansionM
|
|||||||
local wishbtn = CreateFrame("Button", "AtlasLootDefaultFrameWishListButton", AtlasLootDefaultFrame, "OptionsButtonTemplate");
|
local wishbtn = CreateFrame("Button", "AtlasLootDefaultFrameWishListButton", AtlasLootDefaultFrame, "OptionsButtonTemplate");
|
||||||
wishbtn:SetPoint("BOTTOMLEFT", "AtlasLootDefaultFrame", "BOTTOMLEFT", 40, 63);
|
wishbtn:SetPoint("BOTTOMLEFT", "AtlasLootDefaultFrame", "BOTTOMLEFT", 40, 63);
|
||||||
wishbtn:SetSize(105,20);
|
wishbtn:SetSize(105,20);
|
||||||
wishbtn:SetScript("OnClick", function(self)AtlasLoot_ShowWishListDropDown("","","","","",self,true) end);
|
wishbtn:RegisterForClicks("LeftButtonDown","RightButtonDown");
|
||||||
|
wishbtn:SetScript("OnClick", function(self, btnclick)AtlasLoot:WishListButton("","","","","",self,true,btnclick) end);
|
||||||
wishbtn:SetText(AL["Wishlist"]);
|
wishbtn:SetText(AL["Wishlist"]);
|
||||||
|
|
||||||
--Quick Look Buttons
|
--Quick Look Buttons
|
||||||
|
|||||||
@@ -299,6 +299,9 @@ if AL then
|
|||||||
AL["Always use default Wishlist"] = true;
|
AL["Always use default Wishlist"] = true;
|
||||||
AL["Add Wishlist"] = true;
|
AL["Add Wishlist"] = true;
|
||||||
AL["Edit Wishlist"] = true;
|
AL["Edit Wishlist"] = true;
|
||||||
|
AL["Copy Wishlist To Own"] = true;
|
||||||
|
AL["Make Default Wishlist"] = true;
|
||||||
|
AL["Delete Wishlist"] = true;
|
||||||
AL["Show More Icons"] = true;
|
AL["Show More Icons"] = true;
|
||||||
AL["Wishlist name:"] = true;
|
AL["Wishlist name:"] = true;
|
||||||
AL["Delete"] = true;
|
AL["Delete"] = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user